From 34cd71362ed565029985c66d1aa2c8100f147b91 Mon Sep 17 00:00:00 2001 From: developmentconexus Date: Wed, 11 Nov 2026 20:47:29 -0300 Subject: [PATCH 1/2] =?UTF-8?q?feat(sync):=20as=20fontes=20das=20c=C3=B3pi?= =?UTF-8?q?as,=20as=20tabelas=20que=20ficaram=20e=20as=20fontes=20das=20pr?= =?UTF-8?q?opostas,=20com=20a=20lista=20de=20permiss=C3=B5es=20(data=20D11?= =?UTF-8?q?,=20pull=20request=20pr=C3=B3prio)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit O Sync de qualquer conector, a ordem do cartão: copies.copy_source (cada conexão de uma cópia com a sua conta, a sua passada, a sua posição, a sua marca e a sua espera), copies.copy_table_left (a tabela de uma cópia que acabou com o banco da empresa calado), copies.copy_proposal_source (as conexões de uma proposta) e copy_proposal.proved_calls. O login do Hub lê e insere as três; muda de uma fonte só a passada, a posição, a marca e a espera; apaga só a linha de copy_table_left depois do DROP; e passa a apagar copies.copy, para que o Desligar encerre na mesma transação a cópia que ficou sem fonte (a decisão C). Uma fonte sai só pela cascata. --- apps/server/database-grants.sql | 21 +- .../migration.sql | 45 + .../snapshot.json | 10357 ++++++++++++++++ .../migration.sql | 15 + .../snapshot.json | 10357 ++++++++++++++++ apps/server/src/hub/copies/tables.ts | 102 + 6 files changed, 20896 insertions(+), 1 deletion(-) create mode 100644 apps/server/migrations/20261111234347_sync_copy_sources/migration.sql create mode 100644 apps/server/migrations/20261111234347_sync_copy_sources/snapshot.json create mode 100644 apps/server/migrations/20261111234429_sync_copy_sources_grants/migration.sql create mode 100644 apps/server/migrations/20261111234429_sync_copy_sources_grants/snapshot.json diff --git a/apps/server/database-grants.sql b/apps/server/database-grants.sql index ecb2c666..d7acad8e 100644 --- a/apps/server/database-grants.sql +++ b/apps/server/database-grants.sql @@ -77,7 +77,10 @@ ALTER TABLE connectors.connector_write OWNER TO test_owner; ALTER TABLE connectors.project_connection OWNER TO test_owner; ALTER TABLE copies.copy OWNER TO test_owner; ALTER TABLE copies.copy_proposal OWNER TO test_owner; +ALTER TABLE copies.copy_proposal_source OWNER TO test_owner; ALTER TABLE copies.copy_run OWNER TO test_owner; +ALTER TABLE copies.copy_source OWNER TO test_owner; +ALTER TABLE copies.copy_table_left OWNER TO test_owner; ALTER TABLE copies.project_copy OWNER TO test_owner; ALTER TABLE drizzle.__drizzle_migrations OWNER TO test_owner; ALTER SEQUENCE drizzle.__drizzle_migrations_id_seq OWNER TO test_owner; @@ -341,7 +344,9 @@ GRANT SELECT,INSERT,DELETE ON TABLE connectors.project_connection TO hub_company -- Capacity 2, U2, with the founder's word in the pull request of its own (data D11): a company's -- routes and its copies' runs turn a copy on, hold its run's lease and save where its pass stands, -- record each run and keep the newest, and release a copy to a Projeto and take it back. -GRANT SELECT,INSERT ON TABLE copies.copy TO hub_company; +-- O Sync de qualquer conector, with the founder's word in the pull request of its own (data D11): +-- Desligar ends, in the transaction that deletes the connection, the copy left with no source. +GRANT SELECT,INSERT,DELETE ON TABLE copies.copy TO hub_company; GRANT UPDATE(claim_token) ON TABLE copies.copy TO hub_company; GRANT UPDATE(claimed_until) ON TABLE copies.copy TO hub_company; GRANT UPDATE(pass) ON TABLE copies.copy TO hub_company; @@ -356,6 +361,9 @@ GRANT UPDATE(last_run_id) ON TABLE copies.copy TO hub_company; GRANT SELECT,INSERT ON TABLE copies.copy_proposal TO hub_company; GRANT UPDATE(state) ON TABLE copies.copy_proposal TO hub_company; GRANT UPDATE(copy_id) ON TABLE copies.copy_proposal TO hub_company; +-- O Sync de qualquer conector, with the founder's word in the pull request of its own (data D11): the +-- Builder's run proposes a copy over several connections; a proposal's source leaves by cascade. +GRANT SELECT,INSERT ON TABLE copies.copy_proposal_source TO hub_company; GRANT SELECT,INSERT,DELETE ON TABLE copies.copy_run TO hub_company; GRANT UPDATE(ended_at) ON TABLE copies.copy_run TO hub_company; GRANT UPDATE(outcome) ON TABLE copies.copy_run TO hub_company; @@ -363,6 +371,17 @@ GRANT UPDATE(reason) ON TABLE copies.copy_run TO hub_company; GRANT UPDATE(pages) ON TABLE copies.copy_run TO hub_company; GRANT UPDATE(read) ON TABLE copies.copy_run TO hub_company; GRANT UPDATE(written) ON TABLE copies.copy_run TO hub_company; +-- O Sync de qualquer conector, with the founder's word in the pull request of its own (data D11): a +-- copy's runs read and save where each of its connections stands and until when the provider asked +-- it to wait; a source leaves by cascade. Desligar writes down the table of a copy that ended while +-- the company's database did not answer, and drains the row once the table is dropped. +GRANT SELECT,INSERT ON TABLE copies.copy_source TO hub_company; +GRANT UPDATE(pass) ON TABLE copies.copy_source TO hub_company; +GRANT UPDATE(pass_started_at) ON TABLE copies.copy_source TO hub_company; +GRANT UPDATE("position") ON TABLE copies.copy_source TO hub_company; +GRANT UPDATE(watermark) ON TABLE copies.copy_source TO hub_company; +GRANT UPDATE(wait_until) ON TABLE copies.copy_source TO hub_company; +GRANT SELECT,INSERT,DELETE ON TABLE copies.copy_table_left TO hub_company; GRANT SELECT,INSERT,DELETE ON TABLE copies.project_copy TO hub_company; GRANT SELECT ON TABLE drizzle.__drizzle_migrations TO hub_runtime; GRANT SELECT,INSERT ON TABLE hub.starts TO hub_runtime; diff --git a/apps/server/migrations/20261111234347_sync_copy_sources/migration.sql b/apps/server/migrations/20261111234347_sync_copy_sources/migration.sql new file mode 100644 index 00000000..4d03b4a4 --- /dev/null +++ b/apps/server/migrations/20261111234347_sync_copy_sources/migration.sql @@ -0,0 +1,45 @@ +CREATE TABLE "copies"."copy_proposal_source" ( + "company_id" text NOT NULL, + "proposal_id" uuid, + "connector_id" text NOT NULL, + "connection_id" uuid, + CONSTRAINT "copy_proposal_source_pkey" PRIMARY KEY("proposal_id","connection_id") +); +--> statement-breakpoint +ALTER TABLE "copies"."copy_proposal_source" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "copies"."copy_source" ( + "company_id" text NOT NULL, + "copy_id" uuid, + "connector_id" text NOT NULL, + "connection_id" uuid, + "account_ref" text, + "pass" integer DEFAULT 0 NOT NULL, + "pass_started_at" timestamp with time zone, + "position" jsonb, + "watermark" timestamp with time zone, + "wait_until" timestamp with time zone, + "created_at" timestamp with time zone NOT NULL, + CONSTRAINT "copy_source_pkey" PRIMARY KEY("copy_id","connection_id"), + CONSTRAINT "copy_source_copy_id_account_ref_key" UNIQUE("copy_id","account_ref"), + CONSTRAINT "copy_source_position" CHECK ("position" IS NULL OR jsonb_typeof("position") = 'object') +); +--> statement-breakpoint +ALTER TABLE "copies"."copy_source" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +CREATE TABLE "copies"."copy_table_left" ( + "company_id" text, + "copy_id" uuid, + "name" text NOT NULL, + CONSTRAINT "copy_table_left_pkey" PRIMARY KEY("company_id","copy_id"), + CONSTRAINT "copy_table_left_name" CHECK ("name" ~ '^[a-z][a-z0-9_]{0,39}$') +); +--> statement-breakpoint +ALTER TABLE "copies"."copy_table_left" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint +ALTER TABLE "copies"."copy_proposal" ADD COLUMN "proved_calls" integer;--> statement-breakpoint +ALTER TABLE "copies"."copy_proposal_source" ADD CONSTRAINT "copy_proposal_source_proposal_fkey" FOREIGN KEY ("proposal_id") REFERENCES "copies"."copy_proposal"("id") ON DELETE CASCADE;--> statement-breakpoint +ALTER TABLE "copies"."copy_proposal_source" ADD CONSTRAINT "copy_proposal_source_connection_fkey" FOREIGN KEY ("company_id","connector_id","connection_id") REFERENCES "connectors"."connection"("company_id","connector_id","id") ON DELETE CASCADE;--> statement-breakpoint +ALTER TABLE "copies"."copy_source" ADD CONSTRAINT "copy_source_copy_fkey" FOREIGN KEY ("company_id","copy_id") REFERENCES "copies"."copy"("company_id","id") ON DELETE CASCADE;--> statement-breakpoint +ALTER TABLE "copies"."copy_source" ADD CONSTRAINT "copy_source_connection_fkey" FOREIGN KEY ("company_id","connector_id","connection_id") REFERENCES "connectors"."connection"("company_id","connector_id","id") ON DELETE CASCADE;--> statement-breakpoint +ALTER TABLE "copies"."copy_table_left" ADD CONSTRAINT "copy_table_left_company_id_fkey" FOREIGN KEY ("company_id") REFERENCES "auth"."company"("id") ON DELETE CASCADE;--> statement-breakpoint +CREATE POLICY "company_all" ON "copies"."copy_proposal_source" AS PERMISSIVE FOR ALL TO "hub_company" USING (company_id = nullif(current_setting('conexus.company_id', true), '')) WITH CHECK (company_id = nullif(current_setting('conexus.company_id', true), ''));--> statement-breakpoint +CREATE POLICY "company_all" ON "copies"."copy_source" AS PERMISSIVE FOR ALL TO "hub_company" USING (company_id = nullif(current_setting('conexus.company_id', true), '')) WITH CHECK (company_id = nullif(current_setting('conexus.company_id', true), ''));--> statement-breakpoint +CREATE POLICY "company_all" ON "copies"."copy_table_left" AS PERMISSIVE FOR ALL TO "hub_company" USING (company_id = nullif(current_setting('conexus.company_id', true), '')) WITH CHECK (company_id = nullif(current_setting('conexus.company_id', true), '')); \ No newline at end of file diff --git a/apps/server/migrations/20261111234347_sync_copy_sources/snapshot.json b/apps/server/migrations/20261111234347_sync_copy_sources/snapshot.json new file mode 100644 index 00000000..a69de2e2 --- /dev/null +++ b/apps/server/migrations/20261111234347_sync_copy_sources/snapshot.json @@ -0,0 +1,10357 @@ +{ + "version": "8", + "dialect": "postgres", + "id": "2e2e90ee-e859-4e6b-8f69-54dd30079999", + "prevIds": [ + "4d36c022-ab8d-4467-ba59-2548cebb07ff" + ], + "ddl": [ + { + "name": "builder", + "entityType": "schemas" + }, + { + "name": "apps", + "entityType": "schemas" + }, + { + "name": "connectors", + "entityType": "schemas" + }, + { + "name": "copies", + "entityType": "schemas" + }, + { + "name": "auth", + "entityType": "schemas" + }, + { + "name": "notifications", + "entityType": "schemas" + }, + { + "name": "operations", + "entityType": "schemas" + }, + { + "name": "projects", + "entityType": "schemas" + }, + { + "name": "requests", + "entityType": "schemas" + }, + { + "name": "hub", + "entityType": "schemas" + }, + { + "isRlsEnabled": true, + "name": "agent", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "agent_conversation", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "agent_tool", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "agent_version", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "agent_version_tool", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "assistant_conversation", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "conversation", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "company_account_kind", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "company_model", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "company_model_fallback", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "model_account", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "model_account_assignee", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "model_account_sign_in", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "observational_memory_models", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "person_model_default", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "tool", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "tool_version", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "app", + "entityType": "tables", + "schema": "apps" + }, + { + "isRlsEnabled": false, + "name": "app_session", + "entityType": "tables", + "schema": "apps" + }, + { + "isRlsEnabled": true, + "name": "app_version", + "entityType": "tables", + "schema": "apps" + }, + { + "isRlsEnabled": true, + "name": "blob", + "entityType": "tables", + "schema": "apps" + }, + { + "isRlsEnabled": false, + "name": "handoff", + "entityType": "tables", + "schema": "apps" + }, + { + "isRlsEnabled": true, + "name": "version_file", + "entityType": "tables", + "schema": "apps" + }, + { + "isRlsEnabled": true, + "name": "connection", + "entityType": "tables", + "schema": "connectors" + }, + { + "isRlsEnabled": true, + "name": "connection_sign_in", + "entityType": "tables", + "schema": "connectors" + }, + { + "isRlsEnabled": true, + "name": "connector_write", + "entityType": "tables", + "schema": "connectors" + }, + { + "isRlsEnabled": true, + "name": "project_connection", + "entityType": "tables", + "schema": "connectors" + }, + { + "isRlsEnabled": true, + "name": "copy", + "entityType": "tables", + "schema": "copies" + }, + { + "isRlsEnabled": true, + "name": "copy_proposal", + "entityType": "tables", + "schema": "copies" + }, + { + "isRlsEnabled": true, + "name": "copy_proposal_source", + "entityType": "tables", + "schema": "copies" + }, + { + "isRlsEnabled": true, + "name": "copy_run", + "entityType": "tables", + "schema": "copies" + }, + { + "isRlsEnabled": true, + "name": "copy_source", + "entityType": "tables", + "schema": "copies" + }, + { + "isRlsEnabled": true, + "name": "copy_table_left", + "entityType": "tables", + "schema": "copies" + }, + { + "isRlsEnabled": true, + "name": "project_copy", + "entityType": "tables", + "schema": "copies" + }, + { + "isRlsEnabled": false, + "name": "account", + "entityType": "tables", + "schema": "auth" + }, + { + "isRlsEnabled": true, + "name": "company", + "entityType": "tables", + "schema": "auth" + }, + { + "isRlsEnabled": true, + "name": "invitation", + "entityType": "tables", + "schema": "auth" + }, + { + "isRlsEnabled": true, + "name": "member", + "entityType": "tables", + "schema": "auth" + }, + { + "isRlsEnabled": true, + "name": "organization_role", + "entityType": "tables", + "schema": "auth" + }, + { + "isRlsEnabled": false, + "name": "rate_limit", + "entityType": "tables", + "schema": "auth" + }, + { + "isRlsEnabled": true, + "name": "session", + "entityType": "tables", + "schema": "auth" + }, + { + "isRlsEnabled": true, + "name": "user", + "entityType": "tables", + "schema": "auth" + }, + { + "isRlsEnabled": false, + "name": "verification", + "entityType": "tables", + "schema": "auth" + }, + { + "isRlsEnabled": true, + "name": "notification", + "entityType": "tables", + "schema": "notifications" + }, + { + "isRlsEnabled": true, + "name": "request_notice", + "entityType": "tables", + "schema": "notifications" + }, + { + "isRlsEnabled": true, + "name": "client", + "entityType": "tables", + "schema": "operations" + }, + { + "isRlsEnabled": true, + "name": "app_access", + "entityType": "tables", + "schema": "projects" + }, + { + "isRlsEnabled": true, + "name": "company_database", + "entityType": "tables", + "schema": "projects" + }, + { + "isRlsEnabled": true, + "name": "project", + "entityType": "tables", + "schema": "projects" + }, + { + "isRlsEnabled": true, + "name": "request", + "entityType": "tables", + "schema": "requests" + }, + { + "isRlsEnabled": false, + "name": "starts", + "entityType": "tables", + "schema": "hub" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "builder", + "table": "agent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "agent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "project_id", + "entityType": "columns", + "schema": "builder", + "table": "agent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "draft", + "entityType": "columns", + "schema": "builder", + "table": "agent" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "revision", + "entityType": "columns", + "schema": "builder", + "table": "agent" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "active_version", + "entityType": "columns", + "schema": "builder", + "table": "agent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "active_by", + "entityType": "columns", + "schema": "builder", + "table": "agent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_by", + "entityType": "columns", + "schema": "builder", + "table": "agent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "body_hash", + "entityType": "columns", + "schema": "builder", + "table": "agent" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "builder", + "table": "agent" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "builder", + "table": "agent" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "last_run_at", + "entityType": "columns", + "schema": "builder", + "table": "agent" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "builder", + "table": "agent_conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "agent_conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "person_id", + "entityType": "columns", + "schema": "builder", + "table": "agent_conversation" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "agent_id", + "entityType": "columns", + "schema": "builder", + "table": "agent_conversation" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "draft", + "entityType": "columns", + "schema": "builder", + "table": "agent_conversation" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "agent_id", + "entityType": "columns", + "schema": "builder", + "table": "agent_tool" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tool_id", + "entityType": "columns", + "schema": "builder", + "table": "agent_tool" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tool_version_id", + "entityType": "columns", + "schema": "builder", + "table": "agent_tool" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "agent_tool" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "approval", + "entityType": "columns", + "schema": "builder", + "table": "agent_tool" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "agent_id", + "entityType": "columns", + "schema": "builder", + "table": "agent_version" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "number", + "entityType": "columns", + "schema": "builder", + "table": "agent_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "agent_version" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "config", + "entityType": "columns", + "schema": "builder", + "table": "agent_version" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source_revision", + "entityType": "columns", + "schema": "builder", + "table": "agent_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "message", + "entityType": "columns", + "schema": "builder", + "table": "agent_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "published_by", + "entityType": "columns", + "schema": "builder", + "table": "agent_version" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "published_at", + "entityType": "columns", + "schema": "builder", + "table": "agent_version" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "agent_id", + "entityType": "columns", + "schema": "builder", + "table": "agent_version_tool" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "number", + "entityType": "columns", + "schema": "builder", + "table": "agent_version_tool" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tool_version_id", + "entityType": "columns", + "schema": "builder", + "table": "agent_version_tool" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "agent_version_tool" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "approval", + "entityType": "columns", + "schema": "builder", + "table": "agent_version_tool" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "builder", + "table": "assistant_conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "assistant_conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "person_id", + "entityType": "columns", + "schema": "builder", + "table": "assistant_conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "project_id", + "entityType": "columns", + "schema": "builder", + "table": "assistant_conversation" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "connections", + "entityType": "columns", + "schema": "builder", + "table": "assistant_conversation" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "builder", + "table": "conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "project_id", + "entityType": "columns", + "schema": "builder", + "table": "conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "person_id", + "entityType": "columns", + "schema": "builder", + "table": "conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempt_key", + "entityType": "columns", + "schema": "builder", + "table": "conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "body_hash", + "entityType": "columns", + "schema": "builder", + "table": "conversation" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "builder", + "table": "conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "company_account_kind" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "kind", + "entityType": "columns", + "schema": "builder", + "table": "company_account_kind" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "company_model" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "builder", + "table": "company_model" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'off'", + "generated": null, + "identity": null, + "name": "effort", + "entityType": "columns", + "schema": "builder", + "table": "company_model" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "company_model_fallback" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns", + "schema": "builder", + "table": "company_model_fallback" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "chain", + "entityType": "columns", + "schema": "builder", + "table": "company_model_fallback" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "revision", + "entityType": "columns", + "schema": "builder", + "table": "company_model_fallback" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "person_id", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "kind", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "provider", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "label", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "position", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "state", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "bytea", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sealed", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "key_id", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "hint", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "linked_by", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "linked_at", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "revision", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempt_key", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "limited_until", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refresh_until", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "served_models", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "served_at", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_id", + "entityType": "columns", + "schema": "builder", + "table": "model_account_assignee" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "model_account_assignee" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "person_id", + "entityType": "columns", + "schema": "builder", + "table": "model_account_assignee" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "person_id", + "entityType": "columns", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "owner", + "entityType": "columns", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "kind", + "entityType": "columns", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "label", + "entityType": "columns", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "type": "bytea", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sealed", + "entityType": "columns", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "key_id", + "entityType": "columns", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expires_at", + "entityType": "columns", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "statement_timestamp()", + "generated": null, + "identity": null, + "name": "poll_at", + "entityType": "columns", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "observational_memory_models" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "observer", + "entityType": "columns", + "schema": "builder", + "table": "observational_memory_models" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "reflector", + "entityType": "columns", + "schema": "builder", + "table": "observational_memory_models" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "person_model_default" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "person_id", + "entityType": "columns", + "schema": "builder", + "table": "person_model_default" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "builder", + "table": "person_model_default" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "effort", + "entityType": "columns", + "schema": "builder", + "table": "person_model_default" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "builder", + "table": "tool" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "tool" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'PRESET'", + "generated": null, + "identity": null, + "name": "kind", + "entityType": "columns", + "schema": "builder", + "table": "tool" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connection_id", + "entityType": "columns", + "schema": "builder", + "table": "tool" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "operation", + "entityType": "columns", + "schema": "builder", + "table": "tool" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "slug", + "entityType": "columns", + "schema": "builder", + "table": "tool" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "current_version", + "entityType": "columns", + "schema": "builder", + "table": "tool" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_by", + "entityType": "columns", + "schema": "builder", + "table": "tool" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "body_hash", + "entityType": "columns", + "schema": "builder", + "table": "tool" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "builder", + "table": "tool" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "builder", + "table": "tool" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "builder", + "table": "tool_version" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tool_id", + "entityType": "columns", + "schema": "builder", + "table": "tool_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "tool_version" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "number", + "entityType": "columns", + "schema": "builder", + "table": "tool_version" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "config", + "entityType": "columns", + "schema": "builder", + "table": "tool_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_by", + "entityType": "columns", + "schema": "builder", + "table": "tool_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "body_hash", + "entityType": "columns", + "schema": "builder", + "table": "tool_version" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "builder", + "table": "tool_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "project_id", + "entityType": "columns", + "schema": "apps", + "table": "app" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "apps", + "table": "app" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "live_version_id", + "entityType": "columns", + "schema": "apps", + "table": "app" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "published_version_id", + "entityType": "columns", + "schema": "apps", + "table": "app" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sending_version_id", + "entityType": "columns", + "schema": "apps", + "table": "app" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimed_until", + "entityType": "columns", + "schema": "apps", + "table": "app" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "database_ready", + "entityType": "columns", + "schema": "apps", + "table": "app" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token_hash", + "entityType": "columns", + "schema": "apps", + "table": "app_session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "host_label", + "entityType": "columns", + "schema": "apps", + "table": "app_session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "person_id", + "entityType": "columns", + "schema": "apps", + "table": "app_session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "apps", + "table": "app_session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "project_id", + "entityType": "columns", + "schema": "apps", + "table": "app_session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "hub_session_id", + "entityType": "columns", + "schema": "apps", + "table": "app_session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "environment", + "entityType": "columns", + "schema": "apps", + "table": "app_session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "apps", + "table": "app_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "apps", + "table": "app_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "project_id", + "entityType": "columns", + "schema": "apps", + "table": "app_version" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "number", + "entityType": "columns", + "schema": "apps", + "table": "app_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "state", + "entityType": "columns", + "schema": "apps", + "table": "app_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failure", + "entityType": "columns", + "schema": "apps", + "table": "app_version" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "manifest", + "entityType": "columns", + "schema": "apps", + "table": "app_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "digest", + "entityType": "columns", + "schema": "apps", + "table": "app_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sent_by", + "entityType": "columns", + "schema": "apps", + "table": "app_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempt_key", + "entityType": "columns", + "schema": "apps", + "table": "app_version" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "apps", + "table": "app_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "apps", + "table": "blob" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sha256", + "entityType": "columns", + "schema": "apps", + "table": "blob" + }, + { + "type": "bytea", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "bytes", + "entityType": "columns", + "schema": "apps", + "table": "blob" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "code_hash", + "entityType": "columns", + "schema": "apps", + "table": "handoff" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "binding_hash", + "entityType": "columns", + "schema": "apps", + "table": "handoff" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "host_label", + "entityType": "columns", + "schema": "apps", + "table": "handoff" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "person_id", + "entityType": "columns", + "schema": "apps", + "table": "handoff" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "apps", + "table": "handoff" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "project_id", + "entityType": "columns", + "schema": "apps", + "table": "handoff" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "hub_session_id", + "entityType": "columns", + "schema": "apps", + "table": "handoff" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "environment", + "entityType": "columns", + "schema": "apps", + "table": "handoff" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expires_at", + "entityType": "columns", + "schema": "apps", + "table": "handoff" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "version_id", + "entityType": "columns", + "schema": "apps", + "table": "version_file" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "apps", + "table": "version_file" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "path", + "entityType": "columns", + "schema": "apps", + "table": "version_file" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sha256", + "entityType": "columns", + "schema": "apps", + "table": "version_file" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "size", + "entityType": "columns", + "schema": "apps", + "table": "version_file" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "media_type", + "entityType": "columns", + "schema": "apps", + "table": "version_file" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connector_id", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connector_version", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "state", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "bytea", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sealed", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "key_id", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "linked_by", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "linked_at", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tested_at", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tested_by", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "last_test", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "notes", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempt_key", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "revision", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refresh_until", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_ref", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_label", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "person_id", + "entityType": "columns", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connector_id", + "entityType": "columns", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connection_id", + "entityType": "columns", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connection_revision", + "entityType": "columns", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "type": "bytea", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sealed", + "entityType": "columns", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "key_id", + "entityType": "columns", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expires_at", + "entityType": "columns", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "connectors", + "table": "connector_write" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "thread_id", + "entityType": "columns", + "schema": "connectors", + "table": "connector_write" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tool_call_id", + "entityType": "columns", + "schema": "connectors", + "table": "connector_write" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connection_id", + "entityType": "columns", + "schema": "connectors", + "table": "connector_write" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "operation_id", + "entityType": "columns", + "schema": "connectors", + "table": "connector_write" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "input_hash", + "entityType": "columns", + "schema": "connectors", + "table": "connector_write" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "agent_id", + "entityType": "columns", + "schema": "connectors", + "table": "connector_write" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "version_number", + "entityType": "columns", + "schema": "connectors", + "table": "connector_write" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "person_id", + "entityType": "columns", + "schema": "connectors", + "table": "connector_write" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "state", + "entityType": "columns", + "schema": "connectors", + "table": "connector_write" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "answer", + "entityType": "columns", + "schema": "connectors", + "table": "connector_write" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "approved_by", + "entityType": "columns", + "schema": "connectors", + "table": "connector_write" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "connectors", + "table": "connector_write" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "project_id", + "entityType": "columns", + "schema": "connectors", + "table": "project_connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "connectors", + "table": "project_connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connector_id", + "entityType": "columns", + "schema": "connectors", + "table": "project_connection" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connection_id", + "entityType": "columns", + "schema": "connectors", + "table": "project_connection" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "exclusive", + "entityType": "columns", + "schema": "connectors", + "table": "project_connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "granted_by", + "entityType": "columns", + "schema": "connectors", + "table": "project_connection" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "granted_at", + "entityType": "columns", + "schema": "connectors", + "table": "project_connection" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connector_id", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connection_id", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "label", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "definition", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_by", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempt_key", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "body_hash", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claim_token", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimed_until", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "pass", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pass_started_at", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "position", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "watermark", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rows", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "last_run_id", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connector_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connection_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "project_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "label", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "definition", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "proposed_by", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "proved_rows", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "proved_more", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "proved_calls", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "proposed_at", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "state", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "copy_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal_source" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "proposal_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal_source" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connector_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal_source" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connection_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal_source" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "copies", + "table": "copy_run" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_run" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "copy_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_run" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "started_at", + "entityType": "columns", + "schema": "copies", + "table": "copy_run" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ended_at", + "entityType": "columns", + "schema": "copies", + "table": "copy_run" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "outcome", + "entityType": "columns", + "schema": "copies", + "table": "copy_run" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "reason", + "entityType": "columns", + "schema": "copies", + "table": "copy_run" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "pages", + "entityType": "columns", + "schema": "copies", + "table": "copy_run" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "read", + "entityType": "columns", + "schema": "copies", + "table": "copy_run" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "written", + "entityType": "columns", + "schema": "copies", + "table": "copy_run" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_source" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "copy_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_source" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connector_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_source" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connection_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_source" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_ref", + "entityType": "columns", + "schema": "copies", + "table": "copy_source" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "pass", + "entityType": "columns", + "schema": "copies", + "table": "copy_source" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pass_started_at", + "entityType": "columns", + "schema": "copies", + "table": "copy_source" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "position", + "entityType": "columns", + "schema": "copies", + "table": "copy_source" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "watermark", + "entityType": "columns", + "schema": "copies", + "table": "copy_source" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wait_until", + "entityType": "columns", + "schema": "copies", + "table": "copy_source" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "copies", + "table": "copy_source" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_table_left" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "copy_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_table_left" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "copies", + "table": "copy_table_left" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "copies", + "table": "project_copy" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "project_id", + "entityType": "columns", + "schema": "copies", + "table": "project_copy" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "copy_id", + "entityType": "columns", + "schema": "copies", + "table": "project_copy" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "granted_by", + "entityType": "columns", + "schema": "copies", + "table": "project_copy" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "granted_at", + "entityType": "columns", + "schema": "copies", + "table": "project_copy" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_id", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "provider_id", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "access_token", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refresh_token", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id_token", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "access_token_expires_at", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refresh_token_expires_at", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scope", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "password", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "auth", + "table": "company" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "auth", + "table": "company" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "slug", + "entityType": "columns", + "schema": "auth", + "table": "company" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "logo", + "entityType": "columns", + "schema": "auth", + "table": "company" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns", + "schema": "auth", + "table": "company" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "auth", + "table": "company" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempt_key", + "entityType": "columns", + "schema": "auth", + "table": "company" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deleting_since", + "entityType": "columns", + "schema": "auth", + "table": "company" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nickname", + "entityType": "columns", + "schema": "auth", + "table": "company" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "role", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "project_id", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "app_role", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expires_at", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inviter_id", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempt_key", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mailed_at", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "revision", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "superseded_at", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "replaces", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "auth", + "table": "member" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "auth", + "table": "member" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "auth", + "table": "member" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "role", + "entityType": "columns", + "schema": "auth", + "table": "member" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "auth", + "table": "member" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "auth", + "table": "organization_role" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "auth", + "table": "organization_role" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "role", + "entityType": "columns", + "schema": "auth", + "table": "organization_role" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "permission", + "entityType": "columns", + "schema": "auth", + "table": "organization_role" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "label", + "entityType": "columns", + "schema": "auth", + "table": "organization_role" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempt_key", + "entityType": "columns", + "schema": "auth", + "table": "organization_role" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "auth", + "table": "organization_role" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "auth", + "table": "organization_role" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "auth", + "table": "rate_limit" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "key", + "entityType": "columns", + "schema": "auth", + "table": "rate_limit" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "count", + "entityType": "columns", + "schema": "auth", + "table": "rate_limit" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "last_request", + "entityType": "columns", + "schema": "auth", + "table": "rate_limit" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "auth", + "table": "session" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expires_at", + "entityType": "columns", + "schema": "auth", + "table": "session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns", + "schema": "auth", + "table": "session" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "auth", + "table": "session" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "auth", + "table": "session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ip_address", + "entityType": "columns", + "schema": "auth", + "table": "session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_agent", + "entityType": "columns", + "schema": "auth", + "table": "session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "auth", + "table": "session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "active_organization_id", + "entityType": "columns", + "schema": "auth", + "table": "session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "impersonated_by", + "entityType": "columns", + "schema": "auth", + "table": "session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "email_verified", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "image", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "role", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "banned", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ban_reason", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ban_expires", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "auth", + "table": "verification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "identifier", + "entityType": "columns", + "schema": "auth", + "table": "verification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "auth", + "table": "verification" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expires_at", + "entityType": "columns", + "schema": "auth", + "table": "verification" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "auth", + "table": "verification" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "auth", + "table": "verification" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "notifications", + "table": "notification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "notifications", + "table": "notification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "person_id", + "entityType": "columns", + "schema": "notifications", + "table": "notification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "kind", + "entityType": "columns", + "schema": "notifications", + "table": "notification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "automation_id", + "entityType": "columns", + "schema": "notifications", + "table": "notification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "automation_name", + "entityType": "columns", + "schema": "notifications", + "table": "notification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "project_id", + "entityType": "columns", + "schema": "notifications", + "table": "notification" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversation_id", + "entityType": "columns", + "schema": "notifications", + "table": "notification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failure_code", + "entityType": "columns", + "schema": "notifications", + "table": "notification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "run_id", + "entityType": "columns", + "schema": "notifications", + "table": "notification" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "notifications", + "table": "notification" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "read_at", + "entityType": "columns", + "schema": "notifications", + "table": "notification" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "notifications", + "table": "request_notice" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "notifications", + "table": "request_notice" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "person_id", + "entityType": "columns", + "schema": "notifications", + "table": "request_notice" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "request_id", + "entityType": "columns", + "schema": "notifications", + "table": "request_notice" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "kind", + "entityType": "columns", + "schema": "notifications", + "table": "request_notice" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "notifications", + "table": "request_notice" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "read_at", + "entityType": "columns", + "schema": "notifications", + "table": "request_notice" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "operations", + "table": "client" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cnpj", + "entityType": "columns", + "schema": "operations", + "table": "client" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "legal_name", + "entityType": "columns", + "schema": "operations", + "table": "client" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "revision", + "entityType": "columns", + "schema": "operations", + "table": "client" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempt_key", + "entityType": "columns", + "schema": "operations", + "table": "client" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "registered_at", + "entityType": "columns", + "schema": "operations", + "table": "client" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "projects", + "table": "app_access" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "project_id", + "entityType": "columns", + "schema": "projects", + "table": "app_access" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "person_id", + "entityType": "columns", + "schema": "projects", + "table": "app_access" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "role", + "entityType": "columns", + "schema": "projects", + "table": "app_access" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "statement_timestamp()", + "generated": null, + "identity": null, + "name": "granted_at", + "entityType": "columns", + "schema": "projects", + "table": "app_access" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "projects", + "table": "company_database" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "state", + "entityType": "columns", + "schema": "projects", + "table": "company_database" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "neon_project_id", + "entityType": "columns", + "schema": "projects", + "table": "company_database" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimed_until", + "entityType": "columns", + "schema": "projects", + "table": "company_database" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "host", + "entityType": "columns", + "schema": "projects", + "table": "company_database" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "projects", + "table": "project" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "projects", + "table": "project" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "projects", + "table": "project" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempt_key", + "entityType": "columns", + "schema": "projects", + "table": "project" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "projects", + "table": "project" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "host_label", + "entityType": "columns", + "schema": "projects", + "table": "project" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deleting_since", + "entityType": "columns", + "schema": "projects", + "table": "project" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "requests", + "table": "request" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempt_key", + "entityType": "columns", + "schema": "requests", + "table": "request" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "requests", + "table": "request" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requested_by", + "entityType": "columns", + "schema": "requests", + "table": "request" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "project_id", + "entityType": "columns", + "schema": "requests", + "table": "request" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "kind", + "entityType": "columns", + "schema": "requests", + "table": "request" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "number", + "entityType": "columns", + "schema": "requests", + "table": "request" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "message", + "entityType": "columns", + "schema": "requests", + "table": "request" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "state", + "entityType": "columns", + "schema": "requests", + "table": "request" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "decided_by", + "entityType": "columns", + "schema": "requests", + "table": "request" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "reason", + "entityType": "columns", + "schema": "requests", + "table": "request" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "requests", + "table": "request" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": { + "type": "always", + "name": "starts_id_seq", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "9223372036854775807", + "cache": 1, + "cycle": false + }, + "name": "id", + "entityType": "columns", + "schema": "hub", + "table": "starts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "version", + "entityType": "columns", + "schema": "hub", + "table": "starts" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "started_at", + "entityType": "columns", + "schema": "hub", + "table": "starts" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "company_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "connector_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lower(\"name\" collate \"und-x-icu\")", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "connection_name_key", + "entityType": "indexes", + "schema": "connectors", + "table": "connection" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "connector_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "account_ref", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"account_ref\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "connection_account_key", + "entityType": "indexes", + "schema": "connectors", + "table": "connection" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "project_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "connector_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"exclusive\"", + "with": "", + "method": "btree", + "concurrently": false, + "name": "project_connection_one_key", + "entityType": "indexes", + "schema": "connectors", + "table": "project_connection" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "company_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"state\" = 'OPEN'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "copy_proposal_open_name_key", + "entityType": "indexes", + "schema": "copies", + "table": "copy_proposal" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "copy_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"ended_at\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "copy_run_open_key", + "entityType": "indexes", + "schema": "copies", + "table": "copy_run" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "copy_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "started_at", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "copy_run_copy_started_idx", + "entityType": "indexes", + "schema": "copies", + "table": "copy_run" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "user_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "account_user_id_idx", + "entityType": "indexes", + "schema": "auth", + "table": "account" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "company_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lower(\"email\")", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "coalesce(\"project_id\", '')", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"status\" = 'pending'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "invitation_pending_email_key", + "entityType": "indexes", + "schema": "auth", + "table": "invitation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "email", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "invitation_email_idx", + "entityType": "indexes", + "schema": "auth", + "table": "invitation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "user_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "member_user_id_idx", + "entityType": "indexes", + "schema": "auth", + "table": "member" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "company_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "role", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "organization_role_company_id_role_key", + "entityType": "indexes", + "schema": "auth", + "table": "organization_role" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "company_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "attempt_key", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "organization_role_company_id_attempt_key_key", + "entityType": "indexes", + "schema": "auth", + "table": "organization_role" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "user_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "session_user_id_idx", + "entityType": "indexes", + "schema": "auth", + "table": "session" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "identifier", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "verification_identifier_idx", + "entityType": "indexes", + "schema": "auth", + "table": "verification" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "company_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "person_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "created_at", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "notification_person_created", + "entityType": "indexes", + "schema": "notifications", + "table": "notification" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "company_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "person_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "created_at", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "request_notice_person_created", + "entityType": "indexes", + "schema": "notifications", + "table": "request_notice" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "company_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lower(\"name\" collate \"und-x-icu\")", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "project_company_name_key", + "entityType": "indexes", + "schema": "projects", + "table": "project" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "company_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "project_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"state\" = 'PENDING'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "request_open_key", + "entityType": "indexes", + "schema": "requests", + "table": "request" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "agent_company_id_fkey", + "entityType": "fks", + "schema": "builder", + "table": "agent" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "project_id" + ], + "schemaTo": "projects", + "tableTo": "project", + "columnsTo": [ + "company_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "agent_project_fkey", + "entityType": "fks", + "schema": "builder", + "table": "agent" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "id", + "active_version" + ], + "schemaTo": "builder", + "tableTo": "agent_version", + "columnsTo": [ + "company_id", + "agent_id", + "number" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "name": "agent_active_version_fkey", + "entityType": "fks", + "schema": "builder", + "table": "agent" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "agent_conversation_company_id_fkey", + "entityType": "fks", + "schema": "builder", + "table": "agent_conversation" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "agent_id" + ], + "schemaTo": "builder", + "tableTo": "agent", + "columnsTo": [ + "company_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "agent_conversation_agent_fkey", + "entityType": "fks", + "schema": "builder", + "table": "agent_conversation" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "person_id" + ], + "schemaTo": "auth", + "tableTo": "member", + "columnsTo": [ + "company_id", + "user_id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "agent_conversation_member_fkey", + "entityType": "fks", + "schema": "builder", + "table": "agent_conversation" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "agent_id" + ], + "schemaTo": "builder", + "tableTo": "agent", + "columnsTo": [ + "company_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "agent_tool_agent_fkey", + "entityType": "fks", + "schema": "builder", + "table": "agent_tool" + }, + { + "nameExplicit": true, + "columns": [ + "tool_id", + "tool_version_id" + ], + "schemaTo": "builder", + "tableTo": "tool_version", + "columnsTo": [ + "tool_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "name": "agent_tool_tool_version_fkey", + "entityType": "fks", + "schema": "builder", + "table": "agent_tool" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "tool_version_id" + ], + "schemaTo": "builder", + "tableTo": "tool_version", + "columnsTo": [ + "company_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "name": "agent_tool_company_tool_version_fkey", + "entityType": "fks", + "schema": "builder", + "table": "agent_tool" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "agent_id" + ], + "schemaTo": "builder", + "tableTo": "agent", + "columnsTo": [ + "company_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "agent_version_agent_fkey", + "entityType": "fks", + "schema": "builder", + "table": "agent_version" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "agent_id", + "number" + ], + "schemaTo": "builder", + "tableTo": "agent_version", + "columnsTo": [ + "company_id", + "agent_id", + "number" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "agent_version_tool_agent_version_fkey", + "entityType": "fks", + "schema": "builder", + "table": "agent_version_tool" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "tool_version_id" + ], + "schemaTo": "builder", + "tableTo": "tool_version", + "columnsTo": [ + "company_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "name": "agent_version_tool_tool_version_fkey", + "entityType": "fks", + "schema": "builder", + "table": "agent_version_tool" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "assistant_conversation_company_id_fkey", + "entityType": "fks", + "schema": "builder", + "table": "assistant_conversation" + }, + { + "nameExplicit": true, + "columns": [ + "project_id" + ], + "schemaTo": "projects", + "tableTo": "project", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "assistant_conversation_project_id_fkey", + "entityType": "fks", + "schema": "builder", + "table": "assistant_conversation" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "person_id" + ], + "schemaTo": "auth", + "tableTo": "member", + "columnsTo": [ + "company_id", + "user_id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "assistant_conversation_member_fkey", + "entityType": "fks", + "schema": "builder", + "table": "assistant_conversation" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "conversation_company_id_fkey", + "entityType": "fks", + "schema": "builder", + "table": "conversation" + }, + { + "nameExplicit": true, + "columns": [ + "project_id" + ], + "schemaTo": "projects", + "tableTo": "project", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "conversation_project_id_fkey", + "entityType": "fks", + "schema": "builder", + "table": "conversation" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "person_id" + ], + "schemaTo": "auth", + "tableTo": "member", + "columnsTo": [ + "company_id", + "user_id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "conversation_member_fkey", + "entityType": "fks", + "schema": "builder", + "table": "conversation" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "company_account_kind_company_id_fkey", + "entityType": "fks", + "schema": "builder", + "table": "company_account_kind" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "company_model_company_id_fkey", + "entityType": "fks", + "schema": "builder", + "table": "company_model" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "company_model_fallback_company_id_fkey", + "entityType": "fks", + "schema": "builder", + "table": "company_model_fallback" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "model_account_company_id_fkey", + "entityType": "fks", + "schema": "builder", + "table": "model_account" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "person_id" + ], + "schemaTo": "auth", + "tableTo": "member", + "columnsTo": [ + "company_id", + "user_id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "model_account_member_fkey", + "entityType": "fks", + "schema": "builder", + "table": "model_account" + }, + { + "nameExplicit": true, + "columns": [ + "account_id" + ], + "schemaTo": "builder", + "tableTo": "model_account", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "model_account_assignee_account_id_fkey", + "entityType": "fks", + "schema": "builder", + "table": "model_account_assignee" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "person_id" + ], + "schemaTo": "auth", + "tableTo": "member", + "columnsTo": [ + "company_id", + "user_id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "model_account_assignee_member_fkey", + "entityType": "fks", + "schema": "builder", + "table": "model_account_assignee" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "person_id" + ], + "schemaTo": "auth", + "tableTo": "member", + "columnsTo": [ + "company_id", + "user_id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "model_account_sign_in_member_fkey", + "entityType": "fks", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "observational_memory_models_company_id_fkey", + "entityType": "fks", + "schema": "builder", + "table": "observational_memory_models" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "person_id" + ], + "schemaTo": "auth", + "tableTo": "member", + "columnsTo": [ + "company_id", + "user_id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "person_model_default_member_fkey", + "entityType": "fks", + "schema": "builder", + "table": "person_model_default" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "tool_company_id_fkey", + "entityType": "fks", + "schema": "builder", + "table": "tool" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "tool_id" + ], + "schemaTo": "builder", + "tableTo": "tool", + "columnsTo": [ + "company_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "tool_version_tool_fkey", + "entityType": "fks", + "schema": "builder", + "table": "tool_version" + }, + { + "nameExplicit": true, + "columns": [ + "project_id" + ], + "schemaTo": "projects", + "tableTo": "project", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "app_project_id_fkey", + "entityType": "fks", + "schema": "apps", + "table": "app" + }, + { + "nameExplicit": true, + "columns": [ + "project_id", + "live_version_id" + ], + "schemaTo": "apps", + "tableTo": "app_version", + "columnsTo": [ + "project_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "name": "app_live_version_fkey", + "entityType": "fks", + "schema": "apps", + "table": "app" + }, + { + "nameExplicit": true, + "columns": [ + "project_id", + "published_version_id" + ], + "schemaTo": "apps", + "tableTo": "app_version", + "columnsTo": [ + "project_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "name": "app_published_version_fkey", + "entityType": "fks", + "schema": "apps", + "table": "app" + }, + { + "nameExplicit": true, + "columns": [ + "project_id", + "sending_version_id" + ], + "schemaTo": "apps", + "tableTo": "app_version", + "columnsTo": [ + "project_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "name": "app_sending_version_fkey", + "entityType": "fks", + "schema": "apps", + "table": "app" + }, + { + "nameExplicit": true, + "columns": [ + "hub_session_id" + ], + "schemaTo": "auth", + "tableTo": "session", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "app_session_hub_session_id_fkey", + "entityType": "fks", + "schema": "apps", + "table": "app_session" + }, + { + "nameExplicit": true, + "columns": [ + "project_id" + ], + "schemaTo": "apps", + "tableTo": "app", + "columnsTo": [ + "project_id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "app_version_project_id_fkey", + "entityType": "fks", + "schema": "apps", + "table": "app_version" + }, + { + "nameExplicit": true, + "columns": [ + "hub_session_id" + ], + "schemaTo": "auth", + "tableTo": "session", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "handoff_hub_session_id_fkey", + "entityType": "fks", + "schema": "apps", + "table": "handoff" + }, + { + "nameExplicit": true, + "columns": [ + "version_id" + ], + "schemaTo": "apps", + "tableTo": "app_version", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "version_file_version_id_fkey", + "entityType": "fks", + "schema": "apps", + "table": "version_file" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "sha256" + ], + "schemaTo": "apps", + "tableTo": "blob", + "columnsTo": [ + "company_id", + "sha256" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "name": "version_file_blob_fkey", + "entityType": "fks", + "schema": "apps", + "table": "version_file" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "connection_company_id_fkey", + "entityType": "fks", + "schema": "connectors", + "table": "connection" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "person_id" + ], + "schemaTo": "auth", + "tableTo": "member", + "columnsTo": [ + "company_id", + "user_id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "connection_sign_in_member_fkey", + "entityType": "fks", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "connector_id", + "connection_id" + ], + "schemaTo": "connectors", + "tableTo": "connection", + "columnsTo": [ + "company_id", + "connector_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "connection_sign_in_company_id_connector_id_connection_id_fkey", + "entityType": "fks", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "connector_write_company_id_fkey", + "entityType": "fks", + "schema": "connectors", + "table": "connector_write" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "connector_id", + "connection_id" + ], + "schemaTo": "connectors", + "tableTo": "connection", + "columnsTo": [ + "company_id", + "connector_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "project_connection_connection_fkey", + "entityType": "fks", + "schema": "connectors", + "table": "project_connection" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "project_id" + ], + "schemaTo": "projects", + "tableTo": "project", + "columnsTo": [ + "company_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "project_connection_project_fkey", + "entityType": "fks", + "schema": "connectors", + "table": "project_connection" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "copy_company_id_fkey", + "entityType": "fks", + "schema": "copies", + "table": "copy" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "connector_id", + "connection_id" + ], + "schemaTo": "connectors", + "tableTo": "connection", + "columnsTo": [ + "company_id", + "connector_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "copy_connection_fkey", + "entityType": "fks", + "schema": "copies", + "table": "copy" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "copy_proposal_company_id_fkey", + "entityType": "fks", + "schema": "copies", + "table": "copy_proposal" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "connector_id", + "connection_id" + ], + "schemaTo": "connectors", + "tableTo": "connection", + "columnsTo": [ + "company_id", + "connector_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "copy_proposal_connection_fkey", + "entityType": "fks", + "schema": "copies", + "table": "copy_proposal" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "project_id" + ], + "schemaTo": "projects", + "tableTo": "project", + "columnsTo": [ + "company_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "copy_proposal_project_fkey", + "entityType": "fks", + "schema": "copies", + "table": "copy_proposal" + }, + { + "nameExplicit": true, + "columns": [ + "copy_id" + ], + "schemaTo": "copies", + "tableTo": "copy", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "copy_proposal_copy_fkey", + "entityType": "fks", + "schema": "copies", + "table": "copy_proposal" + }, + { + "nameExplicit": true, + "columns": [ + "proposal_id" + ], + "schemaTo": "copies", + "tableTo": "copy_proposal", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "copy_proposal_source_proposal_fkey", + "entityType": "fks", + "schema": "copies", + "table": "copy_proposal_source" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "connector_id", + "connection_id" + ], + "schemaTo": "connectors", + "tableTo": "connection", + "columnsTo": [ + "company_id", + "connector_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "copy_proposal_source_connection_fkey", + "entityType": "fks", + "schema": "copies", + "table": "copy_proposal_source" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "copy_id" + ], + "schemaTo": "copies", + "tableTo": "copy", + "columnsTo": [ + "company_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "copy_run_copy_fkey", + "entityType": "fks", + "schema": "copies", + "table": "copy_run" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "copy_id" + ], + "schemaTo": "copies", + "tableTo": "copy", + "columnsTo": [ + "company_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "copy_source_copy_fkey", + "entityType": "fks", + "schema": "copies", + "table": "copy_source" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "connector_id", + "connection_id" + ], + "schemaTo": "connectors", + "tableTo": "connection", + "columnsTo": [ + "company_id", + "connector_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "copy_source_connection_fkey", + "entityType": "fks", + "schema": "copies", + "table": "copy_source" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "copy_table_left_company_id_fkey", + "entityType": "fks", + "schema": "copies", + "table": "copy_table_left" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "project_id" + ], + "schemaTo": "projects", + "tableTo": "project", + "columnsTo": [ + "company_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "project_copy_project_fkey", + "entityType": "fks", + "schema": "copies", + "table": "project_copy" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "copy_id" + ], + "schemaTo": "copies", + "tableTo": "copy", + "columnsTo": [ + "company_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "project_copy_copy_fkey", + "entityType": "fks", + "schema": "copies", + "table": "project_copy" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "account_user_id_user_id_fkey", + "entityType": "fks", + "schema": "auth", + "table": "account" + }, + { + "nameExplicit": false, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "RESTRICT", + "name": "invitation_company_id_company_id_fkey", + "entityType": "fks", + "schema": "auth", + "table": "invitation" + }, + { + "nameExplicit": false, + "columns": [ + "inviter_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "RESTRICT", + "name": "invitation_inviter_id_user_id_fkey", + "entityType": "fks", + "schema": "auth", + "table": "invitation" + }, + { + "nameExplicit": false, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "RESTRICT", + "name": "member_company_id_company_id_fkey", + "entityType": "fks", + "schema": "auth", + "table": "member" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "RESTRICT", + "name": "member_user_id_user_id_fkey", + "entityType": "fks", + "schema": "auth", + "table": "member" + }, + { + "nameExplicit": false, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "organization_role_company_id_company_id_fkey", + "entityType": "fks", + "schema": "auth", + "table": "organization_role" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "session_user_id_user_id_fkey", + "entityType": "fks", + "schema": "auth", + "table": "session" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "notification_company_id_fkey", + "entityType": "fks", + "schema": "notifications", + "table": "notification" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "person_id" + ], + "schemaTo": "auth", + "tableTo": "member", + "columnsTo": [ + "company_id", + "user_id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "notification_member_fkey", + "entityType": "fks", + "schema": "notifications", + "table": "notification" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "person_id" + ], + "schemaTo": "auth", + "tableTo": "member", + "columnsTo": [ + "company_id", + "user_id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "request_notice_member_fkey", + "entityType": "fks", + "schema": "notifications", + "table": "request_notice" + }, + { + "nameExplicit": true, + "columns": [ + "request_id" + ], + "schemaTo": "requests", + "tableTo": "request", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "request_notice_request_id_fkey", + "entityType": "fks", + "schema": "notifications", + "table": "request_notice" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "project_id" + ], + "schemaTo": "projects", + "tableTo": "project", + "columnsTo": [ + "company_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "app_access_company_id_project_id_fkey", + "entityType": "fks", + "schema": "projects", + "table": "app_access" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "request_company_id_fkey", + "entityType": "fks", + "schema": "requests", + "table": "request" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "requested_by" + ], + "schemaTo": "auth", + "tableTo": "member", + "columnsTo": [ + "company_id", + "user_id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "request_member_fkey", + "entityType": "fks", + "schema": "requests", + "table": "request" + }, + { + "nameExplicit": true, + "columns": [ + "project_id" + ], + "schemaTo": "projects", + "tableTo": "project", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "request_project_id_fkey", + "entityType": "fks", + "schema": "requests", + "table": "request" + }, + { + "columns": [ + "agent_id", + "tool_version_id" + ], + "nameExplicit": true, + "name": "agent_tool_pkey", + "entityType": "pks", + "schema": "builder", + "table": "agent_tool" + }, + { + "columns": [ + "agent_id", + "number" + ], + "nameExplicit": true, + "name": "agent_version_pkey", + "entityType": "pks", + "schema": "builder", + "table": "agent_version" + }, + { + "columns": [ + "agent_id", + "number", + "tool_version_id" + ], + "nameExplicit": true, + "name": "agent_version_tool_pkey", + "entityType": "pks", + "schema": "builder", + "table": "agent_version_tool" + }, + { + "columns": [ + "company_id", + "kind" + ], + "nameExplicit": false, + "name": "company_account_kind_pkey", + "entityType": "pks", + "schema": "builder", + "table": "company_account_kind" + }, + { + "columns": [ + "account_id", + "person_id" + ], + "nameExplicit": false, + "name": "model_account_assignee_pkey", + "entityType": "pks", + "schema": "builder", + "table": "model_account_assignee" + }, + { + "columns": [ + "company_id", + "person_id" + ], + "nameExplicit": false, + "name": "person_model_default_pkey", + "entityType": "pks", + "schema": "builder", + "table": "person_model_default" + }, + { + "columns": [ + "company_id", + "sha256" + ], + "nameExplicit": true, + "name": "blob_pkey", + "entityType": "pks", + "schema": "apps", + "table": "blob" + }, + { + "columns": [ + "version_id", + "path" + ], + "nameExplicit": true, + "name": "version_file_pkey", + "entityType": "pks", + "schema": "apps", + "table": "version_file" + }, + { + "columns": [ + "company_id", + "thread_id", + "tool_call_id" + ], + "nameExplicit": false, + "name": "connector_write_pkey", + "entityType": "pks", + "schema": "connectors", + "table": "connector_write" + }, + { + "columns": [ + "project_id", + "connection_id" + ], + "nameExplicit": false, + "name": "project_connection_pkey", + "entityType": "pks", + "schema": "connectors", + "table": "project_connection" + }, + { + "columns": [ + "proposal_id", + "connection_id" + ], + "nameExplicit": false, + "name": "copy_proposal_source_pkey", + "entityType": "pks", + "schema": "copies", + "table": "copy_proposal_source" + }, + { + "columns": [ + "copy_id", + "connection_id" + ], + "nameExplicit": false, + "name": "copy_source_pkey", + "entityType": "pks", + "schema": "copies", + "table": "copy_source" + }, + { + "columns": [ + "company_id", + "copy_id" + ], + "nameExplicit": false, + "name": "copy_table_left_pkey", + "entityType": "pks", + "schema": "copies", + "table": "copy_table_left" + }, + { + "columns": [ + "project_id", + "copy_id" + ], + "nameExplicit": false, + "name": "project_copy_pkey", + "entityType": "pks", + "schema": "copies", + "table": "project_copy" + }, + { + "columns": [ + "project_id", + "person_id" + ], + "nameExplicit": false, + "name": "app_access_pkey", + "entityType": "pks", + "schema": "projects", + "table": "app_access" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "agent_pkey", + "schema": "builder", + "table": "agent", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "agent_conversation_pkey", + "schema": "builder", + "table": "agent_conversation", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "assistant_conversation_pkey", + "schema": "builder", + "table": "assistant_conversation", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "conversation_pkey", + "schema": "builder", + "table": "conversation", + "entityType": "pks" + }, + { + "columns": [ + "company_id" + ], + "nameExplicit": false, + "name": "company_model_pkey", + "schema": "builder", + "table": "company_model", + "entityType": "pks" + }, + { + "columns": [ + "company_id" + ], + "nameExplicit": false, + "name": "company_model_fallback_pkey", + "schema": "builder", + "table": "company_model_fallback", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "model_account_pkey", + "schema": "builder", + "table": "model_account", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "model_account_sign_in_pkey", + "schema": "builder", + "table": "model_account_sign_in", + "entityType": "pks" + }, + { + "columns": [ + "company_id" + ], + "nameExplicit": false, + "name": "observational_memory_models_pkey", + "schema": "builder", + "table": "observational_memory_models", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "tool_pkey", + "schema": "builder", + "table": "tool", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "tool_version_pkey", + "schema": "builder", + "table": "tool_version", + "entityType": "pks" + }, + { + "columns": [ + "project_id" + ], + "nameExplicit": false, + "name": "app_pkey", + "schema": "apps", + "table": "app", + "entityType": "pks" + }, + { + "columns": [ + "token_hash" + ], + "nameExplicit": false, + "name": "app_session_pkey", + "schema": "apps", + "table": "app_session", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "app_version_pkey", + "schema": "apps", + "table": "app_version", + "entityType": "pks" + }, + { + "columns": [ + "code_hash" + ], + "nameExplicit": false, + "name": "handoff_pkey", + "schema": "apps", + "table": "handoff", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "connection_pkey", + "schema": "connectors", + "table": "connection", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "connection_sign_in_pkey", + "schema": "connectors", + "table": "connection_sign_in", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "copy_pkey", + "schema": "copies", + "table": "copy", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "copy_proposal_pkey", + "schema": "copies", + "table": "copy_proposal", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "copy_run_pkey", + "schema": "copies", + "table": "copy_run", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "account_pkey", + "schema": "auth", + "table": "account", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "company_pkey", + "schema": "auth", + "table": "company", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "invitation_pkey", + "schema": "auth", + "table": "invitation", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "member_pkey", + "schema": "auth", + "table": "member", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "organization_role_pkey", + "schema": "auth", + "table": "organization_role", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "rate_limit_pkey", + "schema": "auth", + "table": "rate_limit", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "session_pkey", + "schema": "auth", + "table": "session", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "user_pkey", + "schema": "auth", + "table": "user", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "verification_pkey", + "schema": "auth", + "table": "verification", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "notification_pkey", + "schema": "notifications", + "table": "notification", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "request_notice_pkey", + "schema": "notifications", + "table": "request_notice", + "entityType": "pks" + }, + { + "columns": [ + "company_id" + ], + "nameExplicit": false, + "name": "client_pkey", + "schema": "operations", + "table": "client", + "entityType": "pks" + }, + { + "columns": [ + "company_id" + ], + "nameExplicit": false, + "name": "company_database_pkey", + "schema": "projects", + "table": "company_database", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "project_pkey", + "schema": "projects", + "table": "project", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "request_pkey", + "schema": "requests", + "table": "request", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "starts_pkey", + "schema": "hub", + "table": "starts", + "entityType": "pks" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "id" + ], + "nullsNotDistinct": false, + "name": "agent_company_id_id_key", + "entityType": "uniques", + "schema": "builder", + "table": "agent" + }, + { + "nameExplicit": true, + "columns": [ + "agent_id", + "tool_id" + ], + "nullsNotDistinct": false, + "name": "agent_tool_agent_id_tool_id_key", + "entityType": "uniques", + "schema": "builder", + "table": "agent_tool" + }, + { + "nameExplicit": true, + "columns": [ + "agent_id", + "source_revision" + ], + "nullsNotDistinct": false, + "name": "agent_version_agent_id_source_revision_key", + "entityType": "uniques", + "schema": "builder", + "table": "agent_version" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "agent_id", + "number" + ], + "nullsNotDistinct": false, + "name": "agent_version_company_id_agent_id_number_key", + "entityType": "uniques", + "schema": "builder", + "table": "agent_version" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "person_id", + "attempt_key" + ], + "nullsNotDistinct": false, + "name": "conversation_attempt_key", + "entityType": "uniques", + "schema": "builder", + "table": "conversation" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "attempt_key" + ], + "nullsNotDistinct": false, + "name": "model_account_attempt_key", + "entityType": "uniques", + "schema": "builder", + "table": "model_account" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "slug" + ], + "nullsNotDistinct": false, + "name": "tool_company_id_slug_key", + "entityType": "uniques", + "schema": "builder", + "table": "tool" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "id" + ], + "nullsNotDistinct": false, + "name": "tool_company_id_id_key", + "entityType": "uniques", + "schema": "builder", + "table": "tool" + }, + { + "nameExplicit": true, + "columns": [ + "tool_id", + "number" + ], + "nullsNotDistinct": false, + "name": "tool_version_tool_id_number_key", + "entityType": "uniques", + "schema": "builder", + "table": "tool_version" + }, + { + "nameExplicit": true, + "columns": [ + "tool_id", + "id" + ], + "nullsNotDistinct": false, + "name": "tool_version_tool_id_id_key", + "entityType": "uniques", + "schema": "builder", + "table": "tool_version" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "id" + ], + "nullsNotDistinct": false, + "name": "tool_version_company_id_id_key", + "entityType": "uniques", + "schema": "builder", + "table": "tool_version" + }, + { + "nameExplicit": true, + "columns": [ + "project_id", + "number" + ], + "nullsNotDistinct": false, + "name": "app_version_project_id_number_key", + "entityType": "uniques", + "schema": "apps", + "table": "app_version" + }, + { + "nameExplicit": true, + "columns": [ + "project_id", + "attempt_key" + ], + "nullsNotDistinct": false, + "name": "app_version_project_id_attempt_key_key", + "entityType": "uniques", + "schema": "apps", + "table": "app_version" + }, + { + "nameExplicit": true, + "columns": [ + "project_id", + "id" + ], + "nullsNotDistinct": false, + "name": "app_version_project_id_id_key", + "entityType": "uniques", + "schema": "apps", + "table": "app_version" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "attempt_key" + ], + "nullsNotDistinct": false, + "name": "connection_attempt_key", + "entityType": "uniques", + "schema": "connectors", + "table": "connection" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "connector_id", + "id" + ], + "nullsNotDistinct": false, + "name": "connection_company_connector_id_key", + "entityType": "uniques", + "schema": "connectors", + "table": "connection" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "name" + ], + "nullsNotDistinct": false, + "name": "copy_company_id_name_key", + "entityType": "uniques", + "schema": "copies", + "table": "copy" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "attempt_key" + ], + "nullsNotDistinct": false, + "name": "copy_company_id_attempt_key_key", + "entityType": "uniques", + "schema": "copies", + "table": "copy" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "id" + ], + "nullsNotDistinct": false, + "name": "copy_company_id_id_key", + "entityType": "uniques", + "schema": "copies", + "table": "copy" + }, + { + "nameExplicit": true, + "columns": [ + "copy_id", + "account_ref" + ], + "nullsNotDistinct": false, + "name": "copy_source_copy_id_account_ref_key", + "entityType": "uniques", + "schema": "copies", + "table": "copy_source" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "attempt_key" + ], + "nullsNotDistinct": false, + "name": "invitation_company_id_attempt_key_key", + "entityType": "uniques", + "schema": "auth", + "table": "invitation" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "user_id" + ], + "nullsNotDistinct": false, + "name": "member_company_id_user_id_key", + "entityType": "uniques", + "schema": "auth", + "table": "member" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "run_id" + ], + "nullsNotDistinct": false, + "name": "notification_run_key", + "entityType": "uniques", + "schema": "notifications", + "table": "notification" + }, + { + "nameExplicit": true, + "columns": [ + "request_id", + "person_id", + "kind" + ], + "nullsNotDistinct": false, + "name": "request_notice_key", + "entityType": "uniques", + "schema": "notifications", + "table": "request_notice" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "attempt_key" + ], + "nullsNotDistinct": false, + "name": "project_company_id_attempt_key_key", + "entityType": "uniques", + "schema": "projects", + "table": "project" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "id" + ], + "nullsNotDistinct": false, + "name": "project_company_id_id_key", + "entityType": "uniques", + "schema": "projects", + "table": "project" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "attempt_key" + ], + "nullsNotDistinct": false, + "name": "request_attempt_key", + "entityType": "uniques", + "schema": "requests", + "table": "request" + }, + { + "nameExplicit": false, + "columns": [ + "slug" + ], + "nullsNotDistinct": false, + "name": "company_slug_key", + "schema": "auth", + "table": "company", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "attempt_key" + ], + "nullsNotDistinct": false, + "name": "company_attempt_key_key", + "schema": "auth", + "table": "company", + "entityType": "uniques" + }, + { + "nameExplicit": true, + "columns": [ + "nickname" + ], + "nullsNotDistinct": false, + "name": "company_nickname_key", + "schema": "auth", + "table": "company", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "key" + ], + "nullsNotDistinct": false, + "name": "rate_limit_key_key", + "schema": "auth", + "table": "rate_limit", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "token" + ], + "nullsNotDistinct": false, + "name": "session_token_key", + "schema": "auth", + "table": "session", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "email" + ], + "nullsNotDistinct": false, + "name": "user_email_key", + "schema": "auth", + "table": "user", + "entityType": "uniques" + }, + { + "nameExplicit": true, + "columns": [ + "cnpj" + ], + "nullsNotDistinct": false, + "name": "client_cnpj_key", + "schema": "operations", + "table": "client", + "entityType": "uniques" + }, + { + "nameExplicit": true, + "columns": [ + "attempt_key" + ], + "nullsNotDistinct": false, + "name": "client_attempt_key_key", + "schema": "operations", + "table": "client", + "entityType": "uniques" + }, + { + "nameExplicit": true, + "columns": [ + "neon_project_id" + ], + "nullsNotDistinct": false, + "name": "company_database_neon_project_id_key", + "schema": "projects", + "table": "company_database", + "entityType": "uniques" + }, + { + "nameExplicit": true, + "columns": [ + "host_label" + ], + "nullsNotDistinct": false, + "name": "project_host_label_key", + "schema": "projects", + "table": "project", + "entityType": "uniques" + }, + { + "value": "\"revision\" > 0", + "name": "agent_revision_positive", + "entityType": "checks", + "schema": "builder", + "table": "agent" + }, + { + "value": "\"approval\" in ('ASK', 'AUTO')", + "name": "agent_tool_approval", + "entityType": "checks", + "schema": "builder", + "table": "agent_tool" + }, + { + "value": "\"number\" > 0", + "name": "agent_version_number_positive", + "entityType": "checks", + "schema": "builder", + "table": "agent_version" + }, + { + "value": "\"approval\" in ('ASK', 'AUTO')", + "name": "agent_version_tool_approval", + "entityType": "checks", + "schema": "builder", + "table": "agent_version_tool" + }, + { + "value": "\"kind\" IN ('claude_subscription', 'google_cliproxy', 'openai_codex')", + "name": "company_account_kind_kind", + "entityType": "checks", + "schema": "builder", + "table": "company_account_kind" + }, + { + "value": "\"effort\" IN ('off', 'low', 'medium', 'high', 'xhigh', 'max')", + "name": "company_model_effort", + "entityType": "checks", + "schema": "builder", + "table": "company_model" + }, + { + "value": "\"kind\" IN ('api_key', 'claude_subscription', 'google_cliproxy', 'openai_codex')", + "name": "model_account_kind", + "entityType": "checks", + "schema": "builder", + "table": "model_account" + }, + { + "value": "\"state\" IN ('ready', 'paused', 'refused')", + "name": "model_account_state", + "entityType": "checks", + "schema": "builder", + "table": "model_account" + }, + { + "value": "char_length(\"label\") BETWEEN 1 AND 60", + "name": "model_account_label_length", + "entityType": "checks", + "schema": "builder", + "table": "model_account" + }, + { + "value": "\"position\" >= 0", + "name": "model_account_position", + "entityType": "checks", + "schema": "builder", + "table": "model_account" + }, + { + "value": "(\"kind\" = 'api_key') = (\"hint\" IS NOT NULL)", + "name": "model_account_hint", + "entityType": "checks", + "schema": "builder", + "table": "model_account" + }, + { + "value": "\"owner\" IN ('company', 'me')", + "name": "model_account_sign_in_owner", + "entityType": "checks", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "value": "\"kind\" IN ('claude_subscription', 'google_cliproxy', 'openai_codex')", + "name": "model_account_sign_in_kind", + "entityType": "checks", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "value": "char_length(\"label\") BETWEEN 1 AND 60", + "name": "model_account_sign_in_label_length", + "entityType": "checks", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "value": "\"effort\" IN ('off', 'low', 'medium', 'high', 'xhigh', 'max')", + "name": "person_model_default_effort", + "entityType": "checks", + "schema": "builder", + "table": "person_model_default" + }, + { + "value": "\"kind\" in ('PRESET', 'CODE')", + "name": "tool_kind", + "entityType": "checks", + "schema": "builder", + "table": "tool" + }, + { + "value": "(\"kind\" = 'PRESET') = (\"operation\" is not null)", + "name": "tool_operation_by_kind", + "entityType": "checks", + "schema": "builder", + "table": "tool" + }, + { + "value": "(\"sending_version_id\" IS NULL) = (\"claimed_until\" IS NULL)", + "name": "app_sending_has_claim", + "entityType": "checks", + "schema": "apps", + "table": "app" + }, + { + "value": "\"environment\" IN ('preview', 'published')", + "name": "app_session_environment", + "entityType": "checks", + "schema": "apps", + "table": "app_session" + }, + { + "value": "\"state\" IN ('sending', 'ready', 'failed', 'pruning')", + "name": "app_version_state", + "entityType": "checks", + "schema": "apps", + "table": "app_version" + }, + { + "value": "\"state\" <> 'failed' OR \"failure\" IS NOT NULL", + "name": "app_version_failed_has_failure", + "entityType": "checks", + "schema": "apps", + "table": "app_version" + }, + { + "value": "\"number\" > 0", + "name": "app_version_number_positive", + "entityType": "checks", + "schema": "apps", + "table": "app_version" + }, + { + "value": "\"digest\" ~ '^[0-9a-f]{64}$'", + "name": "app_version_digest_form", + "entityType": "checks", + "schema": "apps", + "table": "app_version" + }, + { + "value": "\"sha256\" ~ '^[0-9a-f]{64}$'", + "name": "blob_sha256_form", + "entityType": "checks", + "schema": "apps", + "table": "blob" + }, + { + "value": "octet_length(\"bytes\") <= 10485760", + "name": "blob_size", + "entityType": "checks", + "schema": "apps", + "table": "blob" + }, + { + "value": "\"environment\" IN ('preview', 'published')", + "name": "handoff_environment", + "entityType": "checks", + "schema": "apps", + "table": "handoff" + }, + { + "value": "\"size\" BETWEEN 0 AND 10485760", + "name": "version_file_size", + "entityType": "checks", + "schema": "apps", + "table": "version_file" + }, + { + "value": "char_length(\"name\") BETWEEN 1 AND 60 AND \"name\" = btrim(\"name\")", + "name": "connection_name", + "entityType": "checks", + "schema": "connectors", + "table": "connection" + }, + { + "value": "\"state\" IN ('NEW', 'ACTIVE', 'NEEDS_REAUTH')", + "name": "connection_state", + "entityType": "checks", + "schema": "connectors", + "table": "connection" + }, + { + "value": "(\"account_ref\" IS NULL) = (\"account_label\" IS NULL)\n AND (\"account_label\" IS NULL OR char_length(\"account_label\") BETWEEN 1 AND 120)", + "name": "connection_account", + "entityType": "checks", + "schema": "connectors", + "table": "connection" + }, + { + "value": "jsonb_typeof(\"notes\") = 'object' AND octet_length(\"notes\"::text) <= 32768", + "name": "connection_notes", + "entityType": "checks", + "schema": "connectors", + "table": "connection" + }, + { + "value": "\"connector_id\" ~ '^[a-z][a-z0-9-]{1,31}$'", + "name": "connection_connector_id", + "entityType": "checks", + "schema": "connectors", + "table": "connection" + }, + { + "value": "\"name\" IS NULL OR (char_length(\"name\") BETWEEN 1 AND 60 AND \"name\" = btrim(\"name\"))", + "name": "connection_sign_in_name", + "entityType": "checks", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "value": "(\"connection_id\" IS NULL) <> (\"name\" IS NULL)\n AND (\"connection_id\" IS NULL) = (\"connection_revision\" IS NULL)", + "name": "connection_sign_in_target", + "entityType": "checks", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "value": "(\"agent_id\" is not null and \"version_number\" is not null and \"person_id\" is null) or (\"agent_id\" is null and \"version_number\" is null and \"person_id\" is not null)", + "name": "connector_write_speaker", + "entityType": "checks", + "schema": "connectors", + "table": "connector_write" + }, + { + "value": "\"state\" in ('SENDING', 'DONE', 'REFUSED', 'UNCERTAIN')", + "name": "connector_write_state", + "entityType": "checks", + "schema": "connectors", + "table": "connector_write" + }, + { + "value": "(\"claim_token\" IS NULL) = (\"claimed_until\" IS NULL)", + "name": "copy_claim", + "entityType": "checks", + "schema": "copies", + "table": "copy" + }, + { + "value": "\"name\" ~ '^[a-z][a-z0-9_]{0,39}$'", + "name": "copy_name", + "entityType": "checks", + "schema": "copies", + "table": "copy" + }, + { + "value": "jsonb_typeof(\"definition\") = 'object'", + "name": "copy_definition", + "entityType": "checks", + "schema": "copies", + "table": "copy" + }, + { + "value": "\"name\" ~ '^[a-z][a-z0-9_]{0,39}$'", + "name": "copy_proposal_name", + "entityType": "checks", + "schema": "copies", + "table": "copy_proposal" + }, + { + "value": "jsonb_typeof(\"definition\") = 'object'", + "name": "copy_proposal_definition", + "entityType": "checks", + "schema": "copies", + "table": "copy_proposal" + }, + { + "value": "\"proved_rows\" BETWEEN 0 AND 50", + "name": "copy_proposal_proved_rows", + "entityType": "checks", + "schema": "copies", + "table": "copy_proposal" + }, + { + "value": "\"state\" IN ('OPEN', 'ACCEPTED', 'DISMISSED')", + "name": "copy_proposal_state", + "entityType": "checks", + "schema": "copies", + "table": "copy_proposal" + }, + { + "value": "\"state\" = 'ACCEPTED' OR \"copy_id\" IS NULL", + "name": "copy_proposal_copy", + "entityType": "checks", + "schema": "copies", + "table": "copy_proposal" + }, + { + "value": "(\"ended_at\" IS NULL) = (\"outcome\" IS NULL)", + "name": "copy_run_ended", + "entityType": "checks", + "schema": "copies", + "table": "copy_run" + }, + { + "value": "\"outcome\" IS NULL OR \"outcome\" IN ('COMPLETE', 'PARTIAL', 'ERROR', 'INTERRUPTED')", + "name": "copy_run_outcome", + "entityType": "checks", + "schema": "copies", + "table": "copy_run" + }, + { + "value": "\"position\" IS NULL OR jsonb_typeof(\"position\") = 'object'", + "name": "copy_source_position", + "entityType": "checks", + "schema": "copies", + "table": "copy_source" + }, + { + "value": "\"name\" ~ '^[a-z][a-z0-9_]{0,39}$'", + "name": "copy_table_left_name", + "entityType": "checks", + "schema": "copies", + "table": "copy_table_left" + }, + { + "value": "\"nickname\" ~ '^[a-z0-9]+(-[a-z0-9]+)*$' and char_length(\"nickname\") BETWEEN 3 AND 30", + "name": "company_nickname_form", + "entityType": "checks", + "schema": "auth", + "table": "company" + }, + { + "value": "(\"project_id\" is null) = (\"role\" is not null)", + "name": "invitation_kind", + "entityType": "checks", + "schema": "auth", + "table": "invitation" + }, + { + "value": "\"kind\" in ('AUTOMATION_DONE', 'AUTOMATION_FAILED', 'AUTOMATION_PAUSED')", + "name": "notification_kind", + "entityType": "checks", + "schema": "notifications", + "table": "notification" + }, + { + "value": "\"kind\" <> 'AUTOMATION_DONE' or (\"conversation_id\" is not null and \"failure_code\" is null)", + "name": "notification_done", + "entityType": "checks", + "schema": "notifications", + "table": "notification" + }, + { + "value": "\"kind\" <> 'AUTOMATION_FAILED' or (\"failure_code\" is not null and \"failure_code\" in ('MODEL_NO_ACCOUNT', 'MODEL_CALL_FAILED', 'MODEL_REFUSED', 'MODEL_ANSWER_CUT', 'MACHINE_UNAVAILABLE', 'MACHINE_LOST', 'HUB_UPDATED', 'INTERNAL_UNEXPECTED', 'DATABASE_UNAVAILABLE', 'INTERRUPTED', 'SCHEDULE_PUBLISH_FAILED'))", + "name": "notification_failed", + "entityType": "checks", + "schema": "notifications", + "table": "notification" + }, + { + "value": "\"kind\" <> 'AUTOMATION_PAUSED' or (\"conversation_id\" is null and \"failure_code\" is null)", + "name": "notification_paused", + "entityType": "checks", + "schema": "notifications", + "table": "notification" + }, + { + "value": "\"kind\" in ('REQUEST_OPENED', 'REQUEST_DECIDED')", + "name": "request_notice_kind", + "entityType": "checks", + "schema": "notifications", + "table": "request_notice" + }, + { + "value": "\"cnpj\" ~ '^[0-9A-Z]{12}[0-9]{2}$'", + "name": "client_cnpj_format", + "entityType": "checks", + "schema": "operations", + "table": "client" + }, + { + "value": "char_length(\"legal_name\") BETWEEN 1 AND 150", + "name": "client_legal_name_length", + "entityType": "checks", + "schema": "operations", + "table": "client" + }, + { + "value": "\"revision\" >= 0", + "name": "client_revision_not_negative", + "entityType": "checks", + "schema": "operations", + "table": "client" + }, + { + "value": "\"state\" IN ('creating', 'ready')", + "name": "company_database_state", + "entityType": "checks", + "schema": "projects", + "table": "company_database" + }, + { + "value": "(\"state\" = 'ready') = (\"neon_project_id\" IS NOT NULL)", + "name": "company_database_ready_has_project", + "entityType": "checks", + "schema": "projects", + "table": "company_database" + }, + { + "value": "(\"state\" = 'creating') = (\"claimed_until\" IS NOT NULL)", + "name": "company_database_creating_has_claim", + "entityType": "checks", + "schema": "projects", + "table": "company_database" + }, + { + "value": "\"host_label\" ~ '^[a-z0-9]+(-[a-z0-9]+)*--[a-z0-9]+(-[a-z0-9]+)*$' and char_length(\"host_label\") <= 63", + "name": "project_host_label_form", + "entityType": "checks", + "schema": "projects", + "table": "project" + }, + { + "value": "char_length(\"name\") BETWEEN 1 AND 100", + "name": "project_name_length", + "entityType": "checks", + "schema": "projects", + "table": "project" + }, + { + "value": "\"kind\" in ('PUBLISH_APP_VERSION')", + "name": "request_kind", + "entityType": "checks", + "schema": "requests", + "table": "request" + }, + { + "value": "\"number\" > 0", + "name": "request_number", + "entityType": "checks", + "schema": "requests", + "table": "request" + }, + { + "value": "char_length(\"message\") <= 280", + "name": "request_message", + "entityType": "checks", + "schema": "requests", + "table": "request" + }, + { + "value": "\"state\" in ('PENDING', 'APPROVED', 'DECLINED', 'CANCELLED', 'SUPERSEDED')", + "name": "request_state", + "entityType": "checks", + "schema": "requests", + "table": "request" + }, + { + "value": "(\"state\" in ('PENDING', 'CANCELLED')) = (\"decided_by\" is null)", + "name": "request_decided", + "entityType": "checks", + "schema": "requests", + "table": "request" + }, + { + "value": "\"reason\" is null or \"state\" = 'DECLINED'", + "name": "request_reason", + "entityType": "checks", + "schema": "requests", + "table": "request" + }, + { + "value": "\"version\" ~ '^v[0-9]+\\.[0-9]+\\.[0-9]+$'", + "name": "starts_version_format", + "entityType": "checks", + "schema": "hub", + "table": "starts" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "agent" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_agent_companies" + ], + "using": "true", + "withCheck": null, + "name": "agent_companies_select", + "entityType": "policies", + "schema": "builder", + "table": "agent" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "agent_conversation" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "agent_tool" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "agent_version" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "agent_version_tool" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "assistant_conversation" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "conversation" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "company_select", + "entityType": "policies", + "schema": "builder", + "table": "company_account_kind" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_select", + "entityType": "policies", + "schema": "builder", + "table": "company_account_kind" + }, + { + "as": "PERMISSIVE", + "for": "INSERT", + "roles": [ + "hub_operator" + ], + "using": null, + "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "operator_insert", + "entityType": "policies", + "schema": "builder", + "table": "company_account_kind" + }, + { + "as": "PERMISSIVE", + "for": "DELETE", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_delete", + "entityType": "policies", + "schema": "builder", + "table": "company_account_kind" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "company_model" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "company_model_fallback" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id is null or person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id is null or person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "model_account" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_model_seals" + ], + "using": "true", + "withCheck": null, + "name": "model_seals_select", + "entityType": "policies", + "schema": "builder", + "table": "model_account" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "model_account_assignee" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_model_seals" + ], + "using": "true", + "withCheck": null, + "name": "model_seals_select", + "entityType": "policies", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "observational_memory_models" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '') and person_id = nullif(current_setting('conexus.person_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '') and person_id = nullif(current_setting('conexus.person_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "person_model_default" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "tool" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "tool_version" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "apps", + "table": "app" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_select", + "entityType": "policies", + "schema": "apps", + "table": "app" + }, + { + "as": "PERMISSIVE", + "for": "DELETE", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_delete", + "entityType": "policies", + "schema": "apps", + "table": "app" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_app_companies" + ], + "using": "true", + "withCheck": null, + "name": "companies_select", + "entityType": "policies", + "schema": "apps", + "table": "app" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "apps", + "table": "app_version" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_select", + "entityType": "policies", + "schema": "apps", + "table": "app_version" + }, + { + "as": "PERMISSIVE", + "for": "DELETE", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_delete", + "entityType": "policies", + "schema": "apps", + "table": "app_version" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "apps", + "table": "blob" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_select", + "entityType": "policies", + "schema": "apps", + "table": "blob" + }, + { + "as": "PERMISSIVE", + "for": "DELETE", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_delete", + "entityType": "policies", + "schema": "apps", + "table": "blob" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "apps", + "table": "version_file" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_select", + "entityType": "policies", + "schema": "apps", + "table": "version_file" + }, + { + "as": "PERMISSIVE", + "for": "DELETE", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_delete", + "entityType": "policies", + "schema": "apps", + "table": "version_file" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "connectors", + "table": "connection" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_connection_seals" + ], + "using": "true", + "withCheck": null, + "name": "connection_seals_select", + "entityType": "policies", + "schema": "connectors", + "table": "connection" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", + "name": "company_all", + "entityType": "policies", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "connectors", + "table": "connector_write" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "connectors", + "table": "project_connection" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "copies", + "table": "copy" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "copies", + "table": "copy_proposal" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "copies", + "table": "copy_proposal_source" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "copies", + "table": "copy_run" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "copies", + "table": "copy_source" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "copies", + "table": "copy_table_left" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "copies", + "table": "project_copy" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "auth", + "table": "company" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_app_people" + ], + "using": "true", + "withCheck": null, + "name": "app_people_select", + "entityType": "policies", + "schema": "auth", + "table": "company" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_person" + ], + "using": "exists (select 1 from auth.member m where m.company_id = company.id and m.user_id = nullif(current_setting('conexus.person_id', true), ''))", + "withCheck": null, + "name": "person_select", + "entityType": "policies", + "schema": "auth", + "table": "company" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_invitation" + ], + "using": "exists (select 1 from auth.invitation i where i.id = nullif(current_setting('conexus.invitation_id', true), '') and i.company_id = company.id)", + "withCheck": "exists (select 1 from auth.invitation i where i.id = nullif(current_setting('conexus.invitation_id', true), '') and i.company_id = company.id)", + "name": "invitation_all", + "entityType": "policies", + "schema": "auth", + "table": "company" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), ''))", + "withCheck": null, + "name": "operator_select", + "entityType": "policies", + "schema": "auth", + "table": "company" + }, + { + "as": "PERMISSIVE", + "for": "INSERT", + "roles": [ + "hub_operator" + ], + "using": null, + "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), ''))", + "name": "operator_insert", + "entityType": "policies", + "schema": "auth", + "table": "company" + }, + { + "as": "PERMISSIVE", + "for": "UPDATE", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and id = nullif(current_setting('conexus.company_id', true), '')", + "name": "operator_update", + "entityType": "policies", + "schema": "auth", + "table": "company" + }, + { + "as": "PERMISSIVE", + "for": "DELETE", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_delete", + "entityType": "policies", + "schema": "auth", + "table": "company" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "auth", + "table": "invitation" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_person" + ], + "using": "inviter_id = nullif(current_setting('conexus.person_id', true), '')\n or lower(email) = (select u.email from auth.\"user\" u where u.id = nullif(current_setting('conexus.person_id', true), ''))", + "withCheck": null, + "name": "person_select", + "entityType": "policies", + "schema": "auth", + "table": "invitation" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_invitation" + ], + "using": "id = nullif(current_setting('conexus.invitation_id', true), '')", + "withCheck": "id = nullif(current_setting('conexus.invitation_id', true), '')", + "name": "invitation_all", + "entityType": "policies", + "schema": "auth", + "table": "invitation" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and (role = 'owner' or company_id = nullif(current_setting('conexus.company_id', true), ''))", + "withCheck": null, + "name": "operator_select", + "entityType": "policies", + "schema": "auth", + "table": "invitation" + }, + { + "as": "PERMISSIVE", + "for": "INSERT", + "roles": [ + "hub_operator" + ], + "using": null, + "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and role = 'owner'", + "name": "operator_insert", + "entityType": "policies", + "schema": "auth", + "table": "invitation" + }, + { + "as": "PERMISSIVE", + "for": "UPDATE", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and role = 'owner'", + "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and role = 'owner'", + "name": "operator_update", + "entityType": "policies", + "schema": "auth", + "table": "invitation" + }, + { + "as": "PERMISSIVE", + "for": "DELETE", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_delete", + "entityType": "policies", + "schema": "auth", + "table": "invitation" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "auth", + "table": "member" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_person" + ], + "using": "user_id = nullif(current_setting('conexus.person_id', true), '')", + "withCheck": null, + "name": "person_select", + "entityType": "policies", + "schema": "auth", + "table": "member" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_invitation" + ], + "using": "exists (select 1 from auth.invitation i where i.id = nullif(current_setting('conexus.invitation_id', true), '') and i.company_id = member.company_id)", + "withCheck": null, + "name": "invitation_select", + "entityType": "policies", + "schema": "auth", + "table": "member" + }, + { + "as": "PERMISSIVE", + "for": "INSERT", + "roles": [ + "hub_invitation" + ], + "using": null, + "withCheck": "user_id = nullif(current_setting('conexus.person_id', true), '')\n and exists (select 1 from auth.invitation i where i.id = nullif(current_setting('conexus.invitation_id', true), '') and i.company_id = member.company_id)", + "name": "invitation_insert", + "entityType": "policies", + "schema": "auth", + "table": "member" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and (role = 'owner' or company_id = nullif(current_setting('conexus.company_id', true), ''))", + "withCheck": null, + "name": "operator_select", + "entityType": "policies", + "schema": "auth", + "table": "member" + }, + { + "as": "PERMISSIVE", + "for": "DELETE", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_delete", + "entityType": "policies", + "schema": "auth", + "table": "member" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "auth", + "table": "organization_role" + }, + { + "as": "PERMISSIVE", + "for": "INSERT", + "roles": [ + "hub_operator" + ], + "using": null, + "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), ''))", + "name": "operator_insert", + "entityType": "policies", + "schema": "auth", + "table": "organization_role" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_runtime" + ], + "using": "true", + "withCheck": "true", + "name": "runtime_all", + "entityType": "policies", + "schema": "auth", + "table": "session" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "user_id = nullif(current_setting('conexus.person_id', true), '')", + "withCheck": "user_id = nullif(current_setting('conexus.person_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "auth", + "table": "session" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_invitation" + ], + "using": "user_id = nullif(current_setting('conexus.person_id', true), '')\n or exists (select 1 from auth.invitation i join auth.\"user\" u on u.email = lower(i.email)\n where i.id = nullif(current_setting('conexus.invitation_id', true), '') and u.id = session.user_id)", + "withCheck": "user_id = nullif(current_setting('conexus.person_id', true), '')\n or exists (select 1 from auth.invitation i join auth.\"user\" u on u.email = lower(i.email)\n where i.id = nullif(current_setting('conexus.invitation_id', true), '') and u.id = session.user_id)", + "name": "invitation_all", + "entityType": "policies", + "schema": "auth", + "table": "session" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_runtime" + ], + "using": "true", + "withCheck": "true", + "name": "runtime_sign_in", + "entityType": "policies", + "schema": "auth", + "table": "user" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "id = nullif(current_setting('conexus.person_id', true), '')\n or exists (select 1 from auth.member m where m.user_id = \"user\".id and m.company_id = nullif(current_setting('conexus.company_id', true), ''))\n or exists (select 1 from auth.invitation i where i.inviter_id = \"user\".id and i.company_id = nullif(current_setting('conexus.company_id', true), ''))\n or exists (select 1 from projects.app_access a where a.person_id = \"user\".id and a.company_id = nullif(current_setting('conexus.company_id', true), ''))", + "withCheck": "id = nullif(current_setting('conexus.person_id', true), '')\n or exists (select 1 from auth.member m where m.user_id = \"user\".id and m.company_id = nullif(current_setting('conexus.company_id', true), ''))\n or exists (select 1 from auth.invitation i where i.inviter_id = \"user\".id and i.company_id = nullif(current_setting('conexus.company_id', true), ''))\n or exists (select 1 from projects.app_access a where a.person_id = \"user\".id and a.company_id = nullif(current_setting('conexus.company_id', true), ''))", + "name": "company_all", + "entityType": "policies", + "schema": "auth", + "table": "user" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_person" + ], + "using": "id = nullif(current_setting('conexus.person_id', true), '')", + "withCheck": "id = nullif(current_setting('conexus.person_id', true), '')", + "name": "person_all", + "entityType": "policies", + "schema": "auth", + "table": "user" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_invitation" + ], + "using": "id = nullif(current_setting('conexus.person_id', true), '')\n or exists (select 1 from auth.invitation i where i.id = nullif(current_setting('conexus.invitation_id', true), '')\n and (i.inviter_id = \"user\".id or lower(i.email) = \"user\".email))", + "withCheck": "id = nullif(current_setting('conexus.person_id', true), '')\n or exists (select 1 from auth.invitation i where i.id = nullif(current_setting('conexus.invitation_id', true), '')\n and (i.inviter_id = \"user\".id or lower(i.email) = \"user\".email))", + "name": "invitation_all", + "entityType": "policies", + "schema": "auth", + "table": "user" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_administrators" + ], + "using": "role = 'admin'", + "withCheck": null, + "name": "administrators_select", + "entityType": "policies", + "schema": "auth", + "table": "user" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and (role = 'admin'\n or exists (select 1 from auth.member m where m.user_id = \"user\".id and m.role = 'owner'))", + "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and (role = 'admin'\n or exists (select 1 from auth.member m where m.user_id = \"user\".id and m.role = 'owner'))", + "name": "operator_all", + "entityType": "policies", + "schema": "auth", + "table": "user" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '') and person_id = nullif(current_setting('conexus.person_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '') and person_id = nullif(current_setting('conexus.person_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "notifications", + "table": "notification" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '') and person_id = nullif(current_setting('conexus.person_id', true), '')", + "withCheck": null, + "name": "company_select", + "entityType": "policies", + "schema": "notifications", + "table": "request_notice" + }, + { + "as": "PERMISSIVE", + "for": "UPDATE", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '') and person_id = nullif(current_setting('conexus.person_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '') and person_id = nullif(current_setting('conexus.person_id', true), '')", + "name": "company_update", + "entityType": "policies", + "schema": "notifications", + "table": "request_notice" + }, + { + "as": "PERMISSIVE", + "for": "INSERT", + "roles": [ + "hub_company" + ], + "using": null, + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_insert", + "entityType": "policies", + "schema": "notifications", + "table": "request_notice" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), ''))", + "withCheck": null, + "name": "operator_select", + "entityType": "policies", + "schema": "operations", + "table": "client" + }, + { + "as": "PERMISSIVE", + "for": "INSERT", + "roles": [ + "hub_operator" + ], + "using": null, + "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), ''))", + "name": "operator_insert", + "entityType": "policies", + "schema": "operations", + "table": "client" + }, + { + "as": "PERMISSIVE", + "for": "UPDATE", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), ''))", + "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), ''))", + "name": "operator_update", + "entityType": "policies", + "schema": "operations", + "table": "client" + }, + { + "as": "PERMISSIVE", + "for": "DELETE", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_delete", + "entityType": "policies", + "schema": "operations", + "table": "client" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "projects", + "table": "app_access" + }, + { + "as": "PERMISSIVE", + "for": "INSERT", + "roles": [ + "hub_invitation" + ], + "using": null, + "withCheck": "exists (select 1 from auth.invitation i\n join auth.\"user\" u on lower(u.email) = lower(i.email)\n where i.id = nullif(current_setting('conexus.invitation_id', true), '') and i.company_id = app_access.company_id\n and i.project_id = app_access.project_id and i.app_role is not distinct from app_access.role\n and u.id = app_access.person_id)", + "name": "invitation_insert", + "entityType": "policies", + "schema": "projects", + "table": "app_access" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_invitation" + ], + "using": "exists (select 1 from auth.invitation i\n join auth.\"user\" u on lower(u.email) = lower(i.email)\n where i.id = nullif(current_setting('conexus.invitation_id', true), '') and i.project_id = app_access.project_id\n and u.id = app_access.person_id)", + "withCheck": null, + "name": "invitation_select", + "entityType": "policies", + "schema": "projects", + "table": "app_access" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_app_people" + ], + "using": "true", + "withCheck": null, + "name": "app_people_select", + "entityType": "policies", + "schema": "projects", + "table": "app_access" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "projects", + "table": "company_database" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_select", + "entityType": "policies", + "schema": "projects", + "table": "company_database" + }, + { + "as": "PERMISSIVE", + "for": "DELETE", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_delete", + "entityType": "policies", + "schema": "projects", + "table": "company_database" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "projects", + "table": "project" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_select", + "entityType": "policies", + "schema": "projects", + "table": "project" + }, + { + "as": "PERMISSIVE", + "for": "DELETE", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_delete", + "entityType": "policies", + "schema": "projects", + "table": "project" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_hosts" + ], + "using": "true", + "withCheck": null, + "name": "hosts_select", + "entityType": "policies", + "schema": "projects", + "table": "project" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_app_people" + ], + "using": "true", + "withCheck": null, + "name": "app_people_select", + "entityType": "policies", + "schema": "projects", + "table": "project" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_invitation" + ], + "using": "exists (select 1 from auth.invitation i where i.id = nullif(current_setting('conexus.invitation_id', true), '')\n and i.company_id = project.company_id and i.project_id = project.id)", + "withCheck": null, + "name": "invitation_select", + "entityType": "policies", + "schema": "projects", + "table": "project" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "requests", + "table": "request" + } + ], + "renames": [] +} \ No newline at end of file diff --git a/apps/server/migrations/20261111234429_sync_copy_sources_grants/migration.sql b/apps/server/migrations/20261111234429_sync_copy_sources_grants/migration.sql new file mode 100644 index 00000000..c3ad61b8 --- /dev/null +++ b/apps/server/migrations/20261111234429_sync_copy_sources_grants/migration.sql @@ -0,0 +1,15 @@ +-- Custom SQL: Drizzle cannot generate a grant (data D5). O Sync de qualquer conector, with the founder's +-- word in the pull request of its own (data D11): a copy's runs read and save where each of its +-- connections stands and until when the provider asked it to wait; Desligar ends, in the transaction +-- that deletes the connection, the copy left with no source, writes down its table when the company's +-- database does not answer, and drains those rows once each table is dropped; the Builder's run +-- proposes a copy over several connections. A source leaves only by its foreign keys' cascade. +GRANT SELECT, INSERT ON TABLE copies.copy_source TO hub_company; +--> statement-breakpoint +GRANT UPDATE (pass, pass_started_at, position, watermark, wait_until) ON TABLE copies.copy_source TO hub_company; +--> statement-breakpoint +GRANT DELETE ON TABLE copies.copy TO hub_company; +--> statement-breakpoint +GRANT SELECT, INSERT, DELETE ON TABLE copies.copy_table_left TO hub_company; +--> statement-breakpoint +GRANT SELECT, INSERT ON TABLE copies.copy_proposal_source TO hub_company; diff --git a/apps/server/migrations/20261111234429_sync_copy_sources_grants/snapshot.json b/apps/server/migrations/20261111234429_sync_copy_sources_grants/snapshot.json new file mode 100644 index 00000000..0bd9be29 --- /dev/null +++ b/apps/server/migrations/20261111234429_sync_copy_sources_grants/snapshot.json @@ -0,0 +1,10357 @@ +{ + "id": "a3baed99-717a-4048-a477-9d35df6a0cee", + "prevIds": [ + "2e2e90ee-e859-4e6b-8f69-54dd30079999" + ], + "version": "8", + "dialect": "postgres", + "ddl": [ + { + "name": "builder", + "entityType": "schemas" + }, + { + "name": "apps", + "entityType": "schemas" + }, + { + "name": "connectors", + "entityType": "schemas" + }, + { + "name": "copies", + "entityType": "schemas" + }, + { + "name": "auth", + "entityType": "schemas" + }, + { + "name": "notifications", + "entityType": "schemas" + }, + { + "name": "operations", + "entityType": "schemas" + }, + { + "name": "projects", + "entityType": "schemas" + }, + { + "name": "requests", + "entityType": "schemas" + }, + { + "name": "hub", + "entityType": "schemas" + }, + { + "isRlsEnabled": true, + "name": "agent", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "agent_conversation", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "agent_tool", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "agent_version", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "agent_version_tool", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "assistant_conversation", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "conversation", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "company_account_kind", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "company_model", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "company_model_fallback", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "model_account", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "model_account_assignee", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "model_account_sign_in", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "observational_memory_models", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "person_model_default", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "tool", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "tool_version", + "entityType": "tables", + "schema": "builder" + }, + { + "isRlsEnabled": true, + "name": "app", + "entityType": "tables", + "schema": "apps" + }, + { + "isRlsEnabled": false, + "name": "app_session", + "entityType": "tables", + "schema": "apps" + }, + { + "isRlsEnabled": true, + "name": "app_version", + "entityType": "tables", + "schema": "apps" + }, + { + "isRlsEnabled": true, + "name": "blob", + "entityType": "tables", + "schema": "apps" + }, + { + "isRlsEnabled": false, + "name": "handoff", + "entityType": "tables", + "schema": "apps" + }, + { + "isRlsEnabled": true, + "name": "version_file", + "entityType": "tables", + "schema": "apps" + }, + { + "isRlsEnabled": true, + "name": "connection", + "entityType": "tables", + "schema": "connectors" + }, + { + "isRlsEnabled": true, + "name": "connection_sign_in", + "entityType": "tables", + "schema": "connectors" + }, + { + "isRlsEnabled": true, + "name": "connector_write", + "entityType": "tables", + "schema": "connectors" + }, + { + "isRlsEnabled": true, + "name": "project_connection", + "entityType": "tables", + "schema": "connectors" + }, + { + "isRlsEnabled": true, + "name": "copy", + "entityType": "tables", + "schema": "copies" + }, + { + "isRlsEnabled": true, + "name": "copy_proposal", + "entityType": "tables", + "schema": "copies" + }, + { + "isRlsEnabled": true, + "name": "copy_proposal_source", + "entityType": "tables", + "schema": "copies" + }, + { + "isRlsEnabled": true, + "name": "copy_run", + "entityType": "tables", + "schema": "copies" + }, + { + "isRlsEnabled": true, + "name": "copy_source", + "entityType": "tables", + "schema": "copies" + }, + { + "isRlsEnabled": true, + "name": "copy_table_left", + "entityType": "tables", + "schema": "copies" + }, + { + "isRlsEnabled": true, + "name": "project_copy", + "entityType": "tables", + "schema": "copies" + }, + { + "isRlsEnabled": false, + "name": "account", + "entityType": "tables", + "schema": "auth" + }, + { + "isRlsEnabled": true, + "name": "company", + "entityType": "tables", + "schema": "auth" + }, + { + "isRlsEnabled": true, + "name": "invitation", + "entityType": "tables", + "schema": "auth" + }, + { + "isRlsEnabled": true, + "name": "member", + "entityType": "tables", + "schema": "auth" + }, + { + "isRlsEnabled": true, + "name": "organization_role", + "entityType": "tables", + "schema": "auth" + }, + { + "isRlsEnabled": false, + "name": "rate_limit", + "entityType": "tables", + "schema": "auth" + }, + { + "isRlsEnabled": true, + "name": "session", + "entityType": "tables", + "schema": "auth" + }, + { + "isRlsEnabled": true, + "name": "user", + "entityType": "tables", + "schema": "auth" + }, + { + "isRlsEnabled": false, + "name": "verification", + "entityType": "tables", + "schema": "auth" + }, + { + "isRlsEnabled": true, + "name": "notification", + "entityType": "tables", + "schema": "notifications" + }, + { + "isRlsEnabled": true, + "name": "request_notice", + "entityType": "tables", + "schema": "notifications" + }, + { + "isRlsEnabled": true, + "name": "client", + "entityType": "tables", + "schema": "operations" + }, + { + "isRlsEnabled": true, + "name": "app_access", + "entityType": "tables", + "schema": "projects" + }, + { + "isRlsEnabled": true, + "name": "company_database", + "entityType": "tables", + "schema": "projects" + }, + { + "isRlsEnabled": true, + "name": "project", + "entityType": "tables", + "schema": "projects" + }, + { + "isRlsEnabled": true, + "name": "request", + "entityType": "tables", + "schema": "requests" + }, + { + "isRlsEnabled": false, + "name": "starts", + "entityType": "tables", + "schema": "hub" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "builder", + "table": "agent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "agent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "project_id", + "entityType": "columns", + "schema": "builder", + "table": "agent" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "draft", + "entityType": "columns", + "schema": "builder", + "table": "agent" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "revision", + "entityType": "columns", + "schema": "builder", + "table": "agent" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "active_version", + "entityType": "columns", + "schema": "builder", + "table": "agent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "active_by", + "entityType": "columns", + "schema": "builder", + "table": "agent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_by", + "entityType": "columns", + "schema": "builder", + "table": "agent" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "body_hash", + "entityType": "columns", + "schema": "builder", + "table": "agent" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "builder", + "table": "agent" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "builder", + "table": "agent" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "last_run_at", + "entityType": "columns", + "schema": "builder", + "table": "agent" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "builder", + "table": "agent_conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "agent_conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "person_id", + "entityType": "columns", + "schema": "builder", + "table": "agent_conversation" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "agent_id", + "entityType": "columns", + "schema": "builder", + "table": "agent_conversation" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "draft", + "entityType": "columns", + "schema": "builder", + "table": "agent_conversation" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "agent_id", + "entityType": "columns", + "schema": "builder", + "table": "agent_tool" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tool_id", + "entityType": "columns", + "schema": "builder", + "table": "agent_tool" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tool_version_id", + "entityType": "columns", + "schema": "builder", + "table": "agent_tool" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "agent_tool" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "approval", + "entityType": "columns", + "schema": "builder", + "table": "agent_tool" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "agent_id", + "entityType": "columns", + "schema": "builder", + "table": "agent_version" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "number", + "entityType": "columns", + "schema": "builder", + "table": "agent_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "agent_version" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "config", + "entityType": "columns", + "schema": "builder", + "table": "agent_version" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "source_revision", + "entityType": "columns", + "schema": "builder", + "table": "agent_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "message", + "entityType": "columns", + "schema": "builder", + "table": "agent_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "published_by", + "entityType": "columns", + "schema": "builder", + "table": "agent_version" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "published_at", + "entityType": "columns", + "schema": "builder", + "table": "agent_version" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "agent_id", + "entityType": "columns", + "schema": "builder", + "table": "agent_version_tool" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "number", + "entityType": "columns", + "schema": "builder", + "table": "agent_version_tool" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tool_version_id", + "entityType": "columns", + "schema": "builder", + "table": "agent_version_tool" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "agent_version_tool" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "approval", + "entityType": "columns", + "schema": "builder", + "table": "agent_version_tool" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "builder", + "table": "assistant_conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "assistant_conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "person_id", + "entityType": "columns", + "schema": "builder", + "table": "assistant_conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "project_id", + "entityType": "columns", + "schema": "builder", + "table": "assistant_conversation" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "connections", + "entityType": "columns", + "schema": "builder", + "table": "assistant_conversation" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "builder", + "table": "conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "project_id", + "entityType": "columns", + "schema": "builder", + "table": "conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "person_id", + "entityType": "columns", + "schema": "builder", + "table": "conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempt_key", + "entityType": "columns", + "schema": "builder", + "table": "conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "body_hash", + "entityType": "columns", + "schema": "builder", + "table": "conversation" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "builder", + "table": "conversation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "company_account_kind" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "kind", + "entityType": "columns", + "schema": "builder", + "table": "company_account_kind" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "company_model" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "builder", + "table": "company_model" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'off'", + "generated": null, + "identity": null, + "name": "effort", + "entityType": "columns", + "schema": "builder", + "table": "company_model" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "company_model_fallback" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "enabled", + "entityType": "columns", + "schema": "builder", + "table": "company_model_fallback" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "chain", + "entityType": "columns", + "schema": "builder", + "table": "company_model_fallback" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "revision", + "entityType": "columns", + "schema": "builder", + "table": "company_model_fallback" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "person_id", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "kind", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "provider", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "label", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "position", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "state", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "bytea", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sealed", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "key_id", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "hint", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "linked_by", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "linked_at", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "revision", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempt_key", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "limited_until", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refresh_until", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "served_models", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "served_at", + "entityType": "columns", + "schema": "builder", + "table": "model_account" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_id", + "entityType": "columns", + "schema": "builder", + "table": "model_account_assignee" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "model_account_assignee" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "person_id", + "entityType": "columns", + "schema": "builder", + "table": "model_account_assignee" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "person_id", + "entityType": "columns", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "owner", + "entityType": "columns", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "kind", + "entityType": "columns", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "label", + "entityType": "columns", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "type": "bytea", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sealed", + "entityType": "columns", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "key_id", + "entityType": "columns", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expires_at", + "entityType": "columns", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "statement_timestamp()", + "generated": null, + "identity": null, + "name": "poll_at", + "entityType": "columns", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "observational_memory_models" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "observer", + "entityType": "columns", + "schema": "builder", + "table": "observational_memory_models" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "reflector", + "entityType": "columns", + "schema": "builder", + "table": "observational_memory_models" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "person_model_default" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "person_id", + "entityType": "columns", + "schema": "builder", + "table": "person_model_default" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "builder", + "table": "person_model_default" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "effort", + "entityType": "columns", + "schema": "builder", + "table": "person_model_default" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "builder", + "table": "tool" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "tool" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'PRESET'", + "generated": null, + "identity": null, + "name": "kind", + "entityType": "columns", + "schema": "builder", + "table": "tool" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connection_id", + "entityType": "columns", + "schema": "builder", + "table": "tool" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "operation", + "entityType": "columns", + "schema": "builder", + "table": "tool" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "slug", + "entityType": "columns", + "schema": "builder", + "table": "tool" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "current_version", + "entityType": "columns", + "schema": "builder", + "table": "tool" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_by", + "entityType": "columns", + "schema": "builder", + "table": "tool" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "body_hash", + "entityType": "columns", + "schema": "builder", + "table": "tool" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "builder", + "table": "tool" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "builder", + "table": "tool" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "builder", + "table": "tool_version" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tool_id", + "entityType": "columns", + "schema": "builder", + "table": "tool_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "builder", + "table": "tool_version" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "number", + "entityType": "columns", + "schema": "builder", + "table": "tool_version" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "config", + "entityType": "columns", + "schema": "builder", + "table": "tool_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_by", + "entityType": "columns", + "schema": "builder", + "table": "tool_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "body_hash", + "entityType": "columns", + "schema": "builder", + "table": "tool_version" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "builder", + "table": "tool_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "project_id", + "entityType": "columns", + "schema": "apps", + "table": "app" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "apps", + "table": "app" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "live_version_id", + "entityType": "columns", + "schema": "apps", + "table": "app" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "published_version_id", + "entityType": "columns", + "schema": "apps", + "table": "app" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sending_version_id", + "entityType": "columns", + "schema": "apps", + "table": "app" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimed_until", + "entityType": "columns", + "schema": "apps", + "table": "app" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "database_ready", + "entityType": "columns", + "schema": "apps", + "table": "app" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token_hash", + "entityType": "columns", + "schema": "apps", + "table": "app_session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "host_label", + "entityType": "columns", + "schema": "apps", + "table": "app_session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "person_id", + "entityType": "columns", + "schema": "apps", + "table": "app_session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "apps", + "table": "app_session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "project_id", + "entityType": "columns", + "schema": "apps", + "table": "app_session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "hub_session_id", + "entityType": "columns", + "schema": "apps", + "table": "app_session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "environment", + "entityType": "columns", + "schema": "apps", + "table": "app_session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "apps", + "table": "app_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "apps", + "table": "app_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "project_id", + "entityType": "columns", + "schema": "apps", + "table": "app_version" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "number", + "entityType": "columns", + "schema": "apps", + "table": "app_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "state", + "entityType": "columns", + "schema": "apps", + "table": "app_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failure", + "entityType": "columns", + "schema": "apps", + "table": "app_version" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "manifest", + "entityType": "columns", + "schema": "apps", + "table": "app_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "digest", + "entityType": "columns", + "schema": "apps", + "table": "app_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sent_by", + "entityType": "columns", + "schema": "apps", + "table": "app_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempt_key", + "entityType": "columns", + "schema": "apps", + "table": "app_version" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "apps", + "table": "app_version" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "apps", + "table": "blob" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sha256", + "entityType": "columns", + "schema": "apps", + "table": "blob" + }, + { + "type": "bytea", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "bytes", + "entityType": "columns", + "schema": "apps", + "table": "blob" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "code_hash", + "entityType": "columns", + "schema": "apps", + "table": "handoff" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "binding_hash", + "entityType": "columns", + "schema": "apps", + "table": "handoff" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "host_label", + "entityType": "columns", + "schema": "apps", + "table": "handoff" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "person_id", + "entityType": "columns", + "schema": "apps", + "table": "handoff" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "apps", + "table": "handoff" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "project_id", + "entityType": "columns", + "schema": "apps", + "table": "handoff" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "hub_session_id", + "entityType": "columns", + "schema": "apps", + "table": "handoff" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "environment", + "entityType": "columns", + "schema": "apps", + "table": "handoff" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expires_at", + "entityType": "columns", + "schema": "apps", + "table": "handoff" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "version_id", + "entityType": "columns", + "schema": "apps", + "table": "version_file" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "apps", + "table": "version_file" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "path", + "entityType": "columns", + "schema": "apps", + "table": "version_file" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sha256", + "entityType": "columns", + "schema": "apps", + "table": "version_file" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "size", + "entityType": "columns", + "schema": "apps", + "table": "version_file" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "media_type", + "entityType": "columns", + "schema": "apps", + "table": "version_file" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connector_id", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connector_version", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "state", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "bytea", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sealed", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "key_id", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "linked_by", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "linked_at", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tested_at", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tested_by", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "last_test", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "notes", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempt_key", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "revision", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refresh_until", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_ref", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_label", + "entityType": "columns", + "schema": "connectors", + "table": "connection" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "person_id", + "entityType": "columns", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connector_id", + "entityType": "columns", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connection_id", + "entityType": "columns", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connection_revision", + "entityType": "columns", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "type": "bytea", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sealed", + "entityType": "columns", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "key_id", + "entityType": "columns", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expires_at", + "entityType": "columns", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "connectors", + "table": "connector_write" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "thread_id", + "entityType": "columns", + "schema": "connectors", + "table": "connector_write" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "tool_call_id", + "entityType": "columns", + "schema": "connectors", + "table": "connector_write" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connection_id", + "entityType": "columns", + "schema": "connectors", + "table": "connector_write" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "operation_id", + "entityType": "columns", + "schema": "connectors", + "table": "connector_write" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "input_hash", + "entityType": "columns", + "schema": "connectors", + "table": "connector_write" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "agent_id", + "entityType": "columns", + "schema": "connectors", + "table": "connector_write" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "version_number", + "entityType": "columns", + "schema": "connectors", + "table": "connector_write" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "person_id", + "entityType": "columns", + "schema": "connectors", + "table": "connector_write" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "state", + "entityType": "columns", + "schema": "connectors", + "table": "connector_write" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "answer", + "entityType": "columns", + "schema": "connectors", + "table": "connector_write" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "approved_by", + "entityType": "columns", + "schema": "connectors", + "table": "connector_write" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "connectors", + "table": "connector_write" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "project_id", + "entityType": "columns", + "schema": "connectors", + "table": "project_connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "connectors", + "table": "project_connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connector_id", + "entityType": "columns", + "schema": "connectors", + "table": "project_connection" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connection_id", + "entityType": "columns", + "schema": "connectors", + "table": "project_connection" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "exclusive", + "entityType": "columns", + "schema": "connectors", + "table": "project_connection" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "granted_by", + "entityType": "columns", + "schema": "connectors", + "table": "project_connection" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "granted_at", + "entityType": "columns", + "schema": "connectors", + "table": "project_connection" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connector_id", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connection_id", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "label", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "model", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "definition", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_by", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempt_key", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "body_hash", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claim_token", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimed_until", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "pass", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pass_started_at", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "position", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "watermark", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rows", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "last_run_id", + "entityType": "columns", + "schema": "copies", + "table": "copy" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connector_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connection_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "project_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "label", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "definition", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "proposed_by", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "proved_rows", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "proved_more", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "proved_calls", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "proposed_at", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "state", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "copy_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal_source" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "proposal_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal_source" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connector_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal_source" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connection_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_proposal_source" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "copies", + "table": "copy_run" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_run" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "copy_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_run" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "started_at", + "entityType": "columns", + "schema": "copies", + "table": "copy_run" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ended_at", + "entityType": "columns", + "schema": "copies", + "table": "copy_run" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "outcome", + "entityType": "columns", + "schema": "copies", + "table": "copy_run" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "reason", + "entityType": "columns", + "schema": "copies", + "table": "copy_run" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "pages", + "entityType": "columns", + "schema": "copies", + "table": "copy_run" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "read", + "entityType": "columns", + "schema": "copies", + "table": "copy_run" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "written", + "entityType": "columns", + "schema": "copies", + "table": "copy_run" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_source" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "copy_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_source" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connector_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_source" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "connection_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_source" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_ref", + "entityType": "columns", + "schema": "copies", + "table": "copy_source" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "pass", + "entityType": "columns", + "schema": "copies", + "table": "copy_source" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "pass_started_at", + "entityType": "columns", + "schema": "copies", + "table": "copy_source" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "position", + "entityType": "columns", + "schema": "copies", + "table": "copy_source" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "watermark", + "entityType": "columns", + "schema": "copies", + "table": "copy_source" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "wait_until", + "entityType": "columns", + "schema": "copies", + "table": "copy_source" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "copies", + "table": "copy_source" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_table_left" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "copy_id", + "entityType": "columns", + "schema": "copies", + "table": "copy_table_left" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "copies", + "table": "copy_table_left" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "copies", + "table": "project_copy" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "project_id", + "entityType": "columns", + "schema": "copies", + "table": "project_copy" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "copy_id", + "entityType": "columns", + "schema": "copies", + "table": "project_copy" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "granted_by", + "entityType": "columns", + "schema": "copies", + "table": "project_copy" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "granted_at", + "entityType": "columns", + "schema": "copies", + "table": "project_copy" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_id", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "provider_id", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "access_token", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refresh_token", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id_token", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "access_token_expires_at", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "refresh_token_expires_at", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "scope", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "password", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "auth", + "table": "account" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "auth", + "table": "company" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "auth", + "table": "company" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "slug", + "entityType": "columns", + "schema": "auth", + "table": "company" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "logo", + "entityType": "columns", + "schema": "auth", + "table": "company" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "metadata", + "entityType": "columns", + "schema": "auth", + "table": "company" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "auth", + "table": "company" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempt_key", + "entityType": "columns", + "schema": "auth", + "table": "company" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deleting_since", + "entityType": "columns", + "schema": "auth", + "table": "company" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nickname", + "entityType": "columns", + "schema": "auth", + "table": "company" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "role", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "project_id", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "app_role", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expires_at", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inviter_id", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempt_key", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "mailed_at", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "revision", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "superseded_at", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "replaces", + "entityType": "columns", + "schema": "auth", + "table": "invitation" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "auth", + "table": "member" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "auth", + "table": "member" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "auth", + "table": "member" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "role", + "entityType": "columns", + "schema": "auth", + "table": "member" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "auth", + "table": "member" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "auth", + "table": "organization_role" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "auth", + "table": "organization_role" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "role", + "entityType": "columns", + "schema": "auth", + "table": "organization_role" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "permission", + "entityType": "columns", + "schema": "auth", + "table": "organization_role" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "label", + "entityType": "columns", + "schema": "auth", + "table": "organization_role" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempt_key", + "entityType": "columns", + "schema": "auth", + "table": "organization_role" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "auth", + "table": "organization_role" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "auth", + "table": "organization_role" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "auth", + "table": "rate_limit" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "key", + "entityType": "columns", + "schema": "auth", + "table": "rate_limit" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "count", + "entityType": "columns", + "schema": "auth", + "table": "rate_limit" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "last_request", + "entityType": "columns", + "schema": "auth", + "table": "rate_limit" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "auth", + "table": "session" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expires_at", + "entityType": "columns", + "schema": "auth", + "table": "session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "token", + "entityType": "columns", + "schema": "auth", + "table": "session" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "auth", + "table": "session" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "auth", + "table": "session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ip_address", + "entityType": "columns", + "schema": "auth", + "table": "session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_agent", + "entityType": "columns", + "schema": "auth", + "table": "session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "user_id", + "entityType": "columns", + "schema": "auth", + "table": "session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "active_organization_id", + "entityType": "columns", + "schema": "auth", + "table": "session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "impersonated_by", + "entityType": "columns", + "schema": "auth", + "table": "session" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "email_verified", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "image", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "role", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "banned", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ban_reason", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ban_expires", + "entityType": "columns", + "schema": "auth", + "table": "user" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "auth", + "table": "verification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "identifier", + "entityType": "columns", + "schema": "auth", + "table": "verification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "value", + "entityType": "columns", + "schema": "auth", + "table": "verification" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expires_at", + "entityType": "columns", + "schema": "auth", + "table": "verification" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "auth", + "table": "verification" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "updated_at", + "entityType": "columns", + "schema": "auth", + "table": "verification" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "notifications", + "table": "notification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "notifications", + "table": "notification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "person_id", + "entityType": "columns", + "schema": "notifications", + "table": "notification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "kind", + "entityType": "columns", + "schema": "notifications", + "table": "notification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "automation_id", + "entityType": "columns", + "schema": "notifications", + "table": "notification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "automation_name", + "entityType": "columns", + "schema": "notifications", + "table": "notification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "project_id", + "entityType": "columns", + "schema": "notifications", + "table": "notification" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "conversation_id", + "entityType": "columns", + "schema": "notifications", + "table": "notification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "failure_code", + "entityType": "columns", + "schema": "notifications", + "table": "notification" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "run_id", + "entityType": "columns", + "schema": "notifications", + "table": "notification" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "notifications", + "table": "notification" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "read_at", + "entityType": "columns", + "schema": "notifications", + "table": "notification" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "notifications", + "table": "request_notice" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "notifications", + "table": "request_notice" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "person_id", + "entityType": "columns", + "schema": "notifications", + "table": "request_notice" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "request_id", + "entityType": "columns", + "schema": "notifications", + "table": "request_notice" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "kind", + "entityType": "columns", + "schema": "notifications", + "table": "request_notice" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "notifications", + "table": "request_notice" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "read_at", + "entityType": "columns", + "schema": "notifications", + "table": "request_notice" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "operations", + "table": "client" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cnpj", + "entityType": "columns", + "schema": "operations", + "table": "client" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "legal_name", + "entityType": "columns", + "schema": "operations", + "table": "client" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "revision", + "entityType": "columns", + "schema": "operations", + "table": "client" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempt_key", + "entityType": "columns", + "schema": "operations", + "table": "client" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "registered_at", + "entityType": "columns", + "schema": "operations", + "table": "client" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "projects", + "table": "app_access" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "project_id", + "entityType": "columns", + "schema": "projects", + "table": "app_access" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "person_id", + "entityType": "columns", + "schema": "projects", + "table": "app_access" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "role", + "entityType": "columns", + "schema": "projects", + "table": "app_access" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "statement_timestamp()", + "generated": null, + "identity": null, + "name": "granted_at", + "entityType": "columns", + "schema": "projects", + "table": "app_access" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "projects", + "table": "company_database" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "state", + "entityType": "columns", + "schema": "projects", + "table": "company_database" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "neon_project_id", + "entityType": "columns", + "schema": "projects", + "table": "company_database" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "claimed_until", + "entityType": "columns", + "schema": "projects", + "table": "company_database" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "host", + "entityType": "columns", + "schema": "projects", + "table": "company_database" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "projects", + "table": "project" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "projects", + "table": "project" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "projects", + "table": "project" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempt_key", + "entityType": "columns", + "schema": "projects", + "table": "project" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "projects", + "table": "project" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "host_label", + "entityType": "columns", + "schema": "projects", + "table": "project" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "deleting_since", + "entityType": "columns", + "schema": "projects", + "table": "project" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "requests", + "table": "request" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "attempt_key", + "entityType": "columns", + "schema": "requests", + "table": "request" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "company_id", + "entityType": "columns", + "schema": "requests", + "table": "request" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "requested_by", + "entityType": "columns", + "schema": "requests", + "table": "request" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "project_id", + "entityType": "columns", + "schema": "requests", + "table": "request" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "kind", + "entityType": "columns", + "schema": "requests", + "table": "request" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "number", + "entityType": "columns", + "schema": "requests", + "table": "request" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "''", + "generated": null, + "identity": null, + "name": "message", + "entityType": "columns", + "schema": "requests", + "table": "request" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "state", + "entityType": "columns", + "schema": "requests", + "table": "request" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "decided_by", + "entityType": "columns", + "schema": "requests", + "table": "request" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "reason", + "entityType": "columns", + "schema": "requests", + "table": "request" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created_at", + "entityType": "columns", + "schema": "requests", + "table": "request" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": { + "type": "always", + "name": "starts_id_seq", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "9223372036854775807", + "cache": 1, + "cycle": false + }, + "name": "id", + "entityType": "columns", + "schema": "hub", + "table": "starts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "version", + "entityType": "columns", + "schema": "hub", + "table": "starts" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "now()", + "generated": null, + "identity": null, + "name": "started_at", + "entityType": "columns", + "schema": "hub", + "table": "starts" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "company_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "connector_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lower(\"name\" collate \"und-x-icu\")", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "connection_name_key", + "entityType": "indexes", + "schema": "connectors", + "table": "connection" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "connector_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "account_ref", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"account_ref\" IS NOT NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "connection_account_key", + "entityType": "indexes", + "schema": "connectors", + "table": "connection" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "project_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "connector_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"exclusive\"", + "with": "", + "method": "btree", + "concurrently": false, + "name": "project_connection_one_key", + "entityType": "indexes", + "schema": "connectors", + "table": "project_connection" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "company_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"state\" = 'OPEN'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "copy_proposal_open_name_key", + "entityType": "indexes", + "schema": "copies", + "table": "copy_proposal" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "copy_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"ended_at\" IS NULL", + "with": "", + "method": "btree", + "concurrently": false, + "name": "copy_run_open_key", + "entityType": "indexes", + "schema": "copies", + "table": "copy_run" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "copy_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "started_at", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "copy_run_copy_started_idx", + "entityType": "indexes", + "schema": "copies", + "table": "copy_run" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "user_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "account_user_id_idx", + "entityType": "indexes", + "schema": "auth", + "table": "account" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "company_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lower(\"email\")", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "coalesce(\"project_id\", '')", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"status\" = 'pending'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "invitation_pending_email_key", + "entityType": "indexes", + "schema": "auth", + "table": "invitation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "email", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "invitation_email_idx", + "entityType": "indexes", + "schema": "auth", + "table": "invitation" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "user_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "member_user_id_idx", + "entityType": "indexes", + "schema": "auth", + "table": "member" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "company_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "role", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "organization_role_company_id_role_key", + "entityType": "indexes", + "schema": "auth", + "table": "organization_role" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "company_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "attempt_key", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "organization_role_company_id_attempt_key_key", + "entityType": "indexes", + "schema": "auth", + "table": "organization_role" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "user_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "session_user_id_idx", + "entityType": "indexes", + "schema": "auth", + "table": "session" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "identifier", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "verification_identifier_idx", + "entityType": "indexes", + "schema": "auth", + "table": "verification" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "company_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "person_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "created_at", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "notification_person_created", + "entityType": "indexes", + "schema": "notifications", + "table": "notification" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "company_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "person_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "created_at", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + }, + { + "value": "id", + "isExpression": false, + "asc": false, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "request_notice_person_created", + "entityType": "indexes", + "schema": "notifications", + "table": "request_notice" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "company_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "lower(\"name\" collate \"und-x-icu\")", + "isExpression": true, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "project_company_name_key", + "entityType": "indexes", + "schema": "projects", + "table": "project" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "company_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "project_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": true, + "where": "\"state\" = 'PENDING'", + "with": "", + "method": "btree", + "concurrently": false, + "name": "request_open_key", + "entityType": "indexes", + "schema": "requests", + "table": "request" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "agent_company_id_fkey", + "entityType": "fks", + "schema": "builder", + "table": "agent" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "project_id" + ], + "schemaTo": "projects", + "tableTo": "project", + "columnsTo": [ + "company_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "agent_project_fkey", + "entityType": "fks", + "schema": "builder", + "table": "agent" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "id", + "active_version" + ], + "schemaTo": "builder", + "tableTo": "agent_version", + "columnsTo": [ + "company_id", + "agent_id", + "number" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "name": "agent_active_version_fkey", + "entityType": "fks", + "schema": "builder", + "table": "agent" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "agent_conversation_company_id_fkey", + "entityType": "fks", + "schema": "builder", + "table": "agent_conversation" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "agent_id" + ], + "schemaTo": "builder", + "tableTo": "agent", + "columnsTo": [ + "company_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "agent_conversation_agent_fkey", + "entityType": "fks", + "schema": "builder", + "table": "agent_conversation" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "person_id" + ], + "schemaTo": "auth", + "tableTo": "member", + "columnsTo": [ + "company_id", + "user_id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "agent_conversation_member_fkey", + "entityType": "fks", + "schema": "builder", + "table": "agent_conversation" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "agent_id" + ], + "schemaTo": "builder", + "tableTo": "agent", + "columnsTo": [ + "company_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "agent_tool_agent_fkey", + "entityType": "fks", + "schema": "builder", + "table": "agent_tool" + }, + { + "nameExplicit": true, + "columns": [ + "tool_id", + "tool_version_id" + ], + "schemaTo": "builder", + "tableTo": "tool_version", + "columnsTo": [ + "tool_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "name": "agent_tool_tool_version_fkey", + "entityType": "fks", + "schema": "builder", + "table": "agent_tool" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "tool_version_id" + ], + "schemaTo": "builder", + "tableTo": "tool_version", + "columnsTo": [ + "company_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "name": "agent_tool_company_tool_version_fkey", + "entityType": "fks", + "schema": "builder", + "table": "agent_tool" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "agent_id" + ], + "schemaTo": "builder", + "tableTo": "agent", + "columnsTo": [ + "company_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "agent_version_agent_fkey", + "entityType": "fks", + "schema": "builder", + "table": "agent_version" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "agent_id", + "number" + ], + "schemaTo": "builder", + "tableTo": "agent_version", + "columnsTo": [ + "company_id", + "agent_id", + "number" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "agent_version_tool_agent_version_fkey", + "entityType": "fks", + "schema": "builder", + "table": "agent_version_tool" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "tool_version_id" + ], + "schemaTo": "builder", + "tableTo": "tool_version", + "columnsTo": [ + "company_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "name": "agent_version_tool_tool_version_fkey", + "entityType": "fks", + "schema": "builder", + "table": "agent_version_tool" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "assistant_conversation_company_id_fkey", + "entityType": "fks", + "schema": "builder", + "table": "assistant_conversation" + }, + { + "nameExplicit": true, + "columns": [ + "project_id" + ], + "schemaTo": "projects", + "tableTo": "project", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "assistant_conversation_project_id_fkey", + "entityType": "fks", + "schema": "builder", + "table": "assistant_conversation" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "person_id" + ], + "schemaTo": "auth", + "tableTo": "member", + "columnsTo": [ + "company_id", + "user_id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "assistant_conversation_member_fkey", + "entityType": "fks", + "schema": "builder", + "table": "assistant_conversation" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "conversation_company_id_fkey", + "entityType": "fks", + "schema": "builder", + "table": "conversation" + }, + { + "nameExplicit": true, + "columns": [ + "project_id" + ], + "schemaTo": "projects", + "tableTo": "project", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "conversation_project_id_fkey", + "entityType": "fks", + "schema": "builder", + "table": "conversation" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "person_id" + ], + "schemaTo": "auth", + "tableTo": "member", + "columnsTo": [ + "company_id", + "user_id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "conversation_member_fkey", + "entityType": "fks", + "schema": "builder", + "table": "conversation" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "company_account_kind_company_id_fkey", + "entityType": "fks", + "schema": "builder", + "table": "company_account_kind" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "company_model_company_id_fkey", + "entityType": "fks", + "schema": "builder", + "table": "company_model" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "company_model_fallback_company_id_fkey", + "entityType": "fks", + "schema": "builder", + "table": "company_model_fallback" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "model_account_company_id_fkey", + "entityType": "fks", + "schema": "builder", + "table": "model_account" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "person_id" + ], + "schemaTo": "auth", + "tableTo": "member", + "columnsTo": [ + "company_id", + "user_id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "model_account_member_fkey", + "entityType": "fks", + "schema": "builder", + "table": "model_account" + }, + { + "nameExplicit": true, + "columns": [ + "account_id" + ], + "schemaTo": "builder", + "tableTo": "model_account", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "model_account_assignee_account_id_fkey", + "entityType": "fks", + "schema": "builder", + "table": "model_account_assignee" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "person_id" + ], + "schemaTo": "auth", + "tableTo": "member", + "columnsTo": [ + "company_id", + "user_id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "model_account_assignee_member_fkey", + "entityType": "fks", + "schema": "builder", + "table": "model_account_assignee" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "person_id" + ], + "schemaTo": "auth", + "tableTo": "member", + "columnsTo": [ + "company_id", + "user_id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "model_account_sign_in_member_fkey", + "entityType": "fks", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "observational_memory_models_company_id_fkey", + "entityType": "fks", + "schema": "builder", + "table": "observational_memory_models" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "person_id" + ], + "schemaTo": "auth", + "tableTo": "member", + "columnsTo": [ + "company_id", + "user_id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "person_model_default_member_fkey", + "entityType": "fks", + "schema": "builder", + "table": "person_model_default" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "tool_company_id_fkey", + "entityType": "fks", + "schema": "builder", + "table": "tool" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "tool_id" + ], + "schemaTo": "builder", + "tableTo": "tool", + "columnsTo": [ + "company_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "tool_version_tool_fkey", + "entityType": "fks", + "schema": "builder", + "table": "tool_version" + }, + { + "nameExplicit": true, + "columns": [ + "project_id" + ], + "schemaTo": "projects", + "tableTo": "project", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "app_project_id_fkey", + "entityType": "fks", + "schema": "apps", + "table": "app" + }, + { + "nameExplicit": true, + "columns": [ + "project_id", + "live_version_id" + ], + "schemaTo": "apps", + "tableTo": "app_version", + "columnsTo": [ + "project_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "name": "app_live_version_fkey", + "entityType": "fks", + "schema": "apps", + "table": "app" + }, + { + "nameExplicit": true, + "columns": [ + "project_id", + "published_version_id" + ], + "schemaTo": "apps", + "tableTo": "app_version", + "columnsTo": [ + "project_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "name": "app_published_version_fkey", + "entityType": "fks", + "schema": "apps", + "table": "app" + }, + { + "nameExplicit": true, + "columns": [ + "project_id", + "sending_version_id" + ], + "schemaTo": "apps", + "tableTo": "app_version", + "columnsTo": [ + "project_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "name": "app_sending_version_fkey", + "entityType": "fks", + "schema": "apps", + "table": "app" + }, + { + "nameExplicit": true, + "columns": [ + "hub_session_id" + ], + "schemaTo": "auth", + "tableTo": "session", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "app_session_hub_session_id_fkey", + "entityType": "fks", + "schema": "apps", + "table": "app_session" + }, + { + "nameExplicit": true, + "columns": [ + "project_id" + ], + "schemaTo": "apps", + "tableTo": "app", + "columnsTo": [ + "project_id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "app_version_project_id_fkey", + "entityType": "fks", + "schema": "apps", + "table": "app_version" + }, + { + "nameExplicit": true, + "columns": [ + "hub_session_id" + ], + "schemaTo": "auth", + "tableTo": "session", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "handoff_hub_session_id_fkey", + "entityType": "fks", + "schema": "apps", + "table": "handoff" + }, + { + "nameExplicit": true, + "columns": [ + "version_id" + ], + "schemaTo": "apps", + "tableTo": "app_version", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "version_file_version_id_fkey", + "entityType": "fks", + "schema": "apps", + "table": "version_file" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "sha256" + ], + "schemaTo": "apps", + "tableTo": "blob", + "columnsTo": [ + "company_id", + "sha256" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "name": "version_file_blob_fkey", + "entityType": "fks", + "schema": "apps", + "table": "version_file" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "connection_company_id_fkey", + "entityType": "fks", + "schema": "connectors", + "table": "connection" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "person_id" + ], + "schemaTo": "auth", + "tableTo": "member", + "columnsTo": [ + "company_id", + "user_id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "connection_sign_in_member_fkey", + "entityType": "fks", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "connector_id", + "connection_id" + ], + "schemaTo": "connectors", + "tableTo": "connection", + "columnsTo": [ + "company_id", + "connector_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "connection_sign_in_company_id_connector_id_connection_id_fkey", + "entityType": "fks", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "connector_write_company_id_fkey", + "entityType": "fks", + "schema": "connectors", + "table": "connector_write" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "connector_id", + "connection_id" + ], + "schemaTo": "connectors", + "tableTo": "connection", + "columnsTo": [ + "company_id", + "connector_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "project_connection_connection_fkey", + "entityType": "fks", + "schema": "connectors", + "table": "project_connection" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "project_id" + ], + "schemaTo": "projects", + "tableTo": "project", + "columnsTo": [ + "company_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "project_connection_project_fkey", + "entityType": "fks", + "schema": "connectors", + "table": "project_connection" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "copy_company_id_fkey", + "entityType": "fks", + "schema": "copies", + "table": "copy" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "connector_id", + "connection_id" + ], + "schemaTo": "connectors", + "tableTo": "connection", + "columnsTo": [ + "company_id", + "connector_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "copy_connection_fkey", + "entityType": "fks", + "schema": "copies", + "table": "copy" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "copy_proposal_company_id_fkey", + "entityType": "fks", + "schema": "copies", + "table": "copy_proposal" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "connector_id", + "connection_id" + ], + "schemaTo": "connectors", + "tableTo": "connection", + "columnsTo": [ + "company_id", + "connector_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "copy_proposal_connection_fkey", + "entityType": "fks", + "schema": "copies", + "table": "copy_proposal" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "project_id" + ], + "schemaTo": "projects", + "tableTo": "project", + "columnsTo": [ + "company_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "copy_proposal_project_fkey", + "entityType": "fks", + "schema": "copies", + "table": "copy_proposal" + }, + { + "nameExplicit": true, + "columns": [ + "copy_id" + ], + "schemaTo": "copies", + "tableTo": "copy", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "copy_proposal_copy_fkey", + "entityType": "fks", + "schema": "copies", + "table": "copy_proposal" + }, + { + "nameExplicit": true, + "columns": [ + "proposal_id" + ], + "schemaTo": "copies", + "tableTo": "copy_proposal", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "copy_proposal_source_proposal_fkey", + "entityType": "fks", + "schema": "copies", + "table": "copy_proposal_source" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "connector_id", + "connection_id" + ], + "schemaTo": "connectors", + "tableTo": "connection", + "columnsTo": [ + "company_id", + "connector_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "copy_proposal_source_connection_fkey", + "entityType": "fks", + "schema": "copies", + "table": "copy_proposal_source" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "copy_id" + ], + "schemaTo": "copies", + "tableTo": "copy", + "columnsTo": [ + "company_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "copy_run_copy_fkey", + "entityType": "fks", + "schema": "copies", + "table": "copy_run" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "copy_id" + ], + "schemaTo": "copies", + "tableTo": "copy", + "columnsTo": [ + "company_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "copy_source_copy_fkey", + "entityType": "fks", + "schema": "copies", + "table": "copy_source" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "connector_id", + "connection_id" + ], + "schemaTo": "connectors", + "tableTo": "connection", + "columnsTo": [ + "company_id", + "connector_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "copy_source_connection_fkey", + "entityType": "fks", + "schema": "copies", + "table": "copy_source" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "copy_table_left_company_id_fkey", + "entityType": "fks", + "schema": "copies", + "table": "copy_table_left" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "project_id" + ], + "schemaTo": "projects", + "tableTo": "project", + "columnsTo": [ + "company_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "project_copy_project_fkey", + "entityType": "fks", + "schema": "copies", + "table": "project_copy" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "copy_id" + ], + "schemaTo": "copies", + "tableTo": "copy", + "columnsTo": [ + "company_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "project_copy_copy_fkey", + "entityType": "fks", + "schema": "copies", + "table": "project_copy" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "account_user_id_user_id_fkey", + "entityType": "fks", + "schema": "auth", + "table": "account" + }, + { + "nameExplicit": false, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "RESTRICT", + "name": "invitation_company_id_company_id_fkey", + "entityType": "fks", + "schema": "auth", + "table": "invitation" + }, + { + "nameExplicit": false, + "columns": [ + "inviter_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "RESTRICT", + "name": "invitation_inviter_id_user_id_fkey", + "entityType": "fks", + "schema": "auth", + "table": "invitation" + }, + { + "nameExplicit": false, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "RESTRICT", + "name": "member_company_id_company_id_fkey", + "entityType": "fks", + "schema": "auth", + "table": "member" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "RESTRICT", + "name": "member_user_id_user_id_fkey", + "entityType": "fks", + "schema": "auth", + "table": "member" + }, + { + "nameExplicit": false, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "organization_role_company_id_company_id_fkey", + "entityType": "fks", + "schema": "auth", + "table": "organization_role" + }, + { + "nameExplicit": false, + "columns": [ + "user_id" + ], + "schemaTo": "auth", + "tableTo": "user", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "session_user_id_user_id_fkey", + "entityType": "fks", + "schema": "auth", + "table": "session" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "notification_company_id_fkey", + "entityType": "fks", + "schema": "notifications", + "table": "notification" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "person_id" + ], + "schemaTo": "auth", + "tableTo": "member", + "columnsTo": [ + "company_id", + "user_id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "notification_member_fkey", + "entityType": "fks", + "schema": "notifications", + "table": "notification" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "person_id" + ], + "schemaTo": "auth", + "tableTo": "member", + "columnsTo": [ + "company_id", + "user_id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "request_notice_member_fkey", + "entityType": "fks", + "schema": "notifications", + "table": "request_notice" + }, + { + "nameExplicit": true, + "columns": [ + "request_id" + ], + "schemaTo": "requests", + "tableTo": "request", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "request_notice_request_id_fkey", + "entityType": "fks", + "schema": "notifications", + "table": "request_notice" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "project_id" + ], + "schemaTo": "projects", + "tableTo": "project", + "columnsTo": [ + "company_id", + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "app_access_company_id_project_id_fkey", + "entityType": "fks", + "schema": "projects", + "table": "app_access" + }, + { + "nameExplicit": true, + "columns": [ + "company_id" + ], + "schemaTo": "auth", + "tableTo": "company", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "request_company_id_fkey", + "entityType": "fks", + "schema": "requests", + "table": "request" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "requested_by" + ], + "schemaTo": "auth", + "tableTo": "member", + "columnsTo": [ + "company_id", + "user_id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "request_member_fkey", + "entityType": "fks", + "schema": "requests", + "table": "request" + }, + { + "nameExplicit": true, + "columns": [ + "project_id" + ], + "schemaTo": "projects", + "tableTo": "project", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "request_project_id_fkey", + "entityType": "fks", + "schema": "requests", + "table": "request" + }, + { + "columns": [ + "agent_id", + "tool_version_id" + ], + "nameExplicit": true, + "name": "agent_tool_pkey", + "entityType": "pks", + "schema": "builder", + "table": "agent_tool" + }, + { + "columns": [ + "agent_id", + "number" + ], + "nameExplicit": true, + "name": "agent_version_pkey", + "entityType": "pks", + "schema": "builder", + "table": "agent_version" + }, + { + "columns": [ + "agent_id", + "number", + "tool_version_id" + ], + "nameExplicit": true, + "name": "agent_version_tool_pkey", + "entityType": "pks", + "schema": "builder", + "table": "agent_version_tool" + }, + { + "columns": [ + "company_id", + "kind" + ], + "nameExplicit": false, + "name": "company_account_kind_pkey", + "entityType": "pks", + "schema": "builder", + "table": "company_account_kind" + }, + { + "columns": [ + "account_id", + "person_id" + ], + "nameExplicit": false, + "name": "model_account_assignee_pkey", + "entityType": "pks", + "schema": "builder", + "table": "model_account_assignee" + }, + { + "columns": [ + "company_id", + "person_id" + ], + "nameExplicit": false, + "name": "person_model_default_pkey", + "entityType": "pks", + "schema": "builder", + "table": "person_model_default" + }, + { + "columns": [ + "company_id", + "sha256" + ], + "nameExplicit": true, + "name": "blob_pkey", + "entityType": "pks", + "schema": "apps", + "table": "blob" + }, + { + "columns": [ + "version_id", + "path" + ], + "nameExplicit": true, + "name": "version_file_pkey", + "entityType": "pks", + "schema": "apps", + "table": "version_file" + }, + { + "columns": [ + "company_id", + "thread_id", + "tool_call_id" + ], + "nameExplicit": false, + "name": "connector_write_pkey", + "entityType": "pks", + "schema": "connectors", + "table": "connector_write" + }, + { + "columns": [ + "project_id", + "connection_id" + ], + "nameExplicit": false, + "name": "project_connection_pkey", + "entityType": "pks", + "schema": "connectors", + "table": "project_connection" + }, + { + "columns": [ + "proposal_id", + "connection_id" + ], + "nameExplicit": false, + "name": "copy_proposal_source_pkey", + "entityType": "pks", + "schema": "copies", + "table": "copy_proposal_source" + }, + { + "columns": [ + "copy_id", + "connection_id" + ], + "nameExplicit": false, + "name": "copy_source_pkey", + "entityType": "pks", + "schema": "copies", + "table": "copy_source" + }, + { + "columns": [ + "company_id", + "copy_id" + ], + "nameExplicit": false, + "name": "copy_table_left_pkey", + "entityType": "pks", + "schema": "copies", + "table": "copy_table_left" + }, + { + "columns": [ + "project_id", + "copy_id" + ], + "nameExplicit": false, + "name": "project_copy_pkey", + "entityType": "pks", + "schema": "copies", + "table": "project_copy" + }, + { + "columns": [ + "project_id", + "person_id" + ], + "nameExplicit": false, + "name": "app_access_pkey", + "entityType": "pks", + "schema": "projects", + "table": "app_access" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "agent_pkey", + "schema": "builder", + "table": "agent", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "agent_conversation_pkey", + "schema": "builder", + "table": "agent_conversation", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "assistant_conversation_pkey", + "schema": "builder", + "table": "assistant_conversation", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "conversation_pkey", + "schema": "builder", + "table": "conversation", + "entityType": "pks" + }, + { + "columns": [ + "company_id" + ], + "nameExplicit": false, + "name": "company_model_pkey", + "schema": "builder", + "table": "company_model", + "entityType": "pks" + }, + { + "columns": [ + "company_id" + ], + "nameExplicit": false, + "name": "company_model_fallback_pkey", + "schema": "builder", + "table": "company_model_fallback", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "model_account_pkey", + "schema": "builder", + "table": "model_account", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "model_account_sign_in_pkey", + "schema": "builder", + "table": "model_account_sign_in", + "entityType": "pks" + }, + { + "columns": [ + "company_id" + ], + "nameExplicit": false, + "name": "observational_memory_models_pkey", + "schema": "builder", + "table": "observational_memory_models", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "tool_pkey", + "schema": "builder", + "table": "tool", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "tool_version_pkey", + "schema": "builder", + "table": "tool_version", + "entityType": "pks" + }, + { + "columns": [ + "project_id" + ], + "nameExplicit": false, + "name": "app_pkey", + "schema": "apps", + "table": "app", + "entityType": "pks" + }, + { + "columns": [ + "token_hash" + ], + "nameExplicit": false, + "name": "app_session_pkey", + "schema": "apps", + "table": "app_session", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "app_version_pkey", + "schema": "apps", + "table": "app_version", + "entityType": "pks" + }, + { + "columns": [ + "code_hash" + ], + "nameExplicit": false, + "name": "handoff_pkey", + "schema": "apps", + "table": "handoff", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "connection_pkey", + "schema": "connectors", + "table": "connection", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "connection_sign_in_pkey", + "schema": "connectors", + "table": "connection_sign_in", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "copy_pkey", + "schema": "copies", + "table": "copy", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "copy_proposal_pkey", + "schema": "copies", + "table": "copy_proposal", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "copy_run_pkey", + "schema": "copies", + "table": "copy_run", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "account_pkey", + "schema": "auth", + "table": "account", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "company_pkey", + "schema": "auth", + "table": "company", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "invitation_pkey", + "schema": "auth", + "table": "invitation", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "member_pkey", + "schema": "auth", + "table": "member", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "organization_role_pkey", + "schema": "auth", + "table": "organization_role", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "rate_limit_pkey", + "schema": "auth", + "table": "rate_limit", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "session_pkey", + "schema": "auth", + "table": "session", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "user_pkey", + "schema": "auth", + "table": "user", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "verification_pkey", + "schema": "auth", + "table": "verification", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "notification_pkey", + "schema": "notifications", + "table": "notification", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "request_notice_pkey", + "schema": "notifications", + "table": "request_notice", + "entityType": "pks" + }, + { + "columns": [ + "company_id" + ], + "nameExplicit": false, + "name": "client_pkey", + "schema": "operations", + "table": "client", + "entityType": "pks" + }, + { + "columns": [ + "company_id" + ], + "nameExplicit": false, + "name": "company_database_pkey", + "schema": "projects", + "table": "company_database", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "project_pkey", + "schema": "projects", + "table": "project", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "request_pkey", + "schema": "requests", + "table": "request", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "starts_pkey", + "schema": "hub", + "table": "starts", + "entityType": "pks" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "id" + ], + "nullsNotDistinct": false, + "name": "agent_company_id_id_key", + "entityType": "uniques", + "schema": "builder", + "table": "agent" + }, + { + "nameExplicit": true, + "columns": [ + "agent_id", + "tool_id" + ], + "nullsNotDistinct": false, + "name": "agent_tool_agent_id_tool_id_key", + "entityType": "uniques", + "schema": "builder", + "table": "agent_tool" + }, + { + "nameExplicit": true, + "columns": [ + "agent_id", + "source_revision" + ], + "nullsNotDistinct": false, + "name": "agent_version_agent_id_source_revision_key", + "entityType": "uniques", + "schema": "builder", + "table": "agent_version" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "agent_id", + "number" + ], + "nullsNotDistinct": false, + "name": "agent_version_company_id_agent_id_number_key", + "entityType": "uniques", + "schema": "builder", + "table": "agent_version" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "person_id", + "attempt_key" + ], + "nullsNotDistinct": false, + "name": "conversation_attempt_key", + "entityType": "uniques", + "schema": "builder", + "table": "conversation" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "attempt_key" + ], + "nullsNotDistinct": false, + "name": "model_account_attempt_key", + "entityType": "uniques", + "schema": "builder", + "table": "model_account" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "slug" + ], + "nullsNotDistinct": false, + "name": "tool_company_id_slug_key", + "entityType": "uniques", + "schema": "builder", + "table": "tool" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "id" + ], + "nullsNotDistinct": false, + "name": "tool_company_id_id_key", + "entityType": "uniques", + "schema": "builder", + "table": "tool" + }, + { + "nameExplicit": true, + "columns": [ + "tool_id", + "number" + ], + "nullsNotDistinct": false, + "name": "tool_version_tool_id_number_key", + "entityType": "uniques", + "schema": "builder", + "table": "tool_version" + }, + { + "nameExplicit": true, + "columns": [ + "tool_id", + "id" + ], + "nullsNotDistinct": false, + "name": "tool_version_tool_id_id_key", + "entityType": "uniques", + "schema": "builder", + "table": "tool_version" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "id" + ], + "nullsNotDistinct": false, + "name": "tool_version_company_id_id_key", + "entityType": "uniques", + "schema": "builder", + "table": "tool_version" + }, + { + "nameExplicit": true, + "columns": [ + "project_id", + "number" + ], + "nullsNotDistinct": false, + "name": "app_version_project_id_number_key", + "entityType": "uniques", + "schema": "apps", + "table": "app_version" + }, + { + "nameExplicit": true, + "columns": [ + "project_id", + "attempt_key" + ], + "nullsNotDistinct": false, + "name": "app_version_project_id_attempt_key_key", + "entityType": "uniques", + "schema": "apps", + "table": "app_version" + }, + { + "nameExplicit": true, + "columns": [ + "project_id", + "id" + ], + "nullsNotDistinct": false, + "name": "app_version_project_id_id_key", + "entityType": "uniques", + "schema": "apps", + "table": "app_version" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "attempt_key" + ], + "nullsNotDistinct": false, + "name": "connection_attempt_key", + "entityType": "uniques", + "schema": "connectors", + "table": "connection" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "connector_id", + "id" + ], + "nullsNotDistinct": false, + "name": "connection_company_connector_id_key", + "entityType": "uniques", + "schema": "connectors", + "table": "connection" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "name" + ], + "nullsNotDistinct": false, + "name": "copy_company_id_name_key", + "entityType": "uniques", + "schema": "copies", + "table": "copy" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "attempt_key" + ], + "nullsNotDistinct": false, + "name": "copy_company_id_attempt_key_key", + "entityType": "uniques", + "schema": "copies", + "table": "copy" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "id" + ], + "nullsNotDistinct": false, + "name": "copy_company_id_id_key", + "entityType": "uniques", + "schema": "copies", + "table": "copy" + }, + { + "nameExplicit": true, + "columns": [ + "copy_id", + "account_ref" + ], + "nullsNotDistinct": false, + "name": "copy_source_copy_id_account_ref_key", + "entityType": "uniques", + "schema": "copies", + "table": "copy_source" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "attempt_key" + ], + "nullsNotDistinct": false, + "name": "invitation_company_id_attempt_key_key", + "entityType": "uniques", + "schema": "auth", + "table": "invitation" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "user_id" + ], + "nullsNotDistinct": false, + "name": "member_company_id_user_id_key", + "entityType": "uniques", + "schema": "auth", + "table": "member" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "run_id" + ], + "nullsNotDistinct": false, + "name": "notification_run_key", + "entityType": "uniques", + "schema": "notifications", + "table": "notification" + }, + { + "nameExplicit": true, + "columns": [ + "request_id", + "person_id", + "kind" + ], + "nullsNotDistinct": false, + "name": "request_notice_key", + "entityType": "uniques", + "schema": "notifications", + "table": "request_notice" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "attempt_key" + ], + "nullsNotDistinct": false, + "name": "project_company_id_attempt_key_key", + "entityType": "uniques", + "schema": "projects", + "table": "project" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "id" + ], + "nullsNotDistinct": false, + "name": "project_company_id_id_key", + "entityType": "uniques", + "schema": "projects", + "table": "project" + }, + { + "nameExplicit": true, + "columns": [ + "company_id", + "attempt_key" + ], + "nullsNotDistinct": false, + "name": "request_attempt_key", + "entityType": "uniques", + "schema": "requests", + "table": "request" + }, + { + "nameExplicit": false, + "columns": [ + "slug" + ], + "nullsNotDistinct": false, + "name": "company_slug_key", + "schema": "auth", + "table": "company", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "attempt_key" + ], + "nullsNotDistinct": false, + "name": "company_attempt_key_key", + "schema": "auth", + "table": "company", + "entityType": "uniques" + }, + { + "nameExplicit": true, + "columns": [ + "nickname" + ], + "nullsNotDistinct": false, + "name": "company_nickname_key", + "schema": "auth", + "table": "company", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "key" + ], + "nullsNotDistinct": false, + "name": "rate_limit_key_key", + "schema": "auth", + "table": "rate_limit", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "token" + ], + "nullsNotDistinct": false, + "name": "session_token_key", + "schema": "auth", + "table": "session", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "email" + ], + "nullsNotDistinct": false, + "name": "user_email_key", + "schema": "auth", + "table": "user", + "entityType": "uniques" + }, + { + "nameExplicit": true, + "columns": [ + "cnpj" + ], + "nullsNotDistinct": false, + "name": "client_cnpj_key", + "schema": "operations", + "table": "client", + "entityType": "uniques" + }, + { + "nameExplicit": true, + "columns": [ + "attempt_key" + ], + "nullsNotDistinct": false, + "name": "client_attempt_key_key", + "schema": "operations", + "table": "client", + "entityType": "uniques" + }, + { + "nameExplicit": true, + "columns": [ + "neon_project_id" + ], + "nullsNotDistinct": false, + "name": "company_database_neon_project_id_key", + "schema": "projects", + "table": "company_database", + "entityType": "uniques" + }, + { + "nameExplicit": true, + "columns": [ + "host_label" + ], + "nullsNotDistinct": false, + "name": "project_host_label_key", + "schema": "projects", + "table": "project", + "entityType": "uniques" + }, + { + "value": "\"revision\" > 0", + "name": "agent_revision_positive", + "entityType": "checks", + "schema": "builder", + "table": "agent" + }, + { + "value": "\"approval\" in ('ASK', 'AUTO')", + "name": "agent_tool_approval", + "entityType": "checks", + "schema": "builder", + "table": "agent_tool" + }, + { + "value": "\"number\" > 0", + "name": "agent_version_number_positive", + "entityType": "checks", + "schema": "builder", + "table": "agent_version" + }, + { + "value": "\"approval\" in ('ASK', 'AUTO')", + "name": "agent_version_tool_approval", + "entityType": "checks", + "schema": "builder", + "table": "agent_version_tool" + }, + { + "value": "\"kind\" IN ('claude_subscription', 'google_cliproxy', 'openai_codex')", + "name": "company_account_kind_kind", + "entityType": "checks", + "schema": "builder", + "table": "company_account_kind" + }, + { + "value": "\"effort\" IN ('off', 'low', 'medium', 'high', 'xhigh', 'max')", + "name": "company_model_effort", + "entityType": "checks", + "schema": "builder", + "table": "company_model" + }, + { + "value": "\"kind\" IN ('api_key', 'claude_subscription', 'google_cliproxy', 'openai_codex')", + "name": "model_account_kind", + "entityType": "checks", + "schema": "builder", + "table": "model_account" + }, + { + "value": "\"state\" IN ('ready', 'paused', 'refused')", + "name": "model_account_state", + "entityType": "checks", + "schema": "builder", + "table": "model_account" + }, + { + "value": "char_length(\"label\") BETWEEN 1 AND 60", + "name": "model_account_label_length", + "entityType": "checks", + "schema": "builder", + "table": "model_account" + }, + { + "value": "\"position\" >= 0", + "name": "model_account_position", + "entityType": "checks", + "schema": "builder", + "table": "model_account" + }, + { + "value": "(\"kind\" = 'api_key') = (\"hint\" IS NOT NULL)", + "name": "model_account_hint", + "entityType": "checks", + "schema": "builder", + "table": "model_account" + }, + { + "value": "\"owner\" IN ('company', 'me')", + "name": "model_account_sign_in_owner", + "entityType": "checks", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "value": "\"kind\" IN ('claude_subscription', 'google_cliproxy', 'openai_codex')", + "name": "model_account_sign_in_kind", + "entityType": "checks", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "value": "char_length(\"label\") BETWEEN 1 AND 60", + "name": "model_account_sign_in_label_length", + "entityType": "checks", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "value": "\"effort\" IN ('off', 'low', 'medium', 'high', 'xhigh', 'max')", + "name": "person_model_default_effort", + "entityType": "checks", + "schema": "builder", + "table": "person_model_default" + }, + { + "value": "\"kind\" in ('PRESET', 'CODE')", + "name": "tool_kind", + "entityType": "checks", + "schema": "builder", + "table": "tool" + }, + { + "value": "(\"kind\" = 'PRESET') = (\"operation\" is not null)", + "name": "tool_operation_by_kind", + "entityType": "checks", + "schema": "builder", + "table": "tool" + }, + { + "value": "(\"sending_version_id\" IS NULL) = (\"claimed_until\" IS NULL)", + "name": "app_sending_has_claim", + "entityType": "checks", + "schema": "apps", + "table": "app" + }, + { + "value": "\"environment\" IN ('preview', 'published')", + "name": "app_session_environment", + "entityType": "checks", + "schema": "apps", + "table": "app_session" + }, + { + "value": "\"state\" IN ('sending', 'ready', 'failed', 'pruning')", + "name": "app_version_state", + "entityType": "checks", + "schema": "apps", + "table": "app_version" + }, + { + "value": "\"state\" <> 'failed' OR \"failure\" IS NOT NULL", + "name": "app_version_failed_has_failure", + "entityType": "checks", + "schema": "apps", + "table": "app_version" + }, + { + "value": "\"number\" > 0", + "name": "app_version_number_positive", + "entityType": "checks", + "schema": "apps", + "table": "app_version" + }, + { + "value": "\"digest\" ~ '^[0-9a-f]{64}$'", + "name": "app_version_digest_form", + "entityType": "checks", + "schema": "apps", + "table": "app_version" + }, + { + "value": "\"sha256\" ~ '^[0-9a-f]{64}$'", + "name": "blob_sha256_form", + "entityType": "checks", + "schema": "apps", + "table": "blob" + }, + { + "value": "octet_length(\"bytes\") <= 10485760", + "name": "blob_size", + "entityType": "checks", + "schema": "apps", + "table": "blob" + }, + { + "value": "\"environment\" IN ('preview', 'published')", + "name": "handoff_environment", + "entityType": "checks", + "schema": "apps", + "table": "handoff" + }, + { + "value": "\"size\" BETWEEN 0 AND 10485760", + "name": "version_file_size", + "entityType": "checks", + "schema": "apps", + "table": "version_file" + }, + { + "value": "char_length(\"name\") BETWEEN 1 AND 60 AND \"name\" = btrim(\"name\")", + "name": "connection_name", + "entityType": "checks", + "schema": "connectors", + "table": "connection" + }, + { + "value": "\"state\" IN ('NEW', 'ACTIVE', 'NEEDS_REAUTH')", + "name": "connection_state", + "entityType": "checks", + "schema": "connectors", + "table": "connection" + }, + { + "value": "(\"account_ref\" IS NULL) = (\"account_label\" IS NULL)\n AND (\"account_label\" IS NULL OR char_length(\"account_label\") BETWEEN 1 AND 120)", + "name": "connection_account", + "entityType": "checks", + "schema": "connectors", + "table": "connection" + }, + { + "value": "jsonb_typeof(\"notes\") = 'object' AND octet_length(\"notes\"::text) <= 32768", + "name": "connection_notes", + "entityType": "checks", + "schema": "connectors", + "table": "connection" + }, + { + "value": "\"connector_id\" ~ '^[a-z][a-z0-9-]{1,31}$'", + "name": "connection_connector_id", + "entityType": "checks", + "schema": "connectors", + "table": "connection" + }, + { + "value": "\"name\" IS NULL OR (char_length(\"name\") BETWEEN 1 AND 60 AND \"name\" = btrim(\"name\"))", + "name": "connection_sign_in_name", + "entityType": "checks", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "value": "(\"connection_id\" IS NULL) <> (\"name\" IS NULL)\n AND (\"connection_id\" IS NULL) = (\"connection_revision\" IS NULL)", + "name": "connection_sign_in_target", + "entityType": "checks", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "value": "(\"agent_id\" is not null and \"version_number\" is not null and \"person_id\" is null) or (\"agent_id\" is null and \"version_number\" is null and \"person_id\" is not null)", + "name": "connector_write_speaker", + "entityType": "checks", + "schema": "connectors", + "table": "connector_write" + }, + { + "value": "\"state\" in ('SENDING', 'DONE', 'REFUSED', 'UNCERTAIN')", + "name": "connector_write_state", + "entityType": "checks", + "schema": "connectors", + "table": "connector_write" + }, + { + "value": "(\"claim_token\" IS NULL) = (\"claimed_until\" IS NULL)", + "name": "copy_claim", + "entityType": "checks", + "schema": "copies", + "table": "copy" + }, + { + "value": "\"name\" ~ '^[a-z][a-z0-9_]{0,39}$'", + "name": "copy_name", + "entityType": "checks", + "schema": "copies", + "table": "copy" + }, + { + "value": "jsonb_typeof(\"definition\") = 'object'", + "name": "copy_definition", + "entityType": "checks", + "schema": "copies", + "table": "copy" + }, + { + "value": "\"name\" ~ '^[a-z][a-z0-9_]{0,39}$'", + "name": "copy_proposal_name", + "entityType": "checks", + "schema": "copies", + "table": "copy_proposal" + }, + { + "value": "jsonb_typeof(\"definition\") = 'object'", + "name": "copy_proposal_definition", + "entityType": "checks", + "schema": "copies", + "table": "copy_proposal" + }, + { + "value": "\"proved_rows\" BETWEEN 0 AND 50", + "name": "copy_proposal_proved_rows", + "entityType": "checks", + "schema": "copies", + "table": "copy_proposal" + }, + { + "value": "\"state\" IN ('OPEN', 'ACCEPTED', 'DISMISSED')", + "name": "copy_proposal_state", + "entityType": "checks", + "schema": "copies", + "table": "copy_proposal" + }, + { + "value": "\"state\" = 'ACCEPTED' OR \"copy_id\" IS NULL", + "name": "copy_proposal_copy", + "entityType": "checks", + "schema": "copies", + "table": "copy_proposal" + }, + { + "value": "(\"ended_at\" IS NULL) = (\"outcome\" IS NULL)", + "name": "copy_run_ended", + "entityType": "checks", + "schema": "copies", + "table": "copy_run" + }, + { + "value": "\"outcome\" IS NULL OR \"outcome\" IN ('COMPLETE', 'PARTIAL', 'ERROR', 'INTERRUPTED')", + "name": "copy_run_outcome", + "entityType": "checks", + "schema": "copies", + "table": "copy_run" + }, + { + "value": "\"position\" IS NULL OR jsonb_typeof(\"position\") = 'object'", + "name": "copy_source_position", + "entityType": "checks", + "schema": "copies", + "table": "copy_source" + }, + { + "value": "\"name\" ~ '^[a-z][a-z0-9_]{0,39}$'", + "name": "copy_table_left_name", + "entityType": "checks", + "schema": "copies", + "table": "copy_table_left" + }, + { + "value": "\"nickname\" ~ '^[a-z0-9]+(-[a-z0-9]+)*$' and char_length(\"nickname\") BETWEEN 3 AND 30", + "name": "company_nickname_form", + "entityType": "checks", + "schema": "auth", + "table": "company" + }, + { + "value": "(\"project_id\" is null) = (\"role\" is not null)", + "name": "invitation_kind", + "entityType": "checks", + "schema": "auth", + "table": "invitation" + }, + { + "value": "\"kind\" in ('AUTOMATION_DONE', 'AUTOMATION_FAILED', 'AUTOMATION_PAUSED')", + "name": "notification_kind", + "entityType": "checks", + "schema": "notifications", + "table": "notification" + }, + { + "value": "\"kind\" <> 'AUTOMATION_DONE' or (\"conversation_id\" is not null and \"failure_code\" is null)", + "name": "notification_done", + "entityType": "checks", + "schema": "notifications", + "table": "notification" + }, + { + "value": "\"kind\" <> 'AUTOMATION_FAILED' or (\"failure_code\" is not null and \"failure_code\" in ('MODEL_NO_ACCOUNT', 'MODEL_CALL_FAILED', 'MODEL_REFUSED', 'MODEL_ANSWER_CUT', 'MACHINE_UNAVAILABLE', 'MACHINE_LOST', 'HUB_UPDATED', 'INTERNAL_UNEXPECTED', 'DATABASE_UNAVAILABLE', 'INTERRUPTED', 'SCHEDULE_PUBLISH_FAILED'))", + "name": "notification_failed", + "entityType": "checks", + "schema": "notifications", + "table": "notification" + }, + { + "value": "\"kind\" <> 'AUTOMATION_PAUSED' or (\"conversation_id\" is null and \"failure_code\" is null)", + "name": "notification_paused", + "entityType": "checks", + "schema": "notifications", + "table": "notification" + }, + { + "value": "\"kind\" in ('REQUEST_OPENED', 'REQUEST_DECIDED')", + "name": "request_notice_kind", + "entityType": "checks", + "schema": "notifications", + "table": "request_notice" + }, + { + "value": "\"cnpj\" ~ '^[0-9A-Z]{12}[0-9]{2}$'", + "name": "client_cnpj_format", + "entityType": "checks", + "schema": "operations", + "table": "client" + }, + { + "value": "char_length(\"legal_name\") BETWEEN 1 AND 150", + "name": "client_legal_name_length", + "entityType": "checks", + "schema": "operations", + "table": "client" + }, + { + "value": "\"revision\" >= 0", + "name": "client_revision_not_negative", + "entityType": "checks", + "schema": "operations", + "table": "client" + }, + { + "value": "\"state\" IN ('creating', 'ready')", + "name": "company_database_state", + "entityType": "checks", + "schema": "projects", + "table": "company_database" + }, + { + "value": "(\"state\" = 'ready') = (\"neon_project_id\" IS NOT NULL)", + "name": "company_database_ready_has_project", + "entityType": "checks", + "schema": "projects", + "table": "company_database" + }, + { + "value": "(\"state\" = 'creating') = (\"claimed_until\" IS NOT NULL)", + "name": "company_database_creating_has_claim", + "entityType": "checks", + "schema": "projects", + "table": "company_database" + }, + { + "value": "\"host_label\" ~ '^[a-z0-9]+(-[a-z0-9]+)*--[a-z0-9]+(-[a-z0-9]+)*$' and char_length(\"host_label\") <= 63", + "name": "project_host_label_form", + "entityType": "checks", + "schema": "projects", + "table": "project" + }, + { + "value": "char_length(\"name\") BETWEEN 1 AND 100", + "name": "project_name_length", + "entityType": "checks", + "schema": "projects", + "table": "project" + }, + { + "value": "\"kind\" in ('PUBLISH_APP_VERSION')", + "name": "request_kind", + "entityType": "checks", + "schema": "requests", + "table": "request" + }, + { + "value": "\"number\" > 0", + "name": "request_number", + "entityType": "checks", + "schema": "requests", + "table": "request" + }, + { + "value": "char_length(\"message\") <= 280", + "name": "request_message", + "entityType": "checks", + "schema": "requests", + "table": "request" + }, + { + "value": "\"state\" in ('PENDING', 'APPROVED', 'DECLINED', 'CANCELLED', 'SUPERSEDED')", + "name": "request_state", + "entityType": "checks", + "schema": "requests", + "table": "request" + }, + { + "value": "(\"state\" in ('PENDING', 'CANCELLED')) = (\"decided_by\" is null)", + "name": "request_decided", + "entityType": "checks", + "schema": "requests", + "table": "request" + }, + { + "value": "\"reason\" is null or \"state\" = 'DECLINED'", + "name": "request_reason", + "entityType": "checks", + "schema": "requests", + "table": "request" + }, + { + "value": "\"version\" ~ '^v[0-9]+\\.[0-9]+\\.[0-9]+$'", + "name": "starts_version_format", + "entityType": "checks", + "schema": "hub", + "table": "starts" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "agent" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_agent_companies" + ], + "using": "true", + "withCheck": null, + "name": "agent_companies_select", + "entityType": "policies", + "schema": "builder", + "table": "agent" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "agent_conversation" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "agent_tool" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "agent_version" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "agent_version_tool" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "assistant_conversation" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "conversation" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "company_select", + "entityType": "policies", + "schema": "builder", + "table": "company_account_kind" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_select", + "entityType": "policies", + "schema": "builder", + "table": "company_account_kind" + }, + { + "as": "PERMISSIVE", + "for": "INSERT", + "roles": [ + "hub_operator" + ], + "using": null, + "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "operator_insert", + "entityType": "policies", + "schema": "builder", + "table": "company_account_kind" + }, + { + "as": "PERMISSIVE", + "for": "DELETE", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_delete", + "entityType": "policies", + "schema": "builder", + "table": "company_account_kind" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "company_model" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "company_model_fallback" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id is null or person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id is null or person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "model_account" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_model_seals" + ], + "using": "true", + "withCheck": null, + "name": "model_seals_select", + "entityType": "policies", + "schema": "builder", + "table": "model_account" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "model_account_assignee" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_model_seals" + ], + "using": "true", + "withCheck": null, + "name": "model_seals_select", + "entityType": "policies", + "schema": "builder", + "table": "model_account_sign_in" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "observational_memory_models" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '') and person_id = nullif(current_setting('conexus.person_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '') and person_id = nullif(current_setting('conexus.person_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "person_model_default" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "tool" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "builder", + "table": "tool_version" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "apps", + "table": "app" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_select", + "entityType": "policies", + "schema": "apps", + "table": "app" + }, + { + "as": "PERMISSIVE", + "for": "DELETE", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_delete", + "entityType": "policies", + "schema": "apps", + "table": "app" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_app_companies" + ], + "using": "true", + "withCheck": null, + "name": "companies_select", + "entityType": "policies", + "schema": "apps", + "table": "app" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "apps", + "table": "app_version" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_select", + "entityType": "policies", + "schema": "apps", + "table": "app_version" + }, + { + "as": "PERMISSIVE", + "for": "DELETE", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_delete", + "entityType": "policies", + "schema": "apps", + "table": "app_version" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "apps", + "table": "blob" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_select", + "entityType": "policies", + "schema": "apps", + "table": "blob" + }, + { + "as": "PERMISSIVE", + "for": "DELETE", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_delete", + "entityType": "policies", + "schema": "apps", + "table": "blob" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "apps", + "table": "version_file" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_select", + "entityType": "policies", + "schema": "apps", + "table": "version_file" + }, + { + "as": "PERMISSIVE", + "for": "DELETE", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_delete", + "entityType": "policies", + "schema": "apps", + "table": "version_file" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "connectors", + "table": "connection" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_connection_seals" + ], + "using": "true", + "withCheck": null, + "name": "connection_seals_select", + "entityType": "policies", + "schema": "connectors", + "table": "connection" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", + "name": "company_all", + "entityType": "policies", + "schema": "connectors", + "table": "connection_sign_in" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "connectors", + "table": "connector_write" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "connectors", + "table": "project_connection" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "copies", + "table": "copy" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "copies", + "table": "copy_proposal" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "copies", + "table": "copy_proposal_source" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "copies", + "table": "copy_run" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "copies", + "table": "copy_source" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "copies", + "table": "copy_table_left" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "copies", + "table": "project_copy" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "auth", + "table": "company" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_app_people" + ], + "using": "true", + "withCheck": null, + "name": "app_people_select", + "entityType": "policies", + "schema": "auth", + "table": "company" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_person" + ], + "using": "exists (select 1 from auth.member m where m.company_id = company.id and m.user_id = nullif(current_setting('conexus.person_id', true), ''))", + "withCheck": null, + "name": "person_select", + "entityType": "policies", + "schema": "auth", + "table": "company" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_invitation" + ], + "using": "exists (select 1 from auth.invitation i where i.id = nullif(current_setting('conexus.invitation_id', true), '') and i.company_id = company.id)", + "withCheck": "exists (select 1 from auth.invitation i where i.id = nullif(current_setting('conexus.invitation_id', true), '') and i.company_id = company.id)", + "name": "invitation_all", + "entityType": "policies", + "schema": "auth", + "table": "company" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), ''))", + "withCheck": null, + "name": "operator_select", + "entityType": "policies", + "schema": "auth", + "table": "company" + }, + { + "as": "PERMISSIVE", + "for": "INSERT", + "roles": [ + "hub_operator" + ], + "using": null, + "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), ''))", + "name": "operator_insert", + "entityType": "policies", + "schema": "auth", + "table": "company" + }, + { + "as": "PERMISSIVE", + "for": "UPDATE", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and id = nullif(current_setting('conexus.company_id', true), '')", + "name": "operator_update", + "entityType": "policies", + "schema": "auth", + "table": "company" + }, + { + "as": "PERMISSIVE", + "for": "DELETE", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_delete", + "entityType": "policies", + "schema": "auth", + "table": "company" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "auth", + "table": "invitation" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_person" + ], + "using": "inviter_id = nullif(current_setting('conexus.person_id', true), '')\n or lower(email) = (select u.email from auth.\"user\" u where u.id = nullif(current_setting('conexus.person_id', true), ''))", + "withCheck": null, + "name": "person_select", + "entityType": "policies", + "schema": "auth", + "table": "invitation" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_invitation" + ], + "using": "id = nullif(current_setting('conexus.invitation_id', true), '')", + "withCheck": "id = nullif(current_setting('conexus.invitation_id', true), '')", + "name": "invitation_all", + "entityType": "policies", + "schema": "auth", + "table": "invitation" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and (role = 'owner' or company_id = nullif(current_setting('conexus.company_id', true), ''))", + "withCheck": null, + "name": "operator_select", + "entityType": "policies", + "schema": "auth", + "table": "invitation" + }, + { + "as": "PERMISSIVE", + "for": "INSERT", + "roles": [ + "hub_operator" + ], + "using": null, + "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and role = 'owner'", + "name": "operator_insert", + "entityType": "policies", + "schema": "auth", + "table": "invitation" + }, + { + "as": "PERMISSIVE", + "for": "UPDATE", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and role = 'owner'", + "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and role = 'owner'", + "name": "operator_update", + "entityType": "policies", + "schema": "auth", + "table": "invitation" + }, + { + "as": "PERMISSIVE", + "for": "DELETE", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_delete", + "entityType": "policies", + "schema": "auth", + "table": "invitation" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "auth", + "table": "member" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_person" + ], + "using": "user_id = nullif(current_setting('conexus.person_id', true), '')", + "withCheck": null, + "name": "person_select", + "entityType": "policies", + "schema": "auth", + "table": "member" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_invitation" + ], + "using": "exists (select 1 from auth.invitation i where i.id = nullif(current_setting('conexus.invitation_id', true), '') and i.company_id = member.company_id)", + "withCheck": null, + "name": "invitation_select", + "entityType": "policies", + "schema": "auth", + "table": "member" + }, + { + "as": "PERMISSIVE", + "for": "INSERT", + "roles": [ + "hub_invitation" + ], + "using": null, + "withCheck": "user_id = nullif(current_setting('conexus.person_id', true), '')\n and exists (select 1 from auth.invitation i where i.id = nullif(current_setting('conexus.invitation_id', true), '') and i.company_id = member.company_id)", + "name": "invitation_insert", + "entityType": "policies", + "schema": "auth", + "table": "member" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and (role = 'owner' or company_id = nullif(current_setting('conexus.company_id', true), ''))", + "withCheck": null, + "name": "operator_select", + "entityType": "policies", + "schema": "auth", + "table": "member" + }, + { + "as": "PERMISSIVE", + "for": "DELETE", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_delete", + "entityType": "policies", + "schema": "auth", + "table": "member" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "auth", + "table": "organization_role" + }, + { + "as": "PERMISSIVE", + "for": "INSERT", + "roles": [ + "hub_operator" + ], + "using": null, + "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), ''))", + "name": "operator_insert", + "entityType": "policies", + "schema": "auth", + "table": "organization_role" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_runtime" + ], + "using": "true", + "withCheck": "true", + "name": "runtime_all", + "entityType": "policies", + "schema": "auth", + "table": "session" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "user_id = nullif(current_setting('conexus.person_id', true), '')", + "withCheck": "user_id = nullif(current_setting('conexus.person_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "auth", + "table": "session" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_invitation" + ], + "using": "user_id = nullif(current_setting('conexus.person_id', true), '')\n or exists (select 1 from auth.invitation i join auth.\"user\" u on u.email = lower(i.email)\n where i.id = nullif(current_setting('conexus.invitation_id', true), '') and u.id = session.user_id)", + "withCheck": "user_id = nullif(current_setting('conexus.person_id', true), '')\n or exists (select 1 from auth.invitation i join auth.\"user\" u on u.email = lower(i.email)\n where i.id = nullif(current_setting('conexus.invitation_id', true), '') and u.id = session.user_id)", + "name": "invitation_all", + "entityType": "policies", + "schema": "auth", + "table": "session" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_runtime" + ], + "using": "true", + "withCheck": "true", + "name": "runtime_sign_in", + "entityType": "policies", + "schema": "auth", + "table": "user" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "id = nullif(current_setting('conexus.person_id', true), '')\n or exists (select 1 from auth.member m where m.user_id = \"user\".id and m.company_id = nullif(current_setting('conexus.company_id', true), ''))\n or exists (select 1 from auth.invitation i where i.inviter_id = \"user\".id and i.company_id = nullif(current_setting('conexus.company_id', true), ''))\n or exists (select 1 from projects.app_access a where a.person_id = \"user\".id and a.company_id = nullif(current_setting('conexus.company_id', true), ''))", + "withCheck": "id = nullif(current_setting('conexus.person_id', true), '')\n or exists (select 1 from auth.member m where m.user_id = \"user\".id and m.company_id = nullif(current_setting('conexus.company_id', true), ''))\n or exists (select 1 from auth.invitation i where i.inviter_id = \"user\".id and i.company_id = nullif(current_setting('conexus.company_id', true), ''))\n or exists (select 1 from projects.app_access a where a.person_id = \"user\".id and a.company_id = nullif(current_setting('conexus.company_id', true), ''))", + "name": "company_all", + "entityType": "policies", + "schema": "auth", + "table": "user" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_person" + ], + "using": "id = nullif(current_setting('conexus.person_id', true), '')", + "withCheck": "id = nullif(current_setting('conexus.person_id', true), '')", + "name": "person_all", + "entityType": "policies", + "schema": "auth", + "table": "user" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_invitation" + ], + "using": "id = nullif(current_setting('conexus.person_id', true), '')\n or exists (select 1 from auth.invitation i where i.id = nullif(current_setting('conexus.invitation_id', true), '')\n and (i.inviter_id = \"user\".id or lower(i.email) = \"user\".email))", + "withCheck": "id = nullif(current_setting('conexus.person_id', true), '')\n or exists (select 1 from auth.invitation i where i.id = nullif(current_setting('conexus.invitation_id', true), '')\n and (i.inviter_id = \"user\".id or lower(i.email) = \"user\".email))", + "name": "invitation_all", + "entityType": "policies", + "schema": "auth", + "table": "user" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_administrators" + ], + "using": "role = 'admin'", + "withCheck": null, + "name": "administrators_select", + "entityType": "policies", + "schema": "auth", + "table": "user" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and (role = 'admin'\n or exists (select 1 from auth.member m where m.user_id = \"user\".id and m.role = 'owner'))", + "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and (role = 'admin'\n or exists (select 1 from auth.member m where m.user_id = \"user\".id and m.role = 'owner'))", + "name": "operator_all", + "entityType": "policies", + "schema": "auth", + "table": "user" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '') and person_id = nullif(current_setting('conexus.person_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '') and person_id = nullif(current_setting('conexus.person_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "notifications", + "table": "notification" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '') and person_id = nullif(current_setting('conexus.person_id', true), '')", + "withCheck": null, + "name": "company_select", + "entityType": "policies", + "schema": "notifications", + "table": "request_notice" + }, + { + "as": "PERMISSIVE", + "for": "UPDATE", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '') and person_id = nullif(current_setting('conexus.person_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '') and person_id = nullif(current_setting('conexus.person_id', true), '')", + "name": "company_update", + "entityType": "policies", + "schema": "notifications", + "table": "request_notice" + }, + { + "as": "PERMISSIVE", + "for": "INSERT", + "roles": [ + "hub_company" + ], + "using": null, + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_insert", + "entityType": "policies", + "schema": "notifications", + "table": "request_notice" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), ''))", + "withCheck": null, + "name": "operator_select", + "entityType": "policies", + "schema": "operations", + "table": "client" + }, + { + "as": "PERMISSIVE", + "for": "INSERT", + "roles": [ + "hub_operator" + ], + "using": null, + "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), ''))", + "name": "operator_insert", + "entityType": "policies", + "schema": "operations", + "table": "client" + }, + { + "as": "PERMISSIVE", + "for": "UPDATE", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), ''))", + "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), ''))", + "name": "operator_update", + "entityType": "policies", + "schema": "operations", + "table": "client" + }, + { + "as": "PERMISSIVE", + "for": "DELETE", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_delete", + "entityType": "policies", + "schema": "operations", + "table": "client" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "projects", + "table": "app_access" + }, + { + "as": "PERMISSIVE", + "for": "INSERT", + "roles": [ + "hub_invitation" + ], + "using": null, + "withCheck": "exists (select 1 from auth.invitation i\n join auth.\"user\" u on lower(u.email) = lower(i.email)\n where i.id = nullif(current_setting('conexus.invitation_id', true), '') and i.company_id = app_access.company_id\n and i.project_id = app_access.project_id and i.app_role is not distinct from app_access.role\n and u.id = app_access.person_id)", + "name": "invitation_insert", + "entityType": "policies", + "schema": "projects", + "table": "app_access" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_invitation" + ], + "using": "exists (select 1 from auth.invitation i\n join auth.\"user\" u on lower(u.email) = lower(i.email)\n where i.id = nullif(current_setting('conexus.invitation_id', true), '') and i.project_id = app_access.project_id\n and u.id = app_access.person_id)", + "withCheck": null, + "name": "invitation_select", + "entityType": "policies", + "schema": "projects", + "table": "app_access" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_app_people" + ], + "using": "true", + "withCheck": null, + "name": "app_people_select", + "entityType": "policies", + "schema": "projects", + "table": "app_access" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "projects", + "table": "company_database" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_select", + "entityType": "policies", + "schema": "projects", + "table": "company_database" + }, + { + "as": "PERMISSIVE", + "for": "DELETE", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_delete", + "entityType": "policies", + "schema": "projects", + "table": "company_database" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "projects", + "table": "project" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_select", + "entityType": "policies", + "schema": "projects", + "table": "project" + }, + { + "as": "PERMISSIVE", + "for": "DELETE", + "roles": [ + "hub_operator" + ], + "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": null, + "name": "operator_delete", + "entityType": "policies", + "schema": "projects", + "table": "project" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_hosts" + ], + "using": "true", + "withCheck": null, + "name": "hosts_select", + "entityType": "policies", + "schema": "projects", + "table": "project" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_app_people" + ], + "using": "true", + "withCheck": null, + "name": "app_people_select", + "entityType": "policies", + "schema": "projects", + "table": "project" + }, + { + "as": "PERMISSIVE", + "for": "SELECT", + "roles": [ + "hub_invitation" + ], + "using": "exists (select 1 from auth.invitation i where i.id = nullif(current_setting('conexus.invitation_id', true), '')\n and i.company_id = project.company_id and i.project_id = project.id)", + "withCheck": null, + "name": "invitation_select", + "entityType": "policies", + "schema": "projects", + "table": "project" + }, + { + "as": "PERMISSIVE", + "for": "ALL", + "roles": [ + "hub_company" + ], + "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", + "name": "company_all", + "entityType": "policies", + "schema": "requests", + "table": "request" + } + ], + "renames": [] +} \ No newline at end of file diff --git a/apps/server/src/hub/copies/tables.ts b/apps/server/src/hub/copies/tables.ts index eed32ef0..ba69d60e 100644 --- a/apps/server/src/hub/copies/tables.ts +++ b/apps/server/src/hub/copies/tables.ts @@ -176,6 +176,9 @@ export const copyProposal = copies.table( proposedBy: text('proposed_by').notNull(), provedRows: integer('proved_rows').notNull(), provedMore: boolean('proved_more').notNull(), + // The calls a whole pass would spend, summed over the proposal's connections; null when a read + // does not tell its total (O Sync de qualquer conector, U4). + provedCalls: integer('proved_calls'), proposedAt: instant('proposed_at').notNull(), state: text('state', { enum: ['OPEN', 'ACCEPTED', 'DISMISSED'] }).notNull(), // The copy it turned into; null again when that copy is deleted, a row nobody reads (data D15). @@ -217,3 +220,102 @@ export const copyProposal = copies.table( policy(SCOPE_ROLES.COMPANY, 'all', sql`company_id = ${scoped.companyId}`), ], ) + +/** + * Each connection a copy reads, with its account, where its pass stands and until when the provider + * asked it to wait (O Sync de qualquer conector): a copy of two accounts keeps, for each, how far it + * has read. The position, the watermark and the wait are ours (docs/reference/boundaries.md). + */ +export const copySource = copies.table( + 'copy_source', + { + companyId: text('company_id').notNull(), + copyId: uuid('copy_id').notNull(), + // The connection's connector, so the row's connection is its company's (as copy). + connectorId: text('connector_id').notNull(), + connectionId: uuid('connection_id').notNull(), + // The connection's `AccountRef`; null on a connector whose account is `none`. + accountRef: text('account_ref'), + pass: integer('pass').notNull().default(0), + passStartedAt: instant('pass_started_at'), + // `CopyPosition` of the kit, parsed again at each run (code C27). + position: jsonb('position'), + watermark: instant('watermark'), + // The provider asked to wait: no call before this instant. + waitUntil: instant('wait_until'), + createdAt: instant('created_at').notNull(), + }, + (table) => [ + primaryKey({ columns: [table.copyId, table.connectionId] }), + unique('copy_source_copy_id_account_ref_key').on(table.copyId, table.accountRef), + foreignKey({ + name: 'copy_source_copy_fkey', + columns: [table.companyId, table.copyId], + foreignColumns: [copy.companyId, copy.id], + }).onDelete('cascade'), + foreignKey({ + name: 'copy_source_connection_fkey', + columns: [table.companyId, table.connectorId, table.connectionId], + foreignColumns: [connection.companyId, connection.connectorId, connection.id], + }).onDelete('cascade'), + check( + 'copy_source_position', + sql`${table.position} IS NULL OR jsonb_typeof(${table.position}) = 'object'`, + ), + policy(SCOPE_ROLES.COMPANY, 'all', sql`company_id = ${scoped.companyId}`), + ], +) + +/** + * The table of a copy that ended while the company's database did not answer: written in the + * transaction that ended the copy, and gone once its table is dropped. No foreign key to the copy, + * which has already left. + */ +export const copyTableLeft = copies.table( + 'copy_table_left', + { + companyId: text('company_id').notNull(), + copyId: uuid('copy_id').notNull(), + // The table in the company's `sync` schema (`CopyName`). + name: text('name').notNull(), + }, + (table) => [ + primaryKey({ columns: [table.companyId, table.copyId] }), + foreignKey({ + name: 'copy_table_left_company_id_fkey', + columns: [table.companyId], + foreignColumns: [company.id], + }).onDelete('cascade'), + check('copy_table_left_name', sql`${table.name} ~ '^[a-z][a-z0-9_]{0,39}$'`), + policy(SCOPE_ROLES.COMPANY, 'all', sql`company_id = ${scoped.companyId}`), + ], +) + +/** + * Each connection a proposal reads (O Sync de qualquer conector, U4). The proposal's own connection + * stays its first; deleting another connection takes only its row. + */ +export const copyProposalSource = copies.table( + 'copy_proposal_source', + { + companyId: text('company_id').notNull(), + proposalId: uuid('proposal_id').notNull(), + // The connection's connector, so the row's connection is its company's (as copy_proposal). + connectorId: text('connector_id').notNull(), + connectionId: uuid('connection_id').notNull(), + }, + (table) => [ + primaryKey({ columns: [table.proposalId, table.connectionId] }), + foreignKey({ + name: 'copy_proposal_source_proposal_fkey', + columns: [table.proposalId], + foreignColumns: [copyProposal.id], + }).onDelete('cascade'), + foreignKey({ + name: 'copy_proposal_source_connection_fkey', + columns: [table.companyId, table.connectorId, table.connectionId], + foreignColumns: [connection.companyId, connection.connectorId, connection.id], + }).onDelete('cascade'), + policy(SCOPE_ROLES.COMPANY, 'all', sql`company_id = ${scoped.companyId}`), + ], +) From 8e85b71b6b58e6c8aad7766e593f1180f395a155 Mon Sep 17 00:00:00 2001 From: developmentconexus Date: Wed, 11 Nov 2026 20:53:09 -0300 Subject: [PATCH 2/2] =?UTF-8?q?style(sync):=20os=20instant=C3=A2neos=20das?= =?UTF-8?q?=20migra=C3=A7=C3=B5es=20das=20fontes=20no=20formato=20do=20Bio?= =?UTF-8?q?me?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../snapshot.json | 1498 ++++------------- .../snapshot.json | 1498 ++++------------- 2 files changed, 680 insertions(+), 2316 deletions(-) diff --git a/apps/server/migrations/20261111234347_sync_copy_sources/snapshot.json b/apps/server/migrations/20261111234347_sync_copy_sources/snapshot.json index a69de2e2..b1f63562 100644 --- a/apps/server/migrations/20261111234347_sync_copy_sources/snapshot.json +++ b/apps/server/migrations/20261111234347_sync_copy_sources/snapshot.json @@ -2,9 +2,7 @@ "version": "8", "dialect": "postgres", "id": "2e2e90ee-e859-4e6b-8f69-54dd30079999", - "prevIds": [ - "4d36c022-ab8d-4467-ba59-2548cebb07ff" - ], + "prevIds": ["4d36c022-ab8d-4467-ba59-2548cebb07ff"], "ddl": [ { "name": "builder", @@ -6223,14 +6221,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "agent_company_id_fkey", @@ -6240,16 +6234,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "project_id" - ], + "columns": ["company_id", "project_id"], "schemaTo": "projects", "tableTo": "project", - "columnsTo": [ - "company_id", - "id" - ], + "columnsTo": ["company_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "agent_project_fkey", @@ -6259,18 +6247,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "id", - "active_version" - ], + "columns": ["company_id", "id", "active_version"], "schemaTo": "builder", "tableTo": "agent_version", - "columnsTo": [ - "company_id", - "agent_id", - "number" - ], + "columnsTo": ["company_id", "agent_id", "number"], "onUpdate": "NO ACTION", "onDelete": "NO ACTION", "name": "agent_active_version_fkey", @@ -6280,14 +6260,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "agent_conversation_company_id_fkey", @@ -6297,16 +6273,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "agent_id" - ], + "columns": ["company_id", "agent_id"], "schemaTo": "builder", "tableTo": "agent", - "columnsTo": [ - "company_id", - "id" - ], + "columnsTo": ["company_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "agent_conversation_agent_fkey", @@ -6316,16 +6286,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "person_id" - ], + "columns": ["company_id", "person_id"], "schemaTo": "auth", "tableTo": "member", - "columnsTo": [ - "company_id", - "user_id" - ], + "columnsTo": ["company_id", "user_id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "agent_conversation_member_fkey", @@ -6335,16 +6299,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "agent_id" - ], + "columns": ["company_id", "agent_id"], "schemaTo": "builder", "tableTo": "agent", - "columnsTo": [ - "company_id", - "id" - ], + "columnsTo": ["company_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "agent_tool_agent_fkey", @@ -6354,16 +6312,10 @@ }, { "nameExplicit": true, - "columns": [ - "tool_id", - "tool_version_id" - ], + "columns": ["tool_id", "tool_version_id"], "schemaTo": "builder", "tableTo": "tool_version", - "columnsTo": [ - "tool_id", - "id" - ], + "columnsTo": ["tool_id", "id"], "onUpdate": "NO ACTION", "onDelete": "NO ACTION", "name": "agent_tool_tool_version_fkey", @@ -6373,16 +6325,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "tool_version_id" - ], + "columns": ["company_id", "tool_version_id"], "schemaTo": "builder", "tableTo": "tool_version", - "columnsTo": [ - "company_id", - "id" - ], + "columnsTo": ["company_id", "id"], "onUpdate": "NO ACTION", "onDelete": "NO ACTION", "name": "agent_tool_company_tool_version_fkey", @@ -6392,16 +6338,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "agent_id" - ], + "columns": ["company_id", "agent_id"], "schemaTo": "builder", "tableTo": "agent", - "columnsTo": [ - "company_id", - "id" - ], + "columnsTo": ["company_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "agent_version_agent_fkey", @@ -6411,18 +6351,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "agent_id", - "number" - ], + "columns": ["company_id", "agent_id", "number"], "schemaTo": "builder", "tableTo": "agent_version", - "columnsTo": [ - "company_id", - "agent_id", - "number" - ], + "columnsTo": ["company_id", "agent_id", "number"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "agent_version_tool_agent_version_fkey", @@ -6432,16 +6364,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "tool_version_id" - ], + "columns": ["company_id", "tool_version_id"], "schemaTo": "builder", "tableTo": "tool_version", - "columnsTo": [ - "company_id", - "id" - ], + "columnsTo": ["company_id", "id"], "onUpdate": "NO ACTION", "onDelete": "NO ACTION", "name": "agent_version_tool_tool_version_fkey", @@ -6451,14 +6377,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "assistant_conversation_company_id_fkey", @@ -6468,14 +6390,10 @@ }, { "nameExplicit": true, - "columns": [ - "project_id" - ], + "columns": ["project_id"], "schemaTo": "projects", "tableTo": "project", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "assistant_conversation_project_id_fkey", @@ -6485,16 +6403,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "person_id" - ], + "columns": ["company_id", "person_id"], "schemaTo": "auth", "tableTo": "member", - "columnsTo": [ - "company_id", - "user_id" - ], + "columnsTo": ["company_id", "user_id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "assistant_conversation_member_fkey", @@ -6504,14 +6416,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "conversation_company_id_fkey", @@ -6521,14 +6429,10 @@ }, { "nameExplicit": true, - "columns": [ - "project_id" - ], + "columns": ["project_id"], "schemaTo": "projects", "tableTo": "project", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "conversation_project_id_fkey", @@ -6538,16 +6442,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "person_id" - ], + "columns": ["company_id", "person_id"], "schemaTo": "auth", "tableTo": "member", - "columnsTo": [ - "company_id", - "user_id" - ], + "columnsTo": ["company_id", "user_id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "conversation_member_fkey", @@ -6557,14 +6455,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "company_account_kind_company_id_fkey", @@ -6574,14 +6468,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "company_model_company_id_fkey", @@ -6591,14 +6481,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "company_model_fallback_company_id_fkey", @@ -6608,14 +6494,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "model_account_company_id_fkey", @@ -6625,16 +6507,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "person_id" - ], + "columns": ["company_id", "person_id"], "schemaTo": "auth", "tableTo": "member", - "columnsTo": [ - "company_id", - "user_id" - ], + "columnsTo": ["company_id", "user_id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "model_account_member_fkey", @@ -6644,14 +6520,10 @@ }, { "nameExplicit": true, - "columns": [ - "account_id" - ], + "columns": ["account_id"], "schemaTo": "builder", "tableTo": "model_account", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "model_account_assignee_account_id_fkey", @@ -6661,16 +6533,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "person_id" - ], + "columns": ["company_id", "person_id"], "schemaTo": "auth", "tableTo": "member", - "columnsTo": [ - "company_id", - "user_id" - ], + "columnsTo": ["company_id", "user_id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "model_account_assignee_member_fkey", @@ -6680,16 +6546,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "person_id" - ], + "columns": ["company_id", "person_id"], "schemaTo": "auth", "tableTo": "member", - "columnsTo": [ - "company_id", - "user_id" - ], + "columnsTo": ["company_id", "user_id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "model_account_sign_in_member_fkey", @@ -6699,14 +6559,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "observational_memory_models_company_id_fkey", @@ -6716,16 +6572,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "person_id" - ], + "columns": ["company_id", "person_id"], "schemaTo": "auth", "tableTo": "member", - "columnsTo": [ - "company_id", - "user_id" - ], + "columnsTo": ["company_id", "user_id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "person_model_default_member_fkey", @@ -6735,14 +6585,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "tool_company_id_fkey", @@ -6752,16 +6598,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "tool_id" - ], + "columns": ["company_id", "tool_id"], "schemaTo": "builder", "tableTo": "tool", - "columnsTo": [ - "company_id", - "id" - ], + "columnsTo": ["company_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "tool_version_tool_fkey", @@ -6771,14 +6611,10 @@ }, { "nameExplicit": true, - "columns": [ - "project_id" - ], + "columns": ["project_id"], "schemaTo": "projects", "tableTo": "project", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "app_project_id_fkey", @@ -6788,16 +6624,10 @@ }, { "nameExplicit": true, - "columns": [ - "project_id", - "live_version_id" - ], + "columns": ["project_id", "live_version_id"], "schemaTo": "apps", "tableTo": "app_version", - "columnsTo": [ - "project_id", - "id" - ], + "columnsTo": ["project_id", "id"], "onUpdate": "NO ACTION", "onDelete": "NO ACTION", "name": "app_live_version_fkey", @@ -6807,16 +6637,10 @@ }, { "nameExplicit": true, - "columns": [ - "project_id", - "published_version_id" - ], + "columns": ["project_id", "published_version_id"], "schemaTo": "apps", "tableTo": "app_version", - "columnsTo": [ - "project_id", - "id" - ], + "columnsTo": ["project_id", "id"], "onUpdate": "NO ACTION", "onDelete": "NO ACTION", "name": "app_published_version_fkey", @@ -6826,16 +6650,10 @@ }, { "nameExplicit": true, - "columns": [ - "project_id", - "sending_version_id" - ], + "columns": ["project_id", "sending_version_id"], "schemaTo": "apps", "tableTo": "app_version", - "columnsTo": [ - "project_id", - "id" - ], + "columnsTo": ["project_id", "id"], "onUpdate": "NO ACTION", "onDelete": "NO ACTION", "name": "app_sending_version_fkey", @@ -6845,14 +6663,10 @@ }, { "nameExplicit": true, - "columns": [ - "hub_session_id" - ], + "columns": ["hub_session_id"], "schemaTo": "auth", "tableTo": "session", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "app_session_hub_session_id_fkey", @@ -6862,14 +6676,10 @@ }, { "nameExplicit": true, - "columns": [ - "project_id" - ], + "columns": ["project_id"], "schemaTo": "apps", "tableTo": "app", - "columnsTo": [ - "project_id" - ], + "columnsTo": ["project_id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "app_version_project_id_fkey", @@ -6879,14 +6689,10 @@ }, { "nameExplicit": true, - "columns": [ - "hub_session_id" - ], + "columns": ["hub_session_id"], "schemaTo": "auth", "tableTo": "session", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "handoff_hub_session_id_fkey", @@ -6896,14 +6702,10 @@ }, { "nameExplicit": true, - "columns": [ - "version_id" - ], + "columns": ["version_id"], "schemaTo": "apps", "tableTo": "app_version", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "version_file_version_id_fkey", @@ -6913,16 +6715,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "sha256" - ], + "columns": ["company_id", "sha256"], "schemaTo": "apps", "tableTo": "blob", - "columnsTo": [ - "company_id", - "sha256" - ], + "columnsTo": ["company_id", "sha256"], "onUpdate": "NO ACTION", "onDelete": "NO ACTION", "name": "version_file_blob_fkey", @@ -6932,14 +6728,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "connection_company_id_fkey", @@ -6949,16 +6741,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "person_id" - ], + "columns": ["company_id", "person_id"], "schemaTo": "auth", "tableTo": "member", - "columnsTo": [ - "company_id", - "user_id" - ], + "columnsTo": ["company_id", "user_id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "connection_sign_in_member_fkey", @@ -6968,18 +6754,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "connector_id", - "connection_id" - ], + "columns": ["company_id", "connector_id", "connection_id"], "schemaTo": "connectors", "tableTo": "connection", - "columnsTo": [ - "company_id", - "connector_id", - "id" - ], + "columnsTo": ["company_id", "connector_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "connection_sign_in_company_id_connector_id_connection_id_fkey", @@ -6989,14 +6767,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "connector_write_company_id_fkey", @@ -7006,18 +6780,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "connector_id", - "connection_id" - ], + "columns": ["company_id", "connector_id", "connection_id"], "schemaTo": "connectors", "tableTo": "connection", - "columnsTo": [ - "company_id", - "connector_id", - "id" - ], + "columnsTo": ["company_id", "connector_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "project_connection_connection_fkey", @@ -7027,16 +6793,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "project_id" - ], + "columns": ["company_id", "project_id"], "schemaTo": "projects", "tableTo": "project", - "columnsTo": [ - "company_id", - "id" - ], + "columnsTo": ["company_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "project_connection_project_fkey", @@ -7046,14 +6806,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "copy_company_id_fkey", @@ -7063,18 +6819,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "connector_id", - "connection_id" - ], + "columns": ["company_id", "connector_id", "connection_id"], "schemaTo": "connectors", "tableTo": "connection", - "columnsTo": [ - "company_id", - "connector_id", - "id" - ], + "columnsTo": ["company_id", "connector_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "copy_connection_fkey", @@ -7084,14 +6832,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "copy_proposal_company_id_fkey", @@ -7101,18 +6845,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "connector_id", - "connection_id" - ], + "columns": ["company_id", "connector_id", "connection_id"], "schemaTo": "connectors", "tableTo": "connection", - "columnsTo": [ - "company_id", - "connector_id", - "id" - ], + "columnsTo": ["company_id", "connector_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "copy_proposal_connection_fkey", @@ -7122,16 +6858,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "project_id" - ], + "columns": ["company_id", "project_id"], "schemaTo": "projects", "tableTo": "project", - "columnsTo": [ - "company_id", - "id" - ], + "columnsTo": ["company_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "copy_proposal_project_fkey", @@ -7141,14 +6871,10 @@ }, { "nameExplicit": true, - "columns": [ - "copy_id" - ], + "columns": ["copy_id"], "schemaTo": "copies", "tableTo": "copy", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "SET NULL", "name": "copy_proposal_copy_fkey", @@ -7158,14 +6884,10 @@ }, { "nameExplicit": true, - "columns": [ - "proposal_id" - ], + "columns": ["proposal_id"], "schemaTo": "copies", "tableTo": "copy_proposal", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "copy_proposal_source_proposal_fkey", @@ -7175,18 +6897,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "connector_id", - "connection_id" - ], + "columns": ["company_id", "connector_id", "connection_id"], "schemaTo": "connectors", "tableTo": "connection", - "columnsTo": [ - "company_id", - "connector_id", - "id" - ], + "columnsTo": ["company_id", "connector_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "copy_proposal_source_connection_fkey", @@ -7196,16 +6910,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "copy_id" - ], + "columns": ["company_id", "copy_id"], "schemaTo": "copies", "tableTo": "copy", - "columnsTo": [ - "company_id", - "id" - ], + "columnsTo": ["company_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "copy_run_copy_fkey", @@ -7215,16 +6923,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "copy_id" - ], + "columns": ["company_id", "copy_id"], "schemaTo": "copies", "tableTo": "copy", - "columnsTo": [ - "company_id", - "id" - ], + "columnsTo": ["company_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "copy_source_copy_fkey", @@ -7234,18 +6936,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "connector_id", - "connection_id" - ], + "columns": ["company_id", "connector_id", "connection_id"], "schemaTo": "connectors", "tableTo": "connection", - "columnsTo": [ - "company_id", - "connector_id", - "id" - ], + "columnsTo": ["company_id", "connector_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "copy_source_connection_fkey", @@ -7255,14 +6949,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "copy_table_left_company_id_fkey", @@ -7272,16 +6962,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "project_id" - ], + "columns": ["company_id", "project_id"], "schemaTo": "projects", "tableTo": "project", - "columnsTo": [ - "company_id", - "id" - ], + "columnsTo": ["company_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "project_copy_project_fkey", @@ -7291,16 +6975,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "copy_id" - ], + "columns": ["company_id", "copy_id"], "schemaTo": "copies", "tableTo": "copy", - "columnsTo": [ - "company_id", - "id" - ], + "columnsTo": ["company_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "project_copy_copy_fkey", @@ -7310,14 +6988,10 @@ }, { "nameExplicit": false, - "columns": [ - "user_id" - ], + "columns": ["user_id"], "schemaTo": "auth", "tableTo": "user", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "account_user_id_user_id_fkey", @@ -7327,14 +7001,10 @@ }, { "nameExplicit": false, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "RESTRICT", "name": "invitation_company_id_company_id_fkey", @@ -7344,14 +7014,10 @@ }, { "nameExplicit": false, - "columns": [ - "inviter_id" - ], + "columns": ["inviter_id"], "schemaTo": "auth", "tableTo": "user", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "RESTRICT", "name": "invitation_inviter_id_user_id_fkey", @@ -7361,14 +7027,10 @@ }, { "nameExplicit": false, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "RESTRICT", "name": "member_company_id_company_id_fkey", @@ -7378,14 +7040,10 @@ }, { "nameExplicit": false, - "columns": [ - "user_id" - ], + "columns": ["user_id"], "schemaTo": "auth", "tableTo": "user", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "RESTRICT", "name": "member_user_id_user_id_fkey", @@ -7395,14 +7053,10 @@ }, { "nameExplicit": false, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "organization_role_company_id_company_id_fkey", @@ -7412,14 +7066,10 @@ }, { "nameExplicit": false, - "columns": [ - "user_id" - ], + "columns": ["user_id"], "schemaTo": "auth", "tableTo": "user", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "session_user_id_user_id_fkey", @@ -7429,14 +7079,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "notification_company_id_fkey", @@ -7446,16 +7092,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "person_id" - ], + "columns": ["company_id", "person_id"], "schemaTo": "auth", "tableTo": "member", - "columnsTo": [ - "company_id", - "user_id" - ], + "columnsTo": ["company_id", "user_id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "notification_member_fkey", @@ -7465,16 +7105,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "person_id" - ], + "columns": ["company_id", "person_id"], "schemaTo": "auth", "tableTo": "member", - "columnsTo": [ - "company_id", - "user_id" - ], + "columnsTo": ["company_id", "user_id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "request_notice_member_fkey", @@ -7484,14 +7118,10 @@ }, { "nameExplicit": true, - "columns": [ - "request_id" - ], + "columns": ["request_id"], "schemaTo": "requests", "tableTo": "request", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "request_notice_request_id_fkey", @@ -7501,16 +7131,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "project_id" - ], + "columns": ["company_id", "project_id"], "schemaTo": "projects", "tableTo": "project", - "columnsTo": [ - "company_id", - "id" - ], + "columnsTo": ["company_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "app_access_company_id_project_id_fkey", @@ -7520,14 +7144,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "request_company_id_fkey", @@ -7537,16 +7157,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "requested_by" - ], + "columns": ["company_id", "requested_by"], "schemaTo": "auth", "tableTo": "member", - "columnsTo": [ - "company_id", - "user_id" - ], + "columnsTo": ["company_id", "user_id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "request_member_fkey", @@ -7556,14 +7170,10 @@ }, { "nameExplicit": true, - "columns": [ - "project_id" - ], + "columns": ["project_id"], "schemaTo": "projects", "tableTo": "project", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "request_project_id_fkey", @@ -7572,10 +7182,7 @@ "table": "request" }, { - "columns": [ - "agent_id", - "tool_version_id" - ], + "columns": ["agent_id", "tool_version_id"], "nameExplicit": true, "name": "agent_tool_pkey", "entityType": "pks", @@ -7583,10 +7190,7 @@ "table": "agent_tool" }, { - "columns": [ - "agent_id", - "number" - ], + "columns": ["agent_id", "number"], "nameExplicit": true, "name": "agent_version_pkey", "entityType": "pks", @@ -7594,11 +7198,7 @@ "table": "agent_version" }, { - "columns": [ - "agent_id", - "number", - "tool_version_id" - ], + "columns": ["agent_id", "number", "tool_version_id"], "nameExplicit": true, "name": "agent_version_tool_pkey", "entityType": "pks", @@ -7606,10 +7206,7 @@ "table": "agent_version_tool" }, { - "columns": [ - "company_id", - "kind" - ], + "columns": ["company_id", "kind"], "nameExplicit": false, "name": "company_account_kind_pkey", "entityType": "pks", @@ -7617,10 +7214,7 @@ "table": "company_account_kind" }, { - "columns": [ - "account_id", - "person_id" - ], + "columns": ["account_id", "person_id"], "nameExplicit": false, "name": "model_account_assignee_pkey", "entityType": "pks", @@ -7628,10 +7222,7 @@ "table": "model_account_assignee" }, { - "columns": [ - "company_id", - "person_id" - ], + "columns": ["company_id", "person_id"], "nameExplicit": false, "name": "person_model_default_pkey", "entityType": "pks", @@ -7639,10 +7230,7 @@ "table": "person_model_default" }, { - "columns": [ - "company_id", - "sha256" - ], + "columns": ["company_id", "sha256"], "nameExplicit": true, "name": "blob_pkey", "entityType": "pks", @@ -7650,10 +7238,7 @@ "table": "blob" }, { - "columns": [ - "version_id", - "path" - ], + "columns": ["version_id", "path"], "nameExplicit": true, "name": "version_file_pkey", "entityType": "pks", @@ -7661,11 +7246,7 @@ "table": "version_file" }, { - "columns": [ - "company_id", - "thread_id", - "tool_call_id" - ], + "columns": ["company_id", "thread_id", "tool_call_id"], "nameExplicit": false, "name": "connector_write_pkey", "entityType": "pks", @@ -7673,10 +7254,7 @@ "table": "connector_write" }, { - "columns": [ - "project_id", - "connection_id" - ], + "columns": ["project_id", "connection_id"], "nameExplicit": false, "name": "project_connection_pkey", "entityType": "pks", @@ -7684,10 +7262,7 @@ "table": "project_connection" }, { - "columns": [ - "proposal_id", - "connection_id" - ], + "columns": ["proposal_id", "connection_id"], "nameExplicit": false, "name": "copy_proposal_source_pkey", "entityType": "pks", @@ -7695,10 +7270,7 @@ "table": "copy_proposal_source" }, { - "columns": [ - "copy_id", - "connection_id" - ], + "columns": ["copy_id", "connection_id"], "nameExplicit": false, "name": "copy_source_pkey", "entityType": "pks", @@ -7706,10 +7278,7 @@ "table": "copy_source" }, { - "columns": [ - "company_id", - "copy_id" - ], + "columns": ["company_id", "copy_id"], "nameExplicit": false, "name": "copy_table_left_pkey", "entityType": "pks", @@ -7717,10 +7286,7 @@ "table": "copy_table_left" }, { - "columns": [ - "project_id", - "copy_id" - ], + "columns": ["project_id", "copy_id"], "nameExplicit": false, "name": "project_copy_pkey", "entityType": "pks", @@ -7728,10 +7294,7 @@ "table": "project_copy" }, { - "columns": [ - "project_id", - "person_id" - ], + "columns": ["project_id", "person_id"], "nameExplicit": false, "name": "app_access_pkey", "entityType": "pks", @@ -7739,9 +7302,7 @@ "table": "app_access" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "agent_pkey", "schema": "builder", @@ -7749,9 +7310,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "agent_conversation_pkey", "schema": "builder", @@ -7759,9 +7318,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "assistant_conversation_pkey", "schema": "builder", @@ -7769,9 +7326,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "conversation_pkey", "schema": "builder", @@ -7779,9 +7334,7 @@ "entityType": "pks" }, { - "columns": [ - "company_id" - ], + "columns": ["company_id"], "nameExplicit": false, "name": "company_model_pkey", "schema": "builder", @@ -7789,9 +7342,7 @@ "entityType": "pks" }, { - "columns": [ - "company_id" - ], + "columns": ["company_id"], "nameExplicit": false, "name": "company_model_fallback_pkey", "schema": "builder", @@ -7799,9 +7350,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "model_account_pkey", "schema": "builder", @@ -7809,9 +7358,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "model_account_sign_in_pkey", "schema": "builder", @@ -7819,9 +7366,7 @@ "entityType": "pks" }, { - "columns": [ - "company_id" - ], + "columns": ["company_id"], "nameExplicit": false, "name": "observational_memory_models_pkey", "schema": "builder", @@ -7829,9 +7374,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "tool_pkey", "schema": "builder", @@ -7839,9 +7382,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "tool_version_pkey", "schema": "builder", @@ -7849,9 +7390,7 @@ "entityType": "pks" }, { - "columns": [ - "project_id" - ], + "columns": ["project_id"], "nameExplicit": false, "name": "app_pkey", "schema": "apps", @@ -7859,9 +7398,7 @@ "entityType": "pks" }, { - "columns": [ - "token_hash" - ], + "columns": ["token_hash"], "nameExplicit": false, "name": "app_session_pkey", "schema": "apps", @@ -7869,9 +7406,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "app_version_pkey", "schema": "apps", @@ -7879,9 +7414,7 @@ "entityType": "pks" }, { - "columns": [ - "code_hash" - ], + "columns": ["code_hash"], "nameExplicit": false, "name": "handoff_pkey", "schema": "apps", @@ -7889,9 +7422,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "connection_pkey", "schema": "connectors", @@ -7899,9 +7430,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "connection_sign_in_pkey", "schema": "connectors", @@ -7909,9 +7438,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "copy_pkey", "schema": "copies", @@ -7919,9 +7446,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "copy_proposal_pkey", "schema": "copies", @@ -7929,9 +7454,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "copy_run_pkey", "schema": "copies", @@ -7939,9 +7462,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "account_pkey", "schema": "auth", @@ -7949,9 +7470,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "company_pkey", "schema": "auth", @@ -7959,9 +7478,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "invitation_pkey", "schema": "auth", @@ -7969,9 +7486,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "member_pkey", "schema": "auth", @@ -7979,9 +7494,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "organization_role_pkey", "schema": "auth", @@ -7989,9 +7502,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "rate_limit_pkey", "schema": "auth", @@ -7999,9 +7510,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "session_pkey", "schema": "auth", @@ -8009,9 +7518,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "user_pkey", "schema": "auth", @@ -8019,9 +7526,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "verification_pkey", "schema": "auth", @@ -8029,9 +7534,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "notification_pkey", "schema": "notifications", @@ -8039,9 +7542,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "request_notice_pkey", "schema": "notifications", @@ -8049,9 +7550,7 @@ "entityType": "pks" }, { - "columns": [ - "company_id" - ], + "columns": ["company_id"], "nameExplicit": false, "name": "client_pkey", "schema": "operations", @@ -8059,9 +7558,7 @@ "entityType": "pks" }, { - "columns": [ - "company_id" - ], + "columns": ["company_id"], "nameExplicit": false, "name": "company_database_pkey", "schema": "projects", @@ -8069,9 +7566,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "project_pkey", "schema": "projects", @@ -8079,9 +7574,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "request_pkey", "schema": "requests", @@ -8089,9 +7582,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "starts_pkey", "schema": "hub", @@ -8100,10 +7591,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "id" - ], + "columns": ["company_id", "id"], "nullsNotDistinct": false, "name": "agent_company_id_id_key", "entityType": "uniques", @@ -8112,10 +7600,7 @@ }, { "nameExplicit": true, - "columns": [ - "agent_id", - "tool_id" - ], + "columns": ["agent_id", "tool_id"], "nullsNotDistinct": false, "name": "agent_tool_agent_id_tool_id_key", "entityType": "uniques", @@ -8124,10 +7609,7 @@ }, { "nameExplicit": true, - "columns": [ - "agent_id", - "source_revision" - ], + "columns": ["agent_id", "source_revision"], "nullsNotDistinct": false, "name": "agent_version_agent_id_source_revision_key", "entityType": "uniques", @@ -8136,11 +7618,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "agent_id", - "number" - ], + "columns": ["company_id", "agent_id", "number"], "nullsNotDistinct": false, "name": "agent_version_company_id_agent_id_number_key", "entityType": "uniques", @@ -8149,11 +7627,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "person_id", - "attempt_key" - ], + "columns": ["company_id", "person_id", "attempt_key"], "nullsNotDistinct": false, "name": "conversation_attempt_key", "entityType": "uniques", @@ -8162,10 +7636,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "attempt_key" - ], + "columns": ["company_id", "attempt_key"], "nullsNotDistinct": false, "name": "model_account_attempt_key", "entityType": "uniques", @@ -8174,10 +7645,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "slug" - ], + "columns": ["company_id", "slug"], "nullsNotDistinct": false, "name": "tool_company_id_slug_key", "entityType": "uniques", @@ -8186,10 +7654,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "id" - ], + "columns": ["company_id", "id"], "nullsNotDistinct": false, "name": "tool_company_id_id_key", "entityType": "uniques", @@ -8198,10 +7663,7 @@ }, { "nameExplicit": true, - "columns": [ - "tool_id", - "number" - ], + "columns": ["tool_id", "number"], "nullsNotDistinct": false, "name": "tool_version_tool_id_number_key", "entityType": "uniques", @@ -8210,10 +7672,7 @@ }, { "nameExplicit": true, - "columns": [ - "tool_id", - "id" - ], + "columns": ["tool_id", "id"], "nullsNotDistinct": false, "name": "tool_version_tool_id_id_key", "entityType": "uniques", @@ -8222,10 +7681,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "id" - ], + "columns": ["company_id", "id"], "nullsNotDistinct": false, "name": "tool_version_company_id_id_key", "entityType": "uniques", @@ -8234,10 +7690,7 @@ }, { "nameExplicit": true, - "columns": [ - "project_id", - "number" - ], + "columns": ["project_id", "number"], "nullsNotDistinct": false, "name": "app_version_project_id_number_key", "entityType": "uniques", @@ -8246,10 +7699,7 @@ }, { "nameExplicit": true, - "columns": [ - "project_id", - "attempt_key" - ], + "columns": ["project_id", "attempt_key"], "nullsNotDistinct": false, "name": "app_version_project_id_attempt_key_key", "entityType": "uniques", @@ -8258,10 +7708,7 @@ }, { "nameExplicit": true, - "columns": [ - "project_id", - "id" - ], + "columns": ["project_id", "id"], "nullsNotDistinct": false, "name": "app_version_project_id_id_key", "entityType": "uniques", @@ -8270,10 +7717,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "attempt_key" - ], + "columns": ["company_id", "attempt_key"], "nullsNotDistinct": false, "name": "connection_attempt_key", "entityType": "uniques", @@ -8282,11 +7726,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "connector_id", - "id" - ], + "columns": ["company_id", "connector_id", "id"], "nullsNotDistinct": false, "name": "connection_company_connector_id_key", "entityType": "uniques", @@ -8295,10 +7735,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "name" - ], + "columns": ["company_id", "name"], "nullsNotDistinct": false, "name": "copy_company_id_name_key", "entityType": "uniques", @@ -8307,10 +7744,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "attempt_key" - ], + "columns": ["company_id", "attempt_key"], "nullsNotDistinct": false, "name": "copy_company_id_attempt_key_key", "entityType": "uniques", @@ -8319,10 +7753,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "id" - ], + "columns": ["company_id", "id"], "nullsNotDistinct": false, "name": "copy_company_id_id_key", "entityType": "uniques", @@ -8331,10 +7762,7 @@ }, { "nameExplicit": true, - "columns": [ - "copy_id", - "account_ref" - ], + "columns": ["copy_id", "account_ref"], "nullsNotDistinct": false, "name": "copy_source_copy_id_account_ref_key", "entityType": "uniques", @@ -8343,10 +7771,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "attempt_key" - ], + "columns": ["company_id", "attempt_key"], "nullsNotDistinct": false, "name": "invitation_company_id_attempt_key_key", "entityType": "uniques", @@ -8355,10 +7780,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "user_id" - ], + "columns": ["company_id", "user_id"], "nullsNotDistinct": false, "name": "member_company_id_user_id_key", "entityType": "uniques", @@ -8367,10 +7789,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "run_id" - ], + "columns": ["company_id", "run_id"], "nullsNotDistinct": false, "name": "notification_run_key", "entityType": "uniques", @@ -8379,11 +7798,7 @@ }, { "nameExplicit": true, - "columns": [ - "request_id", - "person_id", - "kind" - ], + "columns": ["request_id", "person_id", "kind"], "nullsNotDistinct": false, "name": "request_notice_key", "entityType": "uniques", @@ -8392,10 +7807,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "attempt_key" - ], + "columns": ["company_id", "attempt_key"], "nullsNotDistinct": false, "name": "project_company_id_attempt_key_key", "entityType": "uniques", @@ -8404,10 +7816,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "id" - ], + "columns": ["company_id", "id"], "nullsNotDistinct": false, "name": "project_company_id_id_key", "entityType": "uniques", @@ -8416,10 +7825,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "attempt_key" - ], + "columns": ["company_id", "attempt_key"], "nullsNotDistinct": false, "name": "request_attempt_key", "entityType": "uniques", @@ -8428,9 +7834,7 @@ }, { "nameExplicit": false, - "columns": [ - "slug" - ], + "columns": ["slug"], "nullsNotDistinct": false, "name": "company_slug_key", "schema": "auth", @@ -8439,9 +7843,7 @@ }, { "nameExplicit": false, - "columns": [ - "attempt_key" - ], + "columns": ["attempt_key"], "nullsNotDistinct": false, "name": "company_attempt_key_key", "schema": "auth", @@ -8450,9 +7852,7 @@ }, { "nameExplicit": true, - "columns": [ - "nickname" - ], + "columns": ["nickname"], "nullsNotDistinct": false, "name": "company_nickname_key", "schema": "auth", @@ -8461,9 +7861,7 @@ }, { "nameExplicit": false, - "columns": [ - "key" - ], + "columns": ["key"], "nullsNotDistinct": false, "name": "rate_limit_key_key", "schema": "auth", @@ -8472,9 +7870,7 @@ }, { "nameExplicit": false, - "columns": [ - "token" - ], + "columns": ["token"], "nullsNotDistinct": false, "name": "session_token_key", "schema": "auth", @@ -8483,9 +7879,7 @@ }, { "nameExplicit": false, - "columns": [ - "email" - ], + "columns": ["email"], "nullsNotDistinct": false, "name": "user_email_key", "schema": "auth", @@ -8494,9 +7888,7 @@ }, { "nameExplicit": true, - "columns": [ - "cnpj" - ], + "columns": ["cnpj"], "nullsNotDistinct": false, "name": "client_cnpj_key", "schema": "operations", @@ -8505,9 +7897,7 @@ }, { "nameExplicit": true, - "columns": [ - "attempt_key" - ], + "columns": ["attempt_key"], "nullsNotDistinct": false, "name": "client_attempt_key_key", "schema": "operations", @@ -8516,9 +7906,7 @@ }, { "nameExplicit": true, - "columns": [ - "neon_project_id" - ], + "columns": ["neon_project_id"], "nullsNotDistinct": false, "name": "company_database_neon_project_id_key", "schema": "projects", @@ -8527,9 +7915,7 @@ }, { "nameExplicit": true, - "columns": [ - "host_label" - ], + "columns": ["host_label"], "nullsNotDistinct": false, "name": "project_host_label_key", "schema": "projects", @@ -9029,9 +8415,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9042,9 +8426,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_agent_companies" - ], + "roles": ["hub_agent_companies"], "using": "true", "withCheck": null, "name": "agent_companies_select", @@ -9055,9 +8437,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", "name": "company_all", @@ -9068,9 +8448,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9081,9 +8459,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9094,9 +8470,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9107,9 +8481,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", "name": "company_all", @@ -9120,9 +8492,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", "name": "company_all", @@ -9133,9 +8503,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "company_select", @@ -9146,9 +8514,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_select", @@ -9159,9 +8525,7 @@ { "as": "PERMISSIVE", "for": "INSERT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": null, "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "operator_insert", @@ -9172,9 +8536,7 @@ { "as": "PERMISSIVE", "for": "DELETE", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_delete", @@ -9185,9 +8547,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9198,9 +8558,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9211,9 +8569,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id is null or person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id is null or person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", "name": "company_all", @@ -9224,9 +8580,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_model_seals" - ], + "roles": ["hub_model_seals"], "using": "true", "withCheck": null, "name": "model_seals_select", @@ -9237,9 +8591,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9250,9 +8602,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", "name": "company_all", @@ -9263,9 +8613,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_model_seals" - ], + "roles": ["hub_model_seals"], "using": "true", "withCheck": null, "name": "model_seals_select", @@ -9276,9 +8624,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9289,9 +8635,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '') and person_id = nullif(current_setting('conexus.person_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '') and person_id = nullif(current_setting('conexus.person_id', true), '')", "name": "company_all", @@ -9302,9 +8646,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9315,9 +8657,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9328,9 +8668,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9341,9 +8679,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_select", @@ -9354,9 +8690,7 @@ { "as": "PERMISSIVE", "for": "DELETE", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_delete", @@ -9367,9 +8701,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_app_companies" - ], + "roles": ["hub_app_companies"], "using": "true", "withCheck": null, "name": "companies_select", @@ -9380,9 +8712,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9393,9 +8723,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_select", @@ -9406,9 +8734,7 @@ { "as": "PERMISSIVE", "for": "DELETE", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_delete", @@ -9419,9 +8745,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9432,9 +8756,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_select", @@ -9445,9 +8767,7 @@ { "as": "PERMISSIVE", "for": "DELETE", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_delete", @@ -9458,9 +8778,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9471,9 +8789,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_select", @@ -9484,9 +8800,7 @@ { "as": "PERMISSIVE", "for": "DELETE", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_delete", @@ -9497,9 +8811,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9510,9 +8822,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_connection_seals" - ], + "roles": ["hub_connection_seals"], "using": "true", "withCheck": null, "name": "connection_seals_select", @@ -9523,9 +8833,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", "name": "company_all", @@ -9536,9 +8844,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9549,9 +8855,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9562,9 +8866,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9575,9 +8877,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9588,9 +8888,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9601,9 +8899,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9614,9 +8910,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9627,9 +8921,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9640,9 +8932,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9653,9 +8943,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9666,9 +8954,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_app_people" - ], + "roles": ["hub_app_people"], "using": "true", "withCheck": null, "name": "app_people_select", @@ -9679,9 +8965,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_person" - ], + "roles": ["hub_person"], "using": "exists (select 1 from auth.member m where m.company_id = company.id and m.user_id = nullif(current_setting('conexus.person_id', true), ''))", "withCheck": null, "name": "person_select", @@ -9692,9 +8976,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_invitation" - ], + "roles": ["hub_invitation"], "using": "exists (select 1 from auth.invitation i where i.id = nullif(current_setting('conexus.invitation_id', true), '') and i.company_id = company.id)", "withCheck": "exists (select 1 from auth.invitation i where i.id = nullif(current_setting('conexus.invitation_id', true), '') and i.company_id = company.id)", "name": "invitation_all", @@ -9705,9 +8987,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), ''))", "withCheck": null, "name": "operator_select", @@ -9718,9 +8998,7 @@ { "as": "PERMISSIVE", "for": "INSERT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": null, "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), ''))", "name": "operator_insert", @@ -9731,9 +9009,7 @@ { "as": "PERMISSIVE", "for": "UPDATE", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and id = nullif(current_setting('conexus.company_id', true), '')", "name": "operator_update", @@ -9744,9 +9020,7 @@ { "as": "PERMISSIVE", "for": "DELETE", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_delete", @@ -9757,9 +9031,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9770,9 +9042,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_person" - ], + "roles": ["hub_person"], "using": "inviter_id = nullif(current_setting('conexus.person_id', true), '')\n or lower(email) = (select u.email from auth.\"user\" u where u.id = nullif(current_setting('conexus.person_id', true), ''))", "withCheck": null, "name": "person_select", @@ -9783,9 +9053,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_invitation" - ], + "roles": ["hub_invitation"], "using": "id = nullif(current_setting('conexus.invitation_id', true), '')", "withCheck": "id = nullif(current_setting('conexus.invitation_id', true), '')", "name": "invitation_all", @@ -9796,9 +9064,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and (role = 'owner' or company_id = nullif(current_setting('conexus.company_id', true), ''))", "withCheck": null, "name": "operator_select", @@ -9809,9 +9075,7 @@ { "as": "PERMISSIVE", "for": "INSERT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": null, "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and role = 'owner'", "name": "operator_insert", @@ -9822,9 +9086,7 @@ { "as": "PERMISSIVE", "for": "UPDATE", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and role = 'owner'", "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and role = 'owner'", "name": "operator_update", @@ -9835,9 +9097,7 @@ { "as": "PERMISSIVE", "for": "DELETE", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_delete", @@ -9848,9 +9108,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9861,9 +9119,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_person" - ], + "roles": ["hub_person"], "using": "user_id = nullif(current_setting('conexus.person_id', true), '')", "withCheck": null, "name": "person_select", @@ -9874,9 +9130,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_invitation" - ], + "roles": ["hub_invitation"], "using": "exists (select 1 from auth.invitation i where i.id = nullif(current_setting('conexus.invitation_id', true), '') and i.company_id = member.company_id)", "withCheck": null, "name": "invitation_select", @@ -9887,9 +9141,7 @@ { "as": "PERMISSIVE", "for": "INSERT", - "roles": [ - "hub_invitation" - ], + "roles": ["hub_invitation"], "using": null, "withCheck": "user_id = nullif(current_setting('conexus.person_id', true), '')\n and exists (select 1 from auth.invitation i where i.id = nullif(current_setting('conexus.invitation_id', true), '') and i.company_id = member.company_id)", "name": "invitation_insert", @@ -9900,9 +9152,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and (role = 'owner' or company_id = nullif(current_setting('conexus.company_id', true), ''))", "withCheck": null, "name": "operator_select", @@ -9913,9 +9163,7 @@ { "as": "PERMISSIVE", "for": "DELETE", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_delete", @@ -9926,9 +9174,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9939,9 +9185,7 @@ { "as": "PERMISSIVE", "for": "INSERT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": null, "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), ''))", "name": "operator_insert", @@ -9952,9 +9196,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_runtime" - ], + "roles": ["hub_runtime"], "using": "true", "withCheck": "true", "name": "runtime_all", @@ -9965,9 +9207,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "user_id = nullif(current_setting('conexus.person_id', true), '')", "withCheck": "user_id = nullif(current_setting('conexus.person_id', true), '')", "name": "company_all", @@ -9978,9 +9218,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_invitation" - ], + "roles": ["hub_invitation"], "using": "user_id = nullif(current_setting('conexus.person_id', true), '')\n or exists (select 1 from auth.invitation i join auth.\"user\" u on u.email = lower(i.email)\n where i.id = nullif(current_setting('conexus.invitation_id', true), '') and u.id = session.user_id)", "withCheck": "user_id = nullif(current_setting('conexus.person_id', true), '')\n or exists (select 1 from auth.invitation i join auth.\"user\" u on u.email = lower(i.email)\n where i.id = nullif(current_setting('conexus.invitation_id', true), '') and u.id = session.user_id)", "name": "invitation_all", @@ -9991,9 +9229,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_runtime" - ], + "roles": ["hub_runtime"], "using": "true", "withCheck": "true", "name": "runtime_sign_in", @@ -10004,9 +9240,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "id = nullif(current_setting('conexus.person_id', true), '')\n or exists (select 1 from auth.member m where m.user_id = \"user\".id and m.company_id = nullif(current_setting('conexus.company_id', true), ''))\n or exists (select 1 from auth.invitation i where i.inviter_id = \"user\".id and i.company_id = nullif(current_setting('conexus.company_id', true), ''))\n or exists (select 1 from projects.app_access a where a.person_id = \"user\".id and a.company_id = nullif(current_setting('conexus.company_id', true), ''))", "withCheck": "id = nullif(current_setting('conexus.person_id', true), '')\n or exists (select 1 from auth.member m where m.user_id = \"user\".id and m.company_id = nullif(current_setting('conexus.company_id', true), ''))\n or exists (select 1 from auth.invitation i where i.inviter_id = \"user\".id and i.company_id = nullif(current_setting('conexus.company_id', true), ''))\n or exists (select 1 from projects.app_access a where a.person_id = \"user\".id and a.company_id = nullif(current_setting('conexus.company_id', true), ''))", "name": "company_all", @@ -10017,9 +9251,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_person" - ], + "roles": ["hub_person"], "using": "id = nullif(current_setting('conexus.person_id', true), '')", "withCheck": "id = nullif(current_setting('conexus.person_id', true), '')", "name": "person_all", @@ -10030,9 +9262,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_invitation" - ], + "roles": ["hub_invitation"], "using": "id = nullif(current_setting('conexus.person_id', true), '')\n or exists (select 1 from auth.invitation i where i.id = nullif(current_setting('conexus.invitation_id', true), '')\n and (i.inviter_id = \"user\".id or lower(i.email) = \"user\".email))", "withCheck": "id = nullif(current_setting('conexus.person_id', true), '')\n or exists (select 1 from auth.invitation i where i.id = nullif(current_setting('conexus.invitation_id', true), '')\n and (i.inviter_id = \"user\".id or lower(i.email) = \"user\".email))", "name": "invitation_all", @@ -10043,9 +9273,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_administrators" - ], + "roles": ["hub_administrators"], "using": "role = 'admin'", "withCheck": null, "name": "administrators_select", @@ -10056,9 +9284,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and (role = 'admin'\n or exists (select 1 from auth.member m where m.user_id = \"user\".id and m.role = 'owner'))", "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and (role = 'admin'\n or exists (select 1 from auth.member m where m.user_id = \"user\".id and m.role = 'owner'))", "name": "operator_all", @@ -10069,9 +9295,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '') and person_id = nullif(current_setting('conexus.person_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '') and person_id = nullif(current_setting('conexus.person_id', true), '')", "name": "company_all", @@ -10082,9 +9306,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '') and person_id = nullif(current_setting('conexus.person_id', true), '')", "withCheck": null, "name": "company_select", @@ -10095,9 +9317,7 @@ { "as": "PERMISSIVE", "for": "UPDATE", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '') and person_id = nullif(current_setting('conexus.person_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '') and person_id = nullif(current_setting('conexus.person_id', true), '')", "name": "company_update", @@ -10108,9 +9328,7 @@ { "as": "PERMISSIVE", "for": "INSERT", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": null, "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_insert", @@ -10121,9 +9339,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), ''))", "withCheck": null, "name": "operator_select", @@ -10134,9 +9350,7 @@ { "as": "PERMISSIVE", "for": "INSERT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": null, "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), ''))", "name": "operator_insert", @@ -10147,9 +9361,7 @@ { "as": "PERMISSIVE", "for": "UPDATE", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), ''))", "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), ''))", "name": "operator_update", @@ -10160,9 +9372,7 @@ { "as": "PERMISSIVE", "for": "DELETE", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_delete", @@ -10173,9 +9383,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -10186,9 +9394,7 @@ { "as": "PERMISSIVE", "for": "INSERT", - "roles": [ - "hub_invitation" - ], + "roles": ["hub_invitation"], "using": null, "withCheck": "exists (select 1 from auth.invitation i\n join auth.\"user\" u on lower(u.email) = lower(i.email)\n where i.id = nullif(current_setting('conexus.invitation_id', true), '') and i.company_id = app_access.company_id\n and i.project_id = app_access.project_id and i.app_role is not distinct from app_access.role\n and u.id = app_access.person_id)", "name": "invitation_insert", @@ -10199,9 +9405,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_invitation" - ], + "roles": ["hub_invitation"], "using": "exists (select 1 from auth.invitation i\n join auth.\"user\" u on lower(u.email) = lower(i.email)\n where i.id = nullif(current_setting('conexus.invitation_id', true), '') and i.project_id = app_access.project_id\n and u.id = app_access.person_id)", "withCheck": null, "name": "invitation_select", @@ -10212,9 +9416,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_app_people" - ], + "roles": ["hub_app_people"], "using": "true", "withCheck": null, "name": "app_people_select", @@ -10225,9 +9427,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -10238,9 +9438,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_select", @@ -10251,9 +9449,7 @@ { "as": "PERMISSIVE", "for": "DELETE", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_delete", @@ -10264,9 +9460,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -10277,9 +9471,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_select", @@ -10290,9 +9482,7 @@ { "as": "PERMISSIVE", "for": "DELETE", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_delete", @@ -10303,9 +9493,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_hosts" - ], + "roles": ["hub_hosts"], "using": "true", "withCheck": null, "name": "hosts_select", @@ -10316,9 +9504,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_app_people" - ], + "roles": ["hub_app_people"], "using": "true", "withCheck": null, "name": "app_people_select", @@ -10329,9 +9515,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_invitation" - ], + "roles": ["hub_invitation"], "using": "exists (select 1 from auth.invitation i where i.id = nullif(current_setting('conexus.invitation_id', true), '')\n and i.company_id = project.company_id and i.project_id = project.id)", "withCheck": null, "name": "invitation_select", @@ -10342,9 +9526,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -10354,4 +9536,4 @@ } ], "renames": [] -} \ No newline at end of file +} diff --git a/apps/server/migrations/20261111234429_sync_copy_sources_grants/snapshot.json b/apps/server/migrations/20261111234429_sync_copy_sources_grants/snapshot.json index 0bd9be29..42ab4f90 100644 --- a/apps/server/migrations/20261111234429_sync_copy_sources_grants/snapshot.json +++ b/apps/server/migrations/20261111234429_sync_copy_sources_grants/snapshot.json @@ -1,8 +1,6 @@ { "id": "a3baed99-717a-4048-a477-9d35df6a0cee", - "prevIds": [ - "2e2e90ee-e859-4e6b-8f69-54dd30079999" - ], + "prevIds": ["2e2e90ee-e859-4e6b-8f69-54dd30079999"], "version": "8", "dialect": "postgres", "ddl": [ @@ -6223,14 +6221,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "agent_company_id_fkey", @@ -6240,16 +6234,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "project_id" - ], + "columns": ["company_id", "project_id"], "schemaTo": "projects", "tableTo": "project", - "columnsTo": [ - "company_id", - "id" - ], + "columnsTo": ["company_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "agent_project_fkey", @@ -6259,18 +6247,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "id", - "active_version" - ], + "columns": ["company_id", "id", "active_version"], "schemaTo": "builder", "tableTo": "agent_version", - "columnsTo": [ - "company_id", - "agent_id", - "number" - ], + "columnsTo": ["company_id", "agent_id", "number"], "onUpdate": "NO ACTION", "onDelete": "NO ACTION", "name": "agent_active_version_fkey", @@ -6280,14 +6260,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "agent_conversation_company_id_fkey", @@ -6297,16 +6273,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "agent_id" - ], + "columns": ["company_id", "agent_id"], "schemaTo": "builder", "tableTo": "agent", - "columnsTo": [ - "company_id", - "id" - ], + "columnsTo": ["company_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "agent_conversation_agent_fkey", @@ -6316,16 +6286,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "person_id" - ], + "columns": ["company_id", "person_id"], "schemaTo": "auth", "tableTo": "member", - "columnsTo": [ - "company_id", - "user_id" - ], + "columnsTo": ["company_id", "user_id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "agent_conversation_member_fkey", @@ -6335,16 +6299,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "agent_id" - ], + "columns": ["company_id", "agent_id"], "schemaTo": "builder", "tableTo": "agent", - "columnsTo": [ - "company_id", - "id" - ], + "columnsTo": ["company_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "agent_tool_agent_fkey", @@ -6354,16 +6312,10 @@ }, { "nameExplicit": true, - "columns": [ - "tool_id", - "tool_version_id" - ], + "columns": ["tool_id", "tool_version_id"], "schemaTo": "builder", "tableTo": "tool_version", - "columnsTo": [ - "tool_id", - "id" - ], + "columnsTo": ["tool_id", "id"], "onUpdate": "NO ACTION", "onDelete": "NO ACTION", "name": "agent_tool_tool_version_fkey", @@ -6373,16 +6325,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "tool_version_id" - ], + "columns": ["company_id", "tool_version_id"], "schemaTo": "builder", "tableTo": "tool_version", - "columnsTo": [ - "company_id", - "id" - ], + "columnsTo": ["company_id", "id"], "onUpdate": "NO ACTION", "onDelete": "NO ACTION", "name": "agent_tool_company_tool_version_fkey", @@ -6392,16 +6338,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "agent_id" - ], + "columns": ["company_id", "agent_id"], "schemaTo": "builder", "tableTo": "agent", - "columnsTo": [ - "company_id", - "id" - ], + "columnsTo": ["company_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "agent_version_agent_fkey", @@ -6411,18 +6351,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "agent_id", - "number" - ], + "columns": ["company_id", "agent_id", "number"], "schemaTo": "builder", "tableTo": "agent_version", - "columnsTo": [ - "company_id", - "agent_id", - "number" - ], + "columnsTo": ["company_id", "agent_id", "number"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "agent_version_tool_agent_version_fkey", @@ -6432,16 +6364,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "tool_version_id" - ], + "columns": ["company_id", "tool_version_id"], "schemaTo": "builder", "tableTo": "tool_version", - "columnsTo": [ - "company_id", - "id" - ], + "columnsTo": ["company_id", "id"], "onUpdate": "NO ACTION", "onDelete": "NO ACTION", "name": "agent_version_tool_tool_version_fkey", @@ -6451,14 +6377,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "assistant_conversation_company_id_fkey", @@ -6468,14 +6390,10 @@ }, { "nameExplicit": true, - "columns": [ - "project_id" - ], + "columns": ["project_id"], "schemaTo": "projects", "tableTo": "project", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "assistant_conversation_project_id_fkey", @@ -6485,16 +6403,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "person_id" - ], + "columns": ["company_id", "person_id"], "schemaTo": "auth", "tableTo": "member", - "columnsTo": [ - "company_id", - "user_id" - ], + "columnsTo": ["company_id", "user_id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "assistant_conversation_member_fkey", @@ -6504,14 +6416,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "conversation_company_id_fkey", @@ -6521,14 +6429,10 @@ }, { "nameExplicit": true, - "columns": [ - "project_id" - ], + "columns": ["project_id"], "schemaTo": "projects", "tableTo": "project", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "conversation_project_id_fkey", @@ -6538,16 +6442,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "person_id" - ], + "columns": ["company_id", "person_id"], "schemaTo": "auth", "tableTo": "member", - "columnsTo": [ - "company_id", - "user_id" - ], + "columnsTo": ["company_id", "user_id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "conversation_member_fkey", @@ -6557,14 +6455,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "company_account_kind_company_id_fkey", @@ -6574,14 +6468,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "company_model_company_id_fkey", @@ -6591,14 +6481,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "company_model_fallback_company_id_fkey", @@ -6608,14 +6494,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "model_account_company_id_fkey", @@ -6625,16 +6507,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "person_id" - ], + "columns": ["company_id", "person_id"], "schemaTo": "auth", "tableTo": "member", - "columnsTo": [ - "company_id", - "user_id" - ], + "columnsTo": ["company_id", "user_id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "model_account_member_fkey", @@ -6644,14 +6520,10 @@ }, { "nameExplicit": true, - "columns": [ - "account_id" - ], + "columns": ["account_id"], "schemaTo": "builder", "tableTo": "model_account", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "model_account_assignee_account_id_fkey", @@ -6661,16 +6533,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "person_id" - ], + "columns": ["company_id", "person_id"], "schemaTo": "auth", "tableTo": "member", - "columnsTo": [ - "company_id", - "user_id" - ], + "columnsTo": ["company_id", "user_id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "model_account_assignee_member_fkey", @@ -6680,16 +6546,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "person_id" - ], + "columns": ["company_id", "person_id"], "schemaTo": "auth", "tableTo": "member", - "columnsTo": [ - "company_id", - "user_id" - ], + "columnsTo": ["company_id", "user_id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "model_account_sign_in_member_fkey", @@ -6699,14 +6559,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "observational_memory_models_company_id_fkey", @@ -6716,16 +6572,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "person_id" - ], + "columns": ["company_id", "person_id"], "schemaTo": "auth", "tableTo": "member", - "columnsTo": [ - "company_id", - "user_id" - ], + "columnsTo": ["company_id", "user_id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "person_model_default_member_fkey", @@ -6735,14 +6585,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "tool_company_id_fkey", @@ -6752,16 +6598,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "tool_id" - ], + "columns": ["company_id", "tool_id"], "schemaTo": "builder", "tableTo": "tool", - "columnsTo": [ - "company_id", - "id" - ], + "columnsTo": ["company_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "tool_version_tool_fkey", @@ -6771,14 +6611,10 @@ }, { "nameExplicit": true, - "columns": [ - "project_id" - ], + "columns": ["project_id"], "schemaTo": "projects", "tableTo": "project", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "app_project_id_fkey", @@ -6788,16 +6624,10 @@ }, { "nameExplicit": true, - "columns": [ - "project_id", - "live_version_id" - ], + "columns": ["project_id", "live_version_id"], "schemaTo": "apps", "tableTo": "app_version", - "columnsTo": [ - "project_id", - "id" - ], + "columnsTo": ["project_id", "id"], "onUpdate": "NO ACTION", "onDelete": "NO ACTION", "name": "app_live_version_fkey", @@ -6807,16 +6637,10 @@ }, { "nameExplicit": true, - "columns": [ - "project_id", - "published_version_id" - ], + "columns": ["project_id", "published_version_id"], "schemaTo": "apps", "tableTo": "app_version", - "columnsTo": [ - "project_id", - "id" - ], + "columnsTo": ["project_id", "id"], "onUpdate": "NO ACTION", "onDelete": "NO ACTION", "name": "app_published_version_fkey", @@ -6826,16 +6650,10 @@ }, { "nameExplicit": true, - "columns": [ - "project_id", - "sending_version_id" - ], + "columns": ["project_id", "sending_version_id"], "schemaTo": "apps", "tableTo": "app_version", - "columnsTo": [ - "project_id", - "id" - ], + "columnsTo": ["project_id", "id"], "onUpdate": "NO ACTION", "onDelete": "NO ACTION", "name": "app_sending_version_fkey", @@ -6845,14 +6663,10 @@ }, { "nameExplicit": true, - "columns": [ - "hub_session_id" - ], + "columns": ["hub_session_id"], "schemaTo": "auth", "tableTo": "session", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "app_session_hub_session_id_fkey", @@ -6862,14 +6676,10 @@ }, { "nameExplicit": true, - "columns": [ - "project_id" - ], + "columns": ["project_id"], "schemaTo": "apps", "tableTo": "app", - "columnsTo": [ - "project_id" - ], + "columnsTo": ["project_id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "app_version_project_id_fkey", @@ -6879,14 +6689,10 @@ }, { "nameExplicit": true, - "columns": [ - "hub_session_id" - ], + "columns": ["hub_session_id"], "schemaTo": "auth", "tableTo": "session", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "handoff_hub_session_id_fkey", @@ -6896,14 +6702,10 @@ }, { "nameExplicit": true, - "columns": [ - "version_id" - ], + "columns": ["version_id"], "schemaTo": "apps", "tableTo": "app_version", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "version_file_version_id_fkey", @@ -6913,16 +6715,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "sha256" - ], + "columns": ["company_id", "sha256"], "schemaTo": "apps", "tableTo": "blob", - "columnsTo": [ - "company_id", - "sha256" - ], + "columnsTo": ["company_id", "sha256"], "onUpdate": "NO ACTION", "onDelete": "NO ACTION", "name": "version_file_blob_fkey", @@ -6932,14 +6728,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "connection_company_id_fkey", @@ -6949,16 +6741,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "person_id" - ], + "columns": ["company_id", "person_id"], "schemaTo": "auth", "tableTo": "member", - "columnsTo": [ - "company_id", - "user_id" - ], + "columnsTo": ["company_id", "user_id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "connection_sign_in_member_fkey", @@ -6968,18 +6754,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "connector_id", - "connection_id" - ], + "columns": ["company_id", "connector_id", "connection_id"], "schemaTo": "connectors", "tableTo": "connection", - "columnsTo": [ - "company_id", - "connector_id", - "id" - ], + "columnsTo": ["company_id", "connector_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "connection_sign_in_company_id_connector_id_connection_id_fkey", @@ -6989,14 +6767,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "connector_write_company_id_fkey", @@ -7006,18 +6780,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "connector_id", - "connection_id" - ], + "columns": ["company_id", "connector_id", "connection_id"], "schemaTo": "connectors", "tableTo": "connection", - "columnsTo": [ - "company_id", - "connector_id", - "id" - ], + "columnsTo": ["company_id", "connector_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "project_connection_connection_fkey", @@ -7027,16 +6793,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "project_id" - ], + "columns": ["company_id", "project_id"], "schemaTo": "projects", "tableTo": "project", - "columnsTo": [ - "company_id", - "id" - ], + "columnsTo": ["company_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "project_connection_project_fkey", @@ -7046,14 +6806,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "copy_company_id_fkey", @@ -7063,18 +6819,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "connector_id", - "connection_id" - ], + "columns": ["company_id", "connector_id", "connection_id"], "schemaTo": "connectors", "tableTo": "connection", - "columnsTo": [ - "company_id", - "connector_id", - "id" - ], + "columnsTo": ["company_id", "connector_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "copy_connection_fkey", @@ -7084,14 +6832,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "copy_proposal_company_id_fkey", @@ -7101,18 +6845,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "connector_id", - "connection_id" - ], + "columns": ["company_id", "connector_id", "connection_id"], "schemaTo": "connectors", "tableTo": "connection", - "columnsTo": [ - "company_id", - "connector_id", - "id" - ], + "columnsTo": ["company_id", "connector_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "copy_proposal_connection_fkey", @@ -7122,16 +6858,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "project_id" - ], + "columns": ["company_id", "project_id"], "schemaTo": "projects", "tableTo": "project", - "columnsTo": [ - "company_id", - "id" - ], + "columnsTo": ["company_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "copy_proposal_project_fkey", @@ -7141,14 +6871,10 @@ }, { "nameExplicit": true, - "columns": [ - "copy_id" - ], + "columns": ["copy_id"], "schemaTo": "copies", "tableTo": "copy", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "SET NULL", "name": "copy_proposal_copy_fkey", @@ -7158,14 +6884,10 @@ }, { "nameExplicit": true, - "columns": [ - "proposal_id" - ], + "columns": ["proposal_id"], "schemaTo": "copies", "tableTo": "copy_proposal", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "copy_proposal_source_proposal_fkey", @@ -7175,18 +6897,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "connector_id", - "connection_id" - ], + "columns": ["company_id", "connector_id", "connection_id"], "schemaTo": "connectors", "tableTo": "connection", - "columnsTo": [ - "company_id", - "connector_id", - "id" - ], + "columnsTo": ["company_id", "connector_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "copy_proposal_source_connection_fkey", @@ -7196,16 +6910,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "copy_id" - ], + "columns": ["company_id", "copy_id"], "schemaTo": "copies", "tableTo": "copy", - "columnsTo": [ - "company_id", - "id" - ], + "columnsTo": ["company_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "copy_run_copy_fkey", @@ -7215,16 +6923,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "copy_id" - ], + "columns": ["company_id", "copy_id"], "schemaTo": "copies", "tableTo": "copy", - "columnsTo": [ - "company_id", - "id" - ], + "columnsTo": ["company_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "copy_source_copy_fkey", @@ -7234,18 +6936,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "connector_id", - "connection_id" - ], + "columns": ["company_id", "connector_id", "connection_id"], "schemaTo": "connectors", "tableTo": "connection", - "columnsTo": [ - "company_id", - "connector_id", - "id" - ], + "columnsTo": ["company_id", "connector_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "copy_source_connection_fkey", @@ -7255,14 +6949,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "copy_table_left_company_id_fkey", @@ -7272,16 +6962,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "project_id" - ], + "columns": ["company_id", "project_id"], "schemaTo": "projects", "tableTo": "project", - "columnsTo": [ - "company_id", - "id" - ], + "columnsTo": ["company_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "project_copy_project_fkey", @@ -7291,16 +6975,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "copy_id" - ], + "columns": ["company_id", "copy_id"], "schemaTo": "copies", "tableTo": "copy", - "columnsTo": [ - "company_id", - "id" - ], + "columnsTo": ["company_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "project_copy_copy_fkey", @@ -7310,14 +6988,10 @@ }, { "nameExplicit": false, - "columns": [ - "user_id" - ], + "columns": ["user_id"], "schemaTo": "auth", "tableTo": "user", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "account_user_id_user_id_fkey", @@ -7327,14 +7001,10 @@ }, { "nameExplicit": false, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "RESTRICT", "name": "invitation_company_id_company_id_fkey", @@ -7344,14 +7014,10 @@ }, { "nameExplicit": false, - "columns": [ - "inviter_id" - ], + "columns": ["inviter_id"], "schemaTo": "auth", "tableTo": "user", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "RESTRICT", "name": "invitation_inviter_id_user_id_fkey", @@ -7361,14 +7027,10 @@ }, { "nameExplicit": false, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "RESTRICT", "name": "member_company_id_company_id_fkey", @@ -7378,14 +7040,10 @@ }, { "nameExplicit": false, - "columns": [ - "user_id" - ], + "columns": ["user_id"], "schemaTo": "auth", "tableTo": "user", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "RESTRICT", "name": "member_user_id_user_id_fkey", @@ -7395,14 +7053,10 @@ }, { "nameExplicit": false, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "organization_role_company_id_company_id_fkey", @@ -7412,14 +7066,10 @@ }, { "nameExplicit": false, - "columns": [ - "user_id" - ], + "columns": ["user_id"], "schemaTo": "auth", "tableTo": "user", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "session_user_id_user_id_fkey", @@ -7429,14 +7079,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "notification_company_id_fkey", @@ -7446,16 +7092,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "person_id" - ], + "columns": ["company_id", "person_id"], "schemaTo": "auth", "tableTo": "member", - "columnsTo": [ - "company_id", - "user_id" - ], + "columnsTo": ["company_id", "user_id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "notification_member_fkey", @@ -7465,16 +7105,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "person_id" - ], + "columns": ["company_id", "person_id"], "schemaTo": "auth", "tableTo": "member", - "columnsTo": [ - "company_id", - "user_id" - ], + "columnsTo": ["company_id", "user_id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "request_notice_member_fkey", @@ -7484,14 +7118,10 @@ }, { "nameExplicit": true, - "columns": [ - "request_id" - ], + "columns": ["request_id"], "schemaTo": "requests", "tableTo": "request", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "request_notice_request_id_fkey", @@ -7501,16 +7131,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "project_id" - ], + "columns": ["company_id", "project_id"], "schemaTo": "projects", "tableTo": "project", - "columnsTo": [ - "company_id", - "id" - ], + "columnsTo": ["company_id", "id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "app_access_company_id_project_id_fkey", @@ -7520,14 +7144,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id" - ], + "columns": ["company_id"], "schemaTo": "auth", "tableTo": "company", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "request_company_id_fkey", @@ -7537,16 +7157,10 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "requested_by" - ], + "columns": ["company_id", "requested_by"], "schemaTo": "auth", "tableTo": "member", - "columnsTo": [ - "company_id", - "user_id" - ], + "columnsTo": ["company_id", "user_id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "request_member_fkey", @@ -7556,14 +7170,10 @@ }, { "nameExplicit": true, - "columns": [ - "project_id" - ], + "columns": ["project_id"], "schemaTo": "projects", "tableTo": "project", - "columnsTo": [ - "id" - ], + "columnsTo": ["id"], "onUpdate": "NO ACTION", "onDelete": "CASCADE", "name": "request_project_id_fkey", @@ -7572,10 +7182,7 @@ "table": "request" }, { - "columns": [ - "agent_id", - "tool_version_id" - ], + "columns": ["agent_id", "tool_version_id"], "nameExplicit": true, "name": "agent_tool_pkey", "entityType": "pks", @@ -7583,10 +7190,7 @@ "table": "agent_tool" }, { - "columns": [ - "agent_id", - "number" - ], + "columns": ["agent_id", "number"], "nameExplicit": true, "name": "agent_version_pkey", "entityType": "pks", @@ -7594,11 +7198,7 @@ "table": "agent_version" }, { - "columns": [ - "agent_id", - "number", - "tool_version_id" - ], + "columns": ["agent_id", "number", "tool_version_id"], "nameExplicit": true, "name": "agent_version_tool_pkey", "entityType": "pks", @@ -7606,10 +7206,7 @@ "table": "agent_version_tool" }, { - "columns": [ - "company_id", - "kind" - ], + "columns": ["company_id", "kind"], "nameExplicit": false, "name": "company_account_kind_pkey", "entityType": "pks", @@ -7617,10 +7214,7 @@ "table": "company_account_kind" }, { - "columns": [ - "account_id", - "person_id" - ], + "columns": ["account_id", "person_id"], "nameExplicit": false, "name": "model_account_assignee_pkey", "entityType": "pks", @@ -7628,10 +7222,7 @@ "table": "model_account_assignee" }, { - "columns": [ - "company_id", - "person_id" - ], + "columns": ["company_id", "person_id"], "nameExplicit": false, "name": "person_model_default_pkey", "entityType": "pks", @@ -7639,10 +7230,7 @@ "table": "person_model_default" }, { - "columns": [ - "company_id", - "sha256" - ], + "columns": ["company_id", "sha256"], "nameExplicit": true, "name": "blob_pkey", "entityType": "pks", @@ -7650,10 +7238,7 @@ "table": "blob" }, { - "columns": [ - "version_id", - "path" - ], + "columns": ["version_id", "path"], "nameExplicit": true, "name": "version_file_pkey", "entityType": "pks", @@ -7661,11 +7246,7 @@ "table": "version_file" }, { - "columns": [ - "company_id", - "thread_id", - "tool_call_id" - ], + "columns": ["company_id", "thread_id", "tool_call_id"], "nameExplicit": false, "name": "connector_write_pkey", "entityType": "pks", @@ -7673,10 +7254,7 @@ "table": "connector_write" }, { - "columns": [ - "project_id", - "connection_id" - ], + "columns": ["project_id", "connection_id"], "nameExplicit": false, "name": "project_connection_pkey", "entityType": "pks", @@ -7684,10 +7262,7 @@ "table": "project_connection" }, { - "columns": [ - "proposal_id", - "connection_id" - ], + "columns": ["proposal_id", "connection_id"], "nameExplicit": false, "name": "copy_proposal_source_pkey", "entityType": "pks", @@ -7695,10 +7270,7 @@ "table": "copy_proposal_source" }, { - "columns": [ - "copy_id", - "connection_id" - ], + "columns": ["copy_id", "connection_id"], "nameExplicit": false, "name": "copy_source_pkey", "entityType": "pks", @@ -7706,10 +7278,7 @@ "table": "copy_source" }, { - "columns": [ - "company_id", - "copy_id" - ], + "columns": ["company_id", "copy_id"], "nameExplicit": false, "name": "copy_table_left_pkey", "entityType": "pks", @@ -7717,10 +7286,7 @@ "table": "copy_table_left" }, { - "columns": [ - "project_id", - "copy_id" - ], + "columns": ["project_id", "copy_id"], "nameExplicit": false, "name": "project_copy_pkey", "entityType": "pks", @@ -7728,10 +7294,7 @@ "table": "project_copy" }, { - "columns": [ - "project_id", - "person_id" - ], + "columns": ["project_id", "person_id"], "nameExplicit": false, "name": "app_access_pkey", "entityType": "pks", @@ -7739,9 +7302,7 @@ "table": "app_access" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "agent_pkey", "schema": "builder", @@ -7749,9 +7310,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "agent_conversation_pkey", "schema": "builder", @@ -7759,9 +7318,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "assistant_conversation_pkey", "schema": "builder", @@ -7769,9 +7326,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "conversation_pkey", "schema": "builder", @@ -7779,9 +7334,7 @@ "entityType": "pks" }, { - "columns": [ - "company_id" - ], + "columns": ["company_id"], "nameExplicit": false, "name": "company_model_pkey", "schema": "builder", @@ -7789,9 +7342,7 @@ "entityType": "pks" }, { - "columns": [ - "company_id" - ], + "columns": ["company_id"], "nameExplicit": false, "name": "company_model_fallback_pkey", "schema": "builder", @@ -7799,9 +7350,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "model_account_pkey", "schema": "builder", @@ -7809,9 +7358,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "model_account_sign_in_pkey", "schema": "builder", @@ -7819,9 +7366,7 @@ "entityType": "pks" }, { - "columns": [ - "company_id" - ], + "columns": ["company_id"], "nameExplicit": false, "name": "observational_memory_models_pkey", "schema": "builder", @@ -7829,9 +7374,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "tool_pkey", "schema": "builder", @@ -7839,9 +7382,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "tool_version_pkey", "schema": "builder", @@ -7849,9 +7390,7 @@ "entityType": "pks" }, { - "columns": [ - "project_id" - ], + "columns": ["project_id"], "nameExplicit": false, "name": "app_pkey", "schema": "apps", @@ -7859,9 +7398,7 @@ "entityType": "pks" }, { - "columns": [ - "token_hash" - ], + "columns": ["token_hash"], "nameExplicit": false, "name": "app_session_pkey", "schema": "apps", @@ -7869,9 +7406,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "app_version_pkey", "schema": "apps", @@ -7879,9 +7414,7 @@ "entityType": "pks" }, { - "columns": [ - "code_hash" - ], + "columns": ["code_hash"], "nameExplicit": false, "name": "handoff_pkey", "schema": "apps", @@ -7889,9 +7422,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "connection_pkey", "schema": "connectors", @@ -7899,9 +7430,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "connection_sign_in_pkey", "schema": "connectors", @@ -7909,9 +7438,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "copy_pkey", "schema": "copies", @@ -7919,9 +7446,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "copy_proposal_pkey", "schema": "copies", @@ -7929,9 +7454,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "copy_run_pkey", "schema": "copies", @@ -7939,9 +7462,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "account_pkey", "schema": "auth", @@ -7949,9 +7470,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "company_pkey", "schema": "auth", @@ -7959,9 +7478,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "invitation_pkey", "schema": "auth", @@ -7969,9 +7486,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "member_pkey", "schema": "auth", @@ -7979,9 +7494,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "organization_role_pkey", "schema": "auth", @@ -7989,9 +7502,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "rate_limit_pkey", "schema": "auth", @@ -7999,9 +7510,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "session_pkey", "schema": "auth", @@ -8009,9 +7518,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "user_pkey", "schema": "auth", @@ -8019,9 +7526,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "verification_pkey", "schema": "auth", @@ -8029,9 +7534,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "notification_pkey", "schema": "notifications", @@ -8039,9 +7542,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "request_notice_pkey", "schema": "notifications", @@ -8049,9 +7550,7 @@ "entityType": "pks" }, { - "columns": [ - "company_id" - ], + "columns": ["company_id"], "nameExplicit": false, "name": "client_pkey", "schema": "operations", @@ -8059,9 +7558,7 @@ "entityType": "pks" }, { - "columns": [ - "company_id" - ], + "columns": ["company_id"], "nameExplicit": false, "name": "company_database_pkey", "schema": "projects", @@ -8069,9 +7566,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "project_pkey", "schema": "projects", @@ -8079,9 +7574,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "request_pkey", "schema": "requests", @@ -8089,9 +7582,7 @@ "entityType": "pks" }, { - "columns": [ - "id" - ], + "columns": ["id"], "nameExplicit": false, "name": "starts_pkey", "schema": "hub", @@ -8100,10 +7591,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "id" - ], + "columns": ["company_id", "id"], "nullsNotDistinct": false, "name": "agent_company_id_id_key", "entityType": "uniques", @@ -8112,10 +7600,7 @@ }, { "nameExplicit": true, - "columns": [ - "agent_id", - "tool_id" - ], + "columns": ["agent_id", "tool_id"], "nullsNotDistinct": false, "name": "agent_tool_agent_id_tool_id_key", "entityType": "uniques", @@ -8124,10 +7609,7 @@ }, { "nameExplicit": true, - "columns": [ - "agent_id", - "source_revision" - ], + "columns": ["agent_id", "source_revision"], "nullsNotDistinct": false, "name": "agent_version_agent_id_source_revision_key", "entityType": "uniques", @@ -8136,11 +7618,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "agent_id", - "number" - ], + "columns": ["company_id", "agent_id", "number"], "nullsNotDistinct": false, "name": "agent_version_company_id_agent_id_number_key", "entityType": "uniques", @@ -8149,11 +7627,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "person_id", - "attempt_key" - ], + "columns": ["company_id", "person_id", "attempt_key"], "nullsNotDistinct": false, "name": "conversation_attempt_key", "entityType": "uniques", @@ -8162,10 +7636,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "attempt_key" - ], + "columns": ["company_id", "attempt_key"], "nullsNotDistinct": false, "name": "model_account_attempt_key", "entityType": "uniques", @@ -8174,10 +7645,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "slug" - ], + "columns": ["company_id", "slug"], "nullsNotDistinct": false, "name": "tool_company_id_slug_key", "entityType": "uniques", @@ -8186,10 +7654,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "id" - ], + "columns": ["company_id", "id"], "nullsNotDistinct": false, "name": "tool_company_id_id_key", "entityType": "uniques", @@ -8198,10 +7663,7 @@ }, { "nameExplicit": true, - "columns": [ - "tool_id", - "number" - ], + "columns": ["tool_id", "number"], "nullsNotDistinct": false, "name": "tool_version_tool_id_number_key", "entityType": "uniques", @@ -8210,10 +7672,7 @@ }, { "nameExplicit": true, - "columns": [ - "tool_id", - "id" - ], + "columns": ["tool_id", "id"], "nullsNotDistinct": false, "name": "tool_version_tool_id_id_key", "entityType": "uniques", @@ -8222,10 +7681,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "id" - ], + "columns": ["company_id", "id"], "nullsNotDistinct": false, "name": "tool_version_company_id_id_key", "entityType": "uniques", @@ -8234,10 +7690,7 @@ }, { "nameExplicit": true, - "columns": [ - "project_id", - "number" - ], + "columns": ["project_id", "number"], "nullsNotDistinct": false, "name": "app_version_project_id_number_key", "entityType": "uniques", @@ -8246,10 +7699,7 @@ }, { "nameExplicit": true, - "columns": [ - "project_id", - "attempt_key" - ], + "columns": ["project_id", "attempt_key"], "nullsNotDistinct": false, "name": "app_version_project_id_attempt_key_key", "entityType": "uniques", @@ -8258,10 +7708,7 @@ }, { "nameExplicit": true, - "columns": [ - "project_id", - "id" - ], + "columns": ["project_id", "id"], "nullsNotDistinct": false, "name": "app_version_project_id_id_key", "entityType": "uniques", @@ -8270,10 +7717,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "attempt_key" - ], + "columns": ["company_id", "attempt_key"], "nullsNotDistinct": false, "name": "connection_attempt_key", "entityType": "uniques", @@ -8282,11 +7726,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "connector_id", - "id" - ], + "columns": ["company_id", "connector_id", "id"], "nullsNotDistinct": false, "name": "connection_company_connector_id_key", "entityType": "uniques", @@ -8295,10 +7735,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "name" - ], + "columns": ["company_id", "name"], "nullsNotDistinct": false, "name": "copy_company_id_name_key", "entityType": "uniques", @@ -8307,10 +7744,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "attempt_key" - ], + "columns": ["company_id", "attempt_key"], "nullsNotDistinct": false, "name": "copy_company_id_attempt_key_key", "entityType": "uniques", @@ -8319,10 +7753,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "id" - ], + "columns": ["company_id", "id"], "nullsNotDistinct": false, "name": "copy_company_id_id_key", "entityType": "uniques", @@ -8331,10 +7762,7 @@ }, { "nameExplicit": true, - "columns": [ - "copy_id", - "account_ref" - ], + "columns": ["copy_id", "account_ref"], "nullsNotDistinct": false, "name": "copy_source_copy_id_account_ref_key", "entityType": "uniques", @@ -8343,10 +7771,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "attempt_key" - ], + "columns": ["company_id", "attempt_key"], "nullsNotDistinct": false, "name": "invitation_company_id_attempt_key_key", "entityType": "uniques", @@ -8355,10 +7780,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "user_id" - ], + "columns": ["company_id", "user_id"], "nullsNotDistinct": false, "name": "member_company_id_user_id_key", "entityType": "uniques", @@ -8367,10 +7789,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "run_id" - ], + "columns": ["company_id", "run_id"], "nullsNotDistinct": false, "name": "notification_run_key", "entityType": "uniques", @@ -8379,11 +7798,7 @@ }, { "nameExplicit": true, - "columns": [ - "request_id", - "person_id", - "kind" - ], + "columns": ["request_id", "person_id", "kind"], "nullsNotDistinct": false, "name": "request_notice_key", "entityType": "uniques", @@ -8392,10 +7807,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "attempt_key" - ], + "columns": ["company_id", "attempt_key"], "nullsNotDistinct": false, "name": "project_company_id_attempt_key_key", "entityType": "uniques", @@ -8404,10 +7816,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "id" - ], + "columns": ["company_id", "id"], "nullsNotDistinct": false, "name": "project_company_id_id_key", "entityType": "uniques", @@ -8416,10 +7825,7 @@ }, { "nameExplicit": true, - "columns": [ - "company_id", - "attempt_key" - ], + "columns": ["company_id", "attempt_key"], "nullsNotDistinct": false, "name": "request_attempt_key", "entityType": "uniques", @@ -8428,9 +7834,7 @@ }, { "nameExplicit": false, - "columns": [ - "slug" - ], + "columns": ["slug"], "nullsNotDistinct": false, "name": "company_slug_key", "schema": "auth", @@ -8439,9 +7843,7 @@ }, { "nameExplicit": false, - "columns": [ - "attempt_key" - ], + "columns": ["attempt_key"], "nullsNotDistinct": false, "name": "company_attempt_key_key", "schema": "auth", @@ -8450,9 +7852,7 @@ }, { "nameExplicit": true, - "columns": [ - "nickname" - ], + "columns": ["nickname"], "nullsNotDistinct": false, "name": "company_nickname_key", "schema": "auth", @@ -8461,9 +7861,7 @@ }, { "nameExplicit": false, - "columns": [ - "key" - ], + "columns": ["key"], "nullsNotDistinct": false, "name": "rate_limit_key_key", "schema": "auth", @@ -8472,9 +7870,7 @@ }, { "nameExplicit": false, - "columns": [ - "token" - ], + "columns": ["token"], "nullsNotDistinct": false, "name": "session_token_key", "schema": "auth", @@ -8483,9 +7879,7 @@ }, { "nameExplicit": false, - "columns": [ - "email" - ], + "columns": ["email"], "nullsNotDistinct": false, "name": "user_email_key", "schema": "auth", @@ -8494,9 +7888,7 @@ }, { "nameExplicit": true, - "columns": [ - "cnpj" - ], + "columns": ["cnpj"], "nullsNotDistinct": false, "name": "client_cnpj_key", "schema": "operations", @@ -8505,9 +7897,7 @@ }, { "nameExplicit": true, - "columns": [ - "attempt_key" - ], + "columns": ["attempt_key"], "nullsNotDistinct": false, "name": "client_attempt_key_key", "schema": "operations", @@ -8516,9 +7906,7 @@ }, { "nameExplicit": true, - "columns": [ - "neon_project_id" - ], + "columns": ["neon_project_id"], "nullsNotDistinct": false, "name": "company_database_neon_project_id_key", "schema": "projects", @@ -8527,9 +7915,7 @@ }, { "nameExplicit": true, - "columns": [ - "host_label" - ], + "columns": ["host_label"], "nullsNotDistinct": false, "name": "project_host_label_key", "schema": "projects", @@ -9029,9 +8415,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9042,9 +8426,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_agent_companies" - ], + "roles": ["hub_agent_companies"], "using": "true", "withCheck": null, "name": "agent_companies_select", @@ -9055,9 +8437,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", "name": "company_all", @@ -9068,9 +8448,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9081,9 +8459,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9094,9 +8470,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9107,9 +8481,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", "name": "company_all", @@ -9120,9 +8492,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", "name": "company_all", @@ -9133,9 +8503,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "company_select", @@ -9146,9 +8514,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_select", @@ -9159,9 +8525,7 @@ { "as": "PERMISSIVE", "for": "INSERT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": null, "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "operator_insert", @@ -9172,9 +8536,7 @@ { "as": "PERMISSIVE", "for": "DELETE", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_delete", @@ -9185,9 +8547,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9198,9 +8558,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9211,9 +8569,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id is null or person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id is null or person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", "name": "company_all", @@ -9224,9 +8580,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_model_seals" - ], + "roles": ["hub_model_seals"], "using": "true", "withCheck": null, "name": "model_seals_select", @@ -9237,9 +8591,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9250,9 +8602,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", "name": "company_all", @@ -9263,9 +8613,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_model_seals" - ], + "roles": ["hub_model_seals"], "using": "true", "withCheck": null, "name": "model_seals_select", @@ -9276,9 +8624,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9289,9 +8635,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '') and person_id = nullif(current_setting('conexus.person_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '') and person_id = nullif(current_setting('conexus.person_id', true), '')", "name": "company_all", @@ -9302,9 +8646,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9315,9 +8657,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9328,9 +8668,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9341,9 +8679,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_select", @@ -9354,9 +8690,7 @@ { "as": "PERMISSIVE", "for": "DELETE", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_delete", @@ -9367,9 +8701,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_app_companies" - ], + "roles": ["hub_app_companies"], "using": "true", "withCheck": null, "name": "companies_select", @@ -9380,9 +8712,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9393,9 +8723,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_select", @@ -9406,9 +8734,7 @@ { "as": "PERMISSIVE", "for": "DELETE", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_delete", @@ -9419,9 +8745,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9432,9 +8756,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_select", @@ -9445,9 +8767,7 @@ { "as": "PERMISSIVE", "for": "DELETE", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_delete", @@ -9458,9 +8778,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9471,9 +8789,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_select", @@ -9484,9 +8800,7 @@ { "as": "PERMISSIVE", "for": "DELETE", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_delete", @@ -9497,9 +8811,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9510,9 +8822,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_connection_seals" - ], + "roles": ["hub_connection_seals"], "using": "true", "withCheck": null, "name": "connection_seals_select", @@ -9523,9 +8833,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')\n and (person_id = nullif(current_setting('conexus.person_id', true), '') or nullif(current_setting('conexus.person_id', true), '') is null)", "name": "company_all", @@ -9536,9 +8844,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9549,9 +8855,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9562,9 +8866,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9575,9 +8877,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9588,9 +8888,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9601,9 +8899,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9614,9 +8910,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9627,9 +8921,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9640,9 +8932,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9653,9 +8943,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9666,9 +8954,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_app_people" - ], + "roles": ["hub_app_people"], "using": "true", "withCheck": null, "name": "app_people_select", @@ -9679,9 +8965,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_person" - ], + "roles": ["hub_person"], "using": "exists (select 1 from auth.member m where m.company_id = company.id and m.user_id = nullif(current_setting('conexus.person_id', true), ''))", "withCheck": null, "name": "person_select", @@ -9692,9 +8976,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_invitation" - ], + "roles": ["hub_invitation"], "using": "exists (select 1 from auth.invitation i where i.id = nullif(current_setting('conexus.invitation_id', true), '') and i.company_id = company.id)", "withCheck": "exists (select 1 from auth.invitation i where i.id = nullif(current_setting('conexus.invitation_id', true), '') and i.company_id = company.id)", "name": "invitation_all", @@ -9705,9 +8987,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), ''))", "withCheck": null, "name": "operator_select", @@ -9718,9 +8998,7 @@ { "as": "PERMISSIVE", "for": "INSERT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": null, "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), ''))", "name": "operator_insert", @@ -9731,9 +9009,7 @@ { "as": "PERMISSIVE", "for": "UPDATE", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and id = nullif(current_setting('conexus.company_id', true), '')", "name": "operator_update", @@ -9744,9 +9020,7 @@ { "as": "PERMISSIVE", "for": "DELETE", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_delete", @@ -9757,9 +9031,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9770,9 +9042,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_person" - ], + "roles": ["hub_person"], "using": "inviter_id = nullif(current_setting('conexus.person_id', true), '')\n or lower(email) = (select u.email from auth.\"user\" u where u.id = nullif(current_setting('conexus.person_id', true), ''))", "withCheck": null, "name": "person_select", @@ -9783,9 +9053,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_invitation" - ], + "roles": ["hub_invitation"], "using": "id = nullif(current_setting('conexus.invitation_id', true), '')", "withCheck": "id = nullif(current_setting('conexus.invitation_id', true), '')", "name": "invitation_all", @@ -9796,9 +9064,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and (role = 'owner' or company_id = nullif(current_setting('conexus.company_id', true), ''))", "withCheck": null, "name": "operator_select", @@ -9809,9 +9075,7 @@ { "as": "PERMISSIVE", "for": "INSERT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": null, "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and role = 'owner'", "name": "operator_insert", @@ -9822,9 +9086,7 @@ { "as": "PERMISSIVE", "for": "UPDATE", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and role = 'owner'", "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and role = 'owner'", "name": "operator_update", @@ -9835,9 +9097,7 @@ { "as": "PERMISSIVE", "for": "DELETE", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_delete", @@ -9848,9 +9108,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9861,9 +9119,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_person" - ], + "roles": ["hub_person"], "using": "user_id = nullif(current_setting('conexus.person_id', true), '')", "withCheck": null, "name": "person_select", @@ -9874,9 +9130,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_invitation" - ], + "roles": ["hub_invitation"], "using": "exists (select 1 from auth.invitation i where i.id = nullif(current_setting('conexus.invitation_id', true), '') and i.company_id = member.company_id)", "withCheck": null, "name": "invitation_select", @@ -9887,9 +9141,7 @@ { "as": "PERMISSIVE", "for": "INSERT", - "roles": [ - "hub_invitation" - ], + "roles": ["hub_invitation"], "using": null, "withCheck": "user_id = nullif(current_setting('conexus.person_id', true), '')\n and exists (select 1 from auth.invitation i where i.id = nullif(current_setting('conexus.invitation_id', true), '') and i.company_id = member.company_id)", "name": "invitation_insert", @@ -9900,9 +9152,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and (role = 'owner' or company_id = nullif(current_setting('conexus.company_id', true), ''))", "withCheck": null, "name": "operator_select", @@ -9913,9 +9163,7 @@ { "as": "PERMISSIVE", "for": "DELETE", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_delete", @@ -9926,9 +9174,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -9939,9 +9185,7 @@ { "as": "PERMISSIVE", "for": "INSERT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": null, "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), ''))", "name": "operator_insert", @@ -9952,9 +9196,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_runtime" - ], + "roles": ["hub_runtime"], "using": "true", "withCheck": "true", "name": "runtime_all", @@ -9965,9 +9207,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "user_id = nullif(current_setting('conexus.person_id', true), '')", "withCheck": "user_id = nullif(current_setting('conexus.person_id', true), '')", "name": "company_all", @@ -9978,9 +9218,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_invitation" - ], + "roles": ["hub_invitation"], "using": "user_id = nullif(current_setting('conexus.person_id', true), '')\n or exists (select 1 from auth.invitation i join auth.\"user\" u on u.email = lower(i.email)\n where i.id = nullif(current_setting('conexus.invitation_id', true), '') and u.id = session.user_id)", "withCheck": "user_id = nullif(current_setting('conexus.person_id', true), '')\n or exists (select 1 from auth.invitation i join auth.\"user\" u on u.email = lower(i.email)\n where i.id = nullif(current_setting('conexus.invitation_id', true), '') and u.id = session.user_id)", "name": "invitation_all", @@ -9991,9 +9229,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_runtime" - ], + "roles": ["hub_runtime"], "using": "true", "withCheck": "true", "name": "runtime_sign_in", @@ -10004,9 +9240,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "id = nullif(current_setting('conexus.person_id', true), '')\n or exists (select 1 from auth.member m where m.user_id = \"user\".id and m.company_id = nullif(current_setting('conexus.company_id', true), ''))\n or exists (select 1 from auth.invitation i where i.inviter_id = \"user\".id and i.company_id = nullif(current_setting('conexus.company_id', true), ''))\n or exists (select 1 from projects.app_access a where a.person_id = \"user\".id and a.company_id = nullif(current_setting('conexus.company_id', true), ''))", "withCheck": "id = nullif(current_setting('conexus.person_id', true), '')\n or exists (select 1 from auth.member m where m.user_id = \"user\".id and m.company_id = nullif(current_setting('conexus.company_id', true), ''))\n or exists (select 1 from auth.invitation i where i.inviter_id = \"user\".id and i.company_id = nullif(current_setting('conexus.company_id', true), ''))\n or exists (select 1 from projects.app_access a where a.person_id = \"user\".id and a.company_id = nullif(current_setting('conexus.company_id', true), ''))", "name": "company_all", @@ -10017,9 +9251,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_person" - ], + "roles": ["hub_person"], "using": "id = nullif(current_setting('conexus.person_id', true), '')", "withCheck": "id = nullif(current_setting('conexus.person_id', true), '')", "name": "person_all", @@ -10030,9 +9262,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_invitation" - ], + "roles": ["hub_invitation"], "using": "id = nullif(current_setting('conexus.person_id', true), '')\n or exists (select 1 from auth.invitation i where i.id = nullif(current_setting('conexus.invitation_id', true), '')\n and (i.inviter_id = \"user\".id or lower(i.email) = \"user\".email))", "withCheck": "id = nullif(current_setting('conexus.person_id', true), '')\n or exists (select 1 from auth.invitation i where i.id = nullif(current_setting('conexus.invitation_id', true), '')\n and (i.inviter_id = \"user\".id or lower(i.email) = \"user\".email))", "name": "invitation_all", @@ -10043,9 +9273,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_administrators" - ], + "roles": ["hub_administrators"], "using": "role = 'admin'", "withCheck": null, "name": "administrators_select", @@ -10056,9 +9284,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and (role = 'admin'\n or exists (select 1 from auth.member m where m.user_id = \"user\".id and m.role = 'owner'))", "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and (role = 'admin'\n or exists (select 1 from auth.member m where m.user_id = \"user\".id and m.role = 'owner'))", "name": "operator_all", @@ -10069,9 +9295,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '') and person_id = nullif(current_setting('conexus.person_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '') and person_id = nullif(current_setting('conexus.person_id', true), '')", "name": "company_all", @@ -10082,9 +9306,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '') and person_id = nullif(current_setting('conexus.person_id', true), '')", "withCheck": null, "name": "company_select", @@ -10095,9 +9317,7 @@ { "as": "PERMISSIVE", "for": "UPDATE", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '') and person_id = nullif(current_setting('conexus.person_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '') and person_id = nullif(current_setting('conexus.person_id', true), '')", "name": "company_update", @@ -10108,9 +9328,7 @@ { "as": "PERMISSIVE", "for": "INSERT", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": null, "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_insert", @@ -10121,9 +9339,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), ''))", "withCheck": null, "name": "operator_select", @@ -10134,9 +9350,7 @@ { "as": "PERMISSIVE", "for": "INSERT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": null, "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), ''))", "name": "operator_insert", @@ -10147,9 +9361,7 @@ { "as": "PERMISSIVE", "for": "UPDATE", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), ''))", "withCheck": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), ''))", "name": "operator_update", @@ -10160,9 +9372,7 @@ { "as": "PERMISSIVE", "for": "DELETE", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_delete", @@ -10173,9 +9383,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -10186,9 +9394,7 @@ { "as": "PERMISSIVE", "for": "INSERT", - "roles": [ - "hub_invitation" - ], + "roles": ["hub_invitation"], "using": null, "withCheck": "exists (select 1 from auth.invitation i\n join auth.\"user\" u on lower(u.email) = lower(i.email)\n where i.id = nullif(current_setting('conexus.invitation_id', true), '') and i.company_id = app_access.company_id\n and i.project_id = app_access.project_id and i.app_role is not distinct from app_access.role\n and u.id = app_access.person_id)", "name": "invitation_insert", @@ -10199,9 +9405,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_invitation" - ], + "roles": ["hub_invitation"], "using": "exists (select 1 from auth.invitation i\n join auth.\"user\" u on lower(u.email) = lower(i.email)\n where i.id = nullif(current_setting('conexus.invitation_id', true), '') and i.project_id = app_access.project_id\n and u.id = app_access.person_id)", "withCheck": null, "name": "invitation_select", @@ -10212,9 +9416,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_app_people" - ], + "roles": ["hub_app_people"], "using": "true", "withCheck": null, "name": "app_people_select", @@ -10225,9 +9427,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -10238,9 +9438,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_select", @@ -10251,9 +9449,7 @@ { "as": "PERMISSIVE", "for": "DELETE", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_delete", @@ -10264,9 +9460,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -10277,9 +9471,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_select", @@ -10290,9 +9482,7 @@ { "as": "PERMISSIVE", "for": "DELETE", - "roles": [ - "hub_operator" - ], + "roles": ["hub_operator"], "using": "auth.is_installation_administrator(nullif(current_setting('conexus.person_id', true), '')) and company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": null, "name": "operator_delete", @@ -10303,9 +9493,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_hosts" - ], + "roles": ["hub_hosts"], "using": "true", "withCheck": null, "name": "hosts_select", @@ -10316,9 +9504,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_app_people" - ], + "roles": ["hub_app_people"], "using": "true", "withCheck": null, "name": "app_people_select", @@ -10329,9 +9515,7 @@ { "as": "PERMISSIVE", "for": "SELECT", - "roles": [ - "hub_invitation" - ], + "roles": ["hub_invitation"], "using": "exists (select 1 from auth.invitation i where i.id = nullif(current_setting('conexus.invitation_id', true), '')\n and i.company_id = project.company_id and i.project_id = project.id)", "withCheck": null, "name": "invitation_select", @@ -10342,9 +9526,7 @@ { "as": "PERMISSIVE", "for": "ALL", - "roles": [ - "hub_company" - ], + "roles": ["hub_company"], "using": "company_id = nullif(current_setting('conexus.company_id', true), '')", "withCheck": "company_id = nullif(current_setting('conexus.company_id', true), '')", "name": "company_all", @@ -10354,4 +9536,4 @@ } ], "renames": [] -} \ No newline at end of file +}