Skip to content

The open-source app everyone uses to manage agents at work

Extend native instance secrets to project lifecycle plugins (#17034)

Nicky Leach65f59e339a9f
diff --git a/packages/db/src/migrations/0370_flimsy_lord_tyger.sql b/packages/db/src/migrations/0370_flimsy_lord_tyger.sql
new file mode 100644
index 0000000000..260417a23a
--- /dev/null
+++ b/packages/db/src/migrations/0370_flimsy_lord_tyger.sql
@@ -0,0 +1,21 @@
+CREATE UNIQUE INDEX "projects_company_id_uq" ON "projects" USING btree ("company_id","id");--> statement-breakpoint
+ALTER TABLE "company_secrets" DROP CONSTRAINT "company_secrets_scope_shape_check";--> statement-breakpoint
+ALTER TABLE "company_secrets" ADD COLUMN "owner_project_id" uuid;--> statement-breakpoint
+ALTER TABLE "company_secrets" ADD CONSTRAINT "company_secrets_company_id_owner_project_id_projects_company_id_id_fk" FOREIGN KEY ("company_id","owner_project_id") REFERENCES "public"."projects"("company_id","id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+CREATE UNIQUE INDEX "company_secrets_project_instance_owner_key_uq" ON "company_secrets" USING btree ("company_id","owner_project_id","owner_plugin_id","key") WHERE "company_secrets"."scope" = 'instance' and "company_secrets"."deleted_at" is null;--> statement-breakpoint
+ALTER TABLE "company_secrets" ADD CONSTRAINT "company_secrets_scope_shape_check" CHECK ((
+ "company_secrets"."scope" = 'company'
+ and "company_secrets"."owner_user_id" is null
+ and "company_secrets"."user_secret_definition_id" is null
+ and "company_secrets"."owner_agent_id" is null and "company_secrets"."owner_project_id" is null and "company_secrets"."owner_plugin_id" is null
+ ) or (
+ "company_secrets"."scope" = 'user'
+ and "company_secrets"."owner_user_id" is not null
+ and "company_secrets"."user_secret_definition_id" is not null
+ and "company_secrets"."owner_agent_id" is null and "company_secrets"."owner_project_id" is null and "company_secrets"."owner_plugin_id" is null
+ ) or (
+ "company_secrets"."scope" = 'instance'
+ and "company_secrets"."owner_user_id" is null and "company_secrets"."user_secret_definition_id" is null
+ and ("company_secrets"."owner_agent_id" is not null) <> ("company_secrets"."owner_project_id" is not null)
+ and "company_secrets"."owner_plugin_id" is not null
+ ));
\ No newline at end of file
diff --git a/packages/db/src/migrations/meta/0365_snapshot.json b/packages/db/src/migrations/meta/0370_snapshot.json
similarity index 93%
rename from packages/db/src/migrations/meta/0365_snapshot.json
rename to packages/db/src/migrations/meta/0370_snapshot.json
index 22886f4d9d..d6870986af 100644
--- a/packages/db/src/migrations/meta/0365_snapshot.json
+++ b/packages/db/src/migrations/meta/0370_snapshot.json
@@ -1,6 +1,6 @@
{
- "id": "4c5d89e4-ee3d-4a92-b037-8bf7712e0b9d",
- "prevId": "f31e8e2c-93a9-4dd5-8e85-08fe53d76afc",
+ "id": "a7c9681c-fb33-47c3-8139-3d88d7bbfe19",
+ "prevId": "9fa514b5-5cd1-4350-9b77-f60924655298",
"version": "7",
"dialect": "postgresql",
"tables": {
@@ -64,37 +64,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"accounting_runtime_baselines_agent_id_agents_id_fk": {
"name": "accounting_runtime_baselines_agent_id_agents_id_fk",
"tableFrom": "accounting_runtime_baselines",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"accounting_runtime_baselines_company_id_companies_id_fk": {
"name": "accounting_runtime_baselines_company_id_companies_id_fk",
"tableFrom": "accounting_runtime_baselines",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -200,9 +200,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"billing_invoice_lines_company_idx": {
"name": "billing_invoice_lines_company_idx",
@@ -221,50 +221,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"billing_invoice_lines_company_id_companies_id_fk": {
"name": "billing_invoice_lines_company_id_companies_id_fk",
"tableFrom": "billing_invoice_lines",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"billing_invoice_lines_invoice_id_billing_invoices_id_fk": {
"name": "billing_invoice_lines_invoice_id_billing_invoices_id_fk",
"tableFrom": "billing_invoice_lines",
+ "tableTo": "billing_invoices",
"columnsFrom": [
"invoice_id"
],
- "tableTo": "billing_invoices",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"billing_invoice_lines_cost_event_id_cost_events_id_fk": {
"name": "billing_invoice_lines_cost_event_id_cost_events_id_fk",
"tableFrom": "billing_invoice_lines",
+ "tableTo": "cost_events",
"columnsFrom": [
"cost_event_id"
],
- "tableTo": "cost_events",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -361,24 +361,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"billing_invoices_company_id_companies_id_fk": {
"name": "billing_invoices_company_id_companies_id_fk",
"tableFrom": "billing_invoices",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -491,9 +491,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"budget_reservations_prompt_injection_idx": {
"name": "budget_reservations_prompt_injection_idx",
@@ -512,9 +512,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"budget_reservations_decision_idx": {
"name": "budget_reservations_decision_idx",
@@ -533,9 +533,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"budget_reservations_run_idx": {
"name": "budget_reservations_run_idx",
@@ -554,9 +554,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"budget_reservations_active_idx": {
"name": "budget_reservations_active_idx",
@@ -581,51 +581,51 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"budget_reservations\".\"state\" = 'held'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"budget_reservations_company_id_companies_id_fk": {
"name": "budget_reservations_company_id_companies_id_fk",
"tableFrom": "budget_reservations",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"budget_reservations_run_id_heartbeat_runs_id_fk": {
"name": "budget_reservations_run_id_heartbeat_runs_id_fk",
"tableFrom": "budget_reservations",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"budget_reservations_agent_id_agents_id_fk": {
"name": "budget_reservations_agent_id_agents_id_fk",
"tableFrom": "budget_reservations",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -758,9 +758,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cost_adjustments_event_idx": {
"name": "cost_adjustments_event_idx",
@@ -785,9 +785,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cost_adjustments_invoice_line_idx": {
"name": "cost_adjustments_invoice_line_idx",
@@ -806,50 +806,50 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"cost_adjustments_company_id_companies_id_fk": {
"name": "cost_adjustments_company_id_companies_id_fk",
"tableFrom": "cost_adjustments",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"cost_adjustments_cost_event_id_cost_events_id_fk": {
"name": "cost_adjustments_cost_event_id_cost_events_id_fk",
"tableFrom": "cost_adjustments",
+ "tableTo": "cost_events",
"columnsFrom": [
"cost_event_id"
],
- "tableTo": "cost_events",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"cost_adjustments_invoice_line_id_billing_invoice_lines_id_fk": {
"name": "cost_adjustments_invoice_line_id_billing_invoice_lines_id_fk",
"tableFrom": "cost_adjustments",
+ "tableTo": "billing_invoice_lines",
"columnsFrom": [
"invoice_line_id"
],
- "tableTo": "billing_invoice_lines",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -961,24 +961,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"provider_billing_snapshots_company_id_companies_id_fk": {
"name": "provider_billing_snapshots_company_id_companies_id_fk",
"tableFrom": "provider_billing_snapshots",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -1088,9 +1088,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"run_usage_receipts_run_latest_idx": {
"name": "run_usage_receipts_run_latest_idx",
@@ -1115,37 +1115,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"run_usage_receipts_company_id_companies_id_fk": {
"name": "run_usage_receipts_company_id_companies_id_fk",
"tableFrom": "run_usage_receipts",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"run_usage_receipts_run_id_heartbeat_runs_id_fk": {
"name": "run_usage_receipts_run_id_heartbeat_runs_id_fk",
"tableFrom": "run_usage_receipts",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -1257,9 +1257,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"activity_log_company_agent_created_idx": {
"name": "activity_log_company_agent_created_idx",
@@ -1284,9 +1284,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"activity_log_company_responsible_user_created_idx": {
"name": "activity_log_company_responsible_user_created_idx",
@@ -1311,9 +1311,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"activity_log_run_id_idx": {
"name": "activity_log_run_id_idx",
@@ -1326,9 +1326,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"activity_log_entity_type_id_idx": {
"name": "activity_log_entity_type_id_idx",
@@ -1347,50 +1347,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"activity_log_company_id_companies_id_fk": {
"name": "activity_log_company_id_companies_id_fk",
"tableFrom": "activity_log",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"activity_log_agent_id_agents_id_fk": {
"name": "activity_log_agent_id_agents_id_fk",
"tableFrom": "activity_log",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"activity_log_run_id_heartbeat_runs_id_fk": {
"name": "activity_log_run_id_heartbeat_runs_id_fk",
"tableFrom": "activity_log",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -1546,9 +1546,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"adapter_auth_sessions_company_owner_adapter_active_uq": {
"name": "adapter_auth_sessions_company_owner_adapter_active_uq",
@@ -1573,10 +1573,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"adapter_auth_sessions\".\"status\" IN ('starting', 'waiting_for_user', 'promoting', 'awaiting_code', 'submitting')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"adapter_auth_sessions_public_session_id_uq": {
"name": "adapter_auth_sessions_public_session_id_uq",
@@ -1589,9 +1589,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"adapter_auth_sessions_environment_idx": {
"name": "adapter_auth_sessions_environment_idx",
@@ -1604,9 +1604,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"adapter_auth_sessions_expires_idx": {
"name": "adapter_auth_sessions_expires_idx",
@@ -1619,9 +1619,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"adapter_auth_sessions_provider_lease_idx": {
"name": "adapter_auth_sessions_provider_lease_idx",
@@ -1634,37 +1634,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"adapter_auth_sessions_company_id_companies_id_fk": {
"name": "adapter_auth_sessions_company_id_companies_id_fk",
"tableFrom": "adapter_auth_sessions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"adapter_auth_sessions_environment_id_environments_id_fk": {
"name": "adapter_auth_sessions_environment_id_environments_id_fk",
"tableFrom": "adapter_auth_sessions",
+ "tableTo": "environments",
"columnsFrom": [
"environment_id"
],
- "tableTo": "environments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -1752,9 +1752,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_api_keys_company_agent_idx": {
"name": "agent_api_keys_company_agent_idx",
@@ -1773,37 +1773,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"agent_api_keys_agent_id_agents_id_fk": {
"name": "agent_api_keys_agent_id_agents_id_fk",
"tableFrom": "agent_api_keys",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"agent_api_keys_company_id_companies_id_fk": {
"name": "agent_api_keys_company_id_companies_id_fk",
"tableFrom": "agent_api_keys",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -1903,9 +1903,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_commentary_company_kind_created_idx": {
"name": "agent_commentary_company_kind_created_idx",
@@ -1930,63 +1930,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"agent_commentary_company_id_companies_id_fk": {
"name": "agent_commentary_company_id_companies_id_fk",
"tableFrom": "agent_commentary",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"agent_commentary_agent_id_agents_id_fk": {
"name": "agent_commentary_agent_id_agents_id_fk",
"tableFrom": "agent_commentary",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"agent_commentary_run_id_heartbeat_runs_id_fk": {
"name": "agent_commentary_run_id_heartbeat_runs_id_fk",
"tableFrom": "agent_commentary",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"agent_commentary_issue_id_issues_id_fk": {
"name": "agent_commentary_issue_id_issues_id_fk",
"tableFrom": "agent_commentary",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -2099,9 +2099,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_config_revisions_agent_created_idx": {
"name": "agent_config_revisions_agent_created_idx",
@@ -2120,50 +2120,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"agent_config_revisions_company_id_companies_id_fk": {
"name": "agent_config_revisions_company_id_companies_id_fk",
"tableFrom": "agent_config_revisions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"agent_config_revisions_agent_id_agents_id_fk": {
"name": "agent_config_revisions_agent_id_agents_id_fk",
"tableFrom": "agent_config_revisions",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"agent_config_revisions_created_by_agent_id_agents_id_fk": {
"name": "agent_config_revisions_created_by_agent_id_agents_id_fk",
"tableFrom": "agent_config_revisions",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -2225,17 +2225,17 @@
"agent_identity_keys_owner_fk": {
"name": "agent_identity_keys_owner_fk",
"tableFrom": "agent_identity_keys",
+ "tableTo": "agents",
"columnsFrom": [
"company_id",
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -2290,33 +2290,33 @@
"agent_instruction_heads_company_id_agent_id_entry_file_revision_id_agent_instruction_revisions_company_id_agent_id_entry_file_id_fk": {
"name": "agent_instruction_heads_company_id_agent_id_entry_file_revision_id_agent_instruction_revisions_company_id_agent_id_entry_file_id_fk",
"tableFrom": "agent_instruction_heads",
+ "tableTo": "agent_instruction_revisions",
"columnsFrom": [
"company_id",
"agent_id",
"entry_file",
"revision_id"
],
- "tableTo": "agent_instruction_revisions",
"columnsTo": [
"company_id",
"agent_id",
"entry_file",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"agent_instruction_heads_identity_uq": {
"name": "agent_instruction_heads_identity_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"agent_id",
"entry_file"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -2462,39 +2462,39 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"agent_instruction_revisions_company_id_agent_id_agents_company_id_id_fk": {
"name": "agent_instruction_revisions_company_id_agent_id_agents_company_id_id_fk",
"tableFrom": "agent_instruction_revisions",
+ "tableTo": "agents",
"columnsFrom": [
"company_id",
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"agent_instruction_revisions_identity_uq": {
"name": "agent_instruction_revisions_identity_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"agent_id",
"entry_file",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -2654,9 +2654,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_instruction_copies_agent_idx": {
"name": "agent_instruction_copies_agent_idx",
@@ -2681,39 +2681,39 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"agent_instruction_working_copies_run_id_heartbeat_runs_id_fk": {
"name": "agent_instruction_working_copies_run_id_heartbeat_runs_id_fk",
"tableFrom": "agent_instruction_working_copies",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"agent_instruction_working_copies_company_id_agent_id_agents_company_id_id_fk": {
"name": "agent_instruction_working_copies_company_id_agent_id_agents_company_id_id_fk",
"tableFrom": "agent_instruction_working_copies",
+ "tableTo": "agents",
"columnsFrom": [
"company_id",
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -2797,9 +2797,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_memberships_company_user_starred_idx": {
"name": "agent_memberships_company_user_starred_idx",
@@ -2824,9 +2824,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_memberships_agent_idx": {
"name": "agent_memberships_agent_idx",
@@ -2839,9 +2839,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_memberships_company_user_agent_uq": {
"name": "agent_memberships_company_user_agent_uq",
@@ -2866,37 +2866,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"agent_memberships_company_id_companies_id_fk": {
"name": "agent_memberships_company_id_companies_id_fk",
"tableFrom": "agent_memberships",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"agent_memberships_agent_id_agents_id_fk": {
"name": "agent_memberships_agent_id_agents_id_fk",
"tableFrom": "agent_memberships",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -3019,9 +3019,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_runtime_state_company_updated_idx": {
"name": "agent_runtime_state_company_updated_idx",
@@ -3040,37 +3040,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"agent_runtime_state_agent_id_agents_id_fk": {
"name": "agent_runtime_state_agent_id_agents_id_fk",
"tableFrom": "agent_runtime_state",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"agent_runtime_state_company_id_companies_id_fk": {
"name": "agent_runtime_state_company_id_companies_id_fk",
"tableFrom": "agent_runtime_state",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -3184,9 +3184,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_session_goal_actions_company_status_created_idx": {
"name": "agent_session_goal_actions_company_status_created_idx",
@@ -3211,9 +3211,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_session_goal_actions_session_created_idx": {
"name": "agent_session_goal_actions_session_created_idx",
@@ -3232,37 +3232,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"agent_session_goal_actions_company_id_companies_id_fk": {
"name": "agent_session_goal_actions_company_id_companies_id_fk",
"tableFrom": "agent_session_goal_actions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"agent_session_goal_actions_session_id_agent_task_sessions_id_fk": {
"name": "agent_session_goal_actions_session_id_agent_task_sessions_id_fk",
"tableFrom": "agent_session_goal_actions",
+ "tableTo": "agent_task_sessions",
"columnsFrom": [
"session_id"
],
- "tableTo": "agent_task_sessions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -3424,9 +3424,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_task_sessions_company_agent_updated_idx": {
"name": "agent_task_sessions_company_agent_updated_idx",
@@ -3451,9 +3451,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_task_sessions_company_task_updated_idx": {
"name": "agent_task_sessions_company_task_updated_idx",
@@ -3478,50 +3478,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"agent_task_sessions_company_id_companies_id_fk": {
"name": "agent_task_sessions_company_id_companies_id_fk",
"tableFrom": "agent_task_sessions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"agent_task_sessions_agent_id_agents_id_fk": {
"name": "agent_task_sessions_agent_id_agents_id_fk",
"tableFrom": "agent_task_sessions",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"agent_task_sessions_last_run_id_heartbeat_runs_id_fk": {
"name": "agent_task_sessions_last_run_id_heartbeat_runs_id_fk",
"tableFrom": "agent_task_sessions",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"last_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -3656,6 +3656,28 @@
}
},
"indexes": {
+ "agent_wakeup_requests_task_retry_idempotency_uq": {
+ "name": "agent_wakeup_requests_task_retry_idempotency_uq",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "idempotency_key",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"agent_wakeup_requests\".\"idempotency_key\" LIKE 'task-retry:%'",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
"agent_wakeup_requests_company_agent_status_idx": {
"name": "agent_wakeup_requests_company_agent_status_idx",
"columns": [
@@ -3679,9 +3701,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_wakeup_requests_company_requested_idx": {
"name": "agent_wakeup_requests_company_requested_idx",
@@ -3700,9 +3722,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_wakeup_requests_agent_requested_idx": {
"name": "agent_wakeup_requests_agent_requested_idx",
@@ -3721,9 +3743,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_wakeup_requests_review_path_recovery_idempotency_uq": {
"name": "agent_wakeup_requests_review_path_recovery_idempotency_uq",
@@ -3742,10 +3764,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"agent_wakeup_requests\".\"idempotency_key\" LIKE 'issue_review_path_lost:%' AND \"agent_wakeup_requests\".\"status\" <> 'skipped'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"agent_wakeup_requests_disposition_repair_idempotency_uq": {
"name": "agent_wakeup_requests_disposition_repair_idempotency_uq",
@@ -3764,10 +3786,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"agent_wakeup_requests\".\"idempotency_key\" LIKE 'issue_disposition_repair:%' AND \"agent_wakeup_requests\".\"status\" <> 'skipped'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"agent_wakeup_requests_question_response_delivery_idempotency_uq": {
"name": "agent_wakeup_requests_question_response_delivery_idempotency_uq",
@@ -3786,10 +3808,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "(\"agent_wakeup_requests\".\"idempotency_key\" LIKE 'question-response:%' OR \"agent_wakeup_requests\".\"idempotency_key\" LIKE 'interaction:%') AND \"agent_wakeup_requests\".\"status\" NOT IN ('skipped', 'failed', 'cancelled')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"agent_wakeup_requests_question_response_history_idx": {
"name": "agent_wakeup_requests_question_response_history_idx",
@@ -3808,10 +3830,10 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"agent_wakeup_requests\".\"idempotency_key\" LIKE 'question-response:%'",
- "concurrently": true
+ "concurrently": true,
+ "method": "btree",
+ "with": {}
},
"agent_wakeup_requests_connection_intent_delivery_idempotency_uq": {
"name": "agent_wakeup_requests_connection_intent_delivery_idempotency_uq",
@@ -3830,10 +3852,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"agent_wakeup_requests\".\"idempotency_key\" LIKE 'connection-intent:%' AND \"agent_wakeup_requests\".\"status\" NOT IN ('skipped', 'failed', 'cancelled')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"agent_wakeup_requests_tool_action_delivery_uq": {
"name": "agent_wakeup_requests_tool_action_delivery_uq",
@@ -3852,10 +3874,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"agent_wakeup_requests\".\"idempotency_key\" LIKE 'tool-action-response:%' AND \"agent_wakeup_requests\".\"status\" NOT IN ('skipped', 'failed', 'cancelled')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"agent_wakeup_requests_chat_completion_uq": {
"name": "agent_wakeup_requests_chat_completion_uq",
@@ -3874,10 +3896,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"agent_wakeup_requests\".\"idempotency_key\" LIKE 'chat-completion:%'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"agent_wakeup_requests_company_payload_issue_idx": {
"name": "agent_wakeup_requests_company_payload_issue_idx",
@@ -3890,43 +3912,43 @@
},
{
"expression": "(\"payload\" ->> 'issueId')",
- "isExpression": true,
"asc": true,
+ "isExpression": true,
"nulls": "last"
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"agent_wakeup_requests_company_id_companies_id_fk": {
"name": "agent_wakeup_requests_company_id_companies_id_fk",
"tableFrom": "agent_wakeup_requests",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"agent_wakeup_requests_agent_id_agents_id_fk": {
"name": "agent_wakeup_requests_agent_id_agents_id_fk",
"tableFrom": "agent_wakeup_requests",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -4170,9 +4192,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agents_company_status_idx": {
"name": "agents_company_status_idx",
@@ -4191,9 +4213,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agents_company_reports_to_idx": {
"name": "agents_company_reports_to_idx",
@@ -4212,9 +4234,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agents_company_default_environment_idx": {
"name": "agents_company_default_environment_idx",
@@ -4233,61 +4255,61 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"agents_company_id_companies_id_fk": {
"name": "agents_company_id_companies_id_fk",
"tableFrom": "agents",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"agents_reports_to_agents_id_fk": {
"name": "agents_reports_to_agents_id_fk",
"tableFrom": "agents",
+ "tableTo": "agents",
"columnsFrom": [
"reports_to"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"agents_default_environment_id_environments_id_fk": {
"name": "agents_default_environment_id_environments_id_fk",
"tableFrom": "agents",
+ "tableTo": "environments",
"columnsFrom": [
"default_environment_id"
],
- "tableTo": "environments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"agents_company_id_uq": {
"name": "agents_company_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -4373,39 +4395,39 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"ai_connection_defaults_company_id_companies_id_fk": {
"name": "ai_connection_defaults_company_id_companies_id_fk",
"tableFrom": "ai_connection_defaults",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_connection_defaults_company_grant_fk": {
"name": "ai_connection_defaults_company_grant_fk",
"tableFrom": "ai_connection_defaults",
+ "tableTo": "connection_grants",
"columnsFrom": [
"company_id",
"grant_id"
],
- "tableTo": "connection_grants",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -4478,54 +4500,54 @@
"ai_connection_pools_id_tool_connections_id_fk": {
"name": "ai_connection_pools_id_tool_connections_id_fk",
"tableFrom": "ai_connection_pools",
+ "tableTo": "tool_connections",
"columnsFrom": [
"id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_connection_pools_company_id_companies_id_fk": {
"name": "ai_connection_pools_company_id_companies_id_fk",
"tableFrom": "ai_connection_pools",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_connection_pools_company_connection_fk": {
"name": "ai_connection_pools_company_connection_fk",
"tableFrom": "ai_connection_pools",
+ "tableTo": "tool_connections",
"columnsFrom": [
"company_id",
"id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"ai_connection_pools_company_id_uq": {
"name": "ai_connection_pools_company_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -4567,43 +4589,43 @@
"ai_connection_router_cursors_pool_id_ai_connection_pools_id_fk": {
"name": "ai_connection_router_cursors_pool_id_ai_connection_pools_id_fk",
"tableFrom": "ai_connection_router_cursors",
+ "tableTo": "ai_connection_pools",
"columnsFrom": [
"pool_id"
],
- "tableTo": "ai_connection_pools",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_connection_router_cursors_company_id_companies_id_fk": {
"name": "ai_connection_router_cursors_company_id_companies_id_fk",
"tableFrom": "ai_connection_router_cursors",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_connection_router_cursors_company_pool_fk": {
"name": "ai_connection_router_cursors_company_pool_fk",
"tableFrom": "ai_connection_router_cursors",
+ "tableTo": "ai_connection_pools",
"columnsFrom": [
"company_id",
"pool_id"
],
- "tableTo": "ai_connection_pools",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -4697,80 +4719,80 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"ai_connection_task_pins_company_id_companies_id_fk": {
"name": "ai_connection_task_pins_company_id_companies_id_fk",
"tableFrom": "ai_connection_task_pins",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_connection_task_pins_pool_id_ai_connection_pools_id_fk": {
"name": "ai_connection_task_pins_pool_id_ai_connection_pools_id_fk",
"tableFrom": "ai_connection_task_pins",
+ "tableTo": "ai_connection_pools",
"columnsFrom": [
"pool_id"
],
- "tableTo": "ai_connection_pools",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_connection_task_pins_agent_id_agents_id_fk": {
"name": "ai_connection_task_pins_agent_id_agents_id_fk",
"tableFrom": "ai_connection_task_pins",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_connection_task_pins_company_pool_fk": {
"name": "ai_connection_task_pins_company_pool_fk",
"tableFrom": "ai_connection_task_pins",
+ "tableTo": "ai_connection_pools",
"columnsFrom": [
"company_id",
"pool_id"
],
- "tableTo": "ai_connection_pools",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_connection_task_pins_company_agent_fk": {
"name": "ai_connection_task_pins_company_agent_fk",
"tableFrom": "ai_connection_task_pins",
+ "tableTo": "agents",
"columnsFrom": [
"company_id",
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -4846,39 +4868,39 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"ai_provider_defaults_company_id_companies_id_fk": {
"name": "ai_provider_defaults_company_id_companies_id_fk",
"tableFrom": "ai_provider_defaults",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_provider_defaults_company_grant_fk": {
"name": "ai_provider_defaults_company_grant_fk",
"tableFrom": "ai_provider_defaults",
+ "tableTo": "connection_grants",
"columnsFrom": [
"company_id",
"grant_id"
],
- "tableTo": "connection_grants",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -4952,9 +4974,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"ai_subscription_connections_credential_idx": {
"name": "ai_subscription_connections_credential_idx",
@@ -4973,9 +4995,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"ai_subscription_connections_account_idx": {
"name": "ai_subscription_connections_account_idx",
@@ -4994,63 +5016,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"ai_subscription_connections_company_id_companies_id_fk": {
"name": "ai_subscription_connections_company_id_companies_id_fk",
"tableFrom": "ai_subscription_connections",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_subscription_connections_connection_id_tool_connections_id_fk": {
"name": "ai_subscription_connections_connection_id_tool_connections_id_fk",
"tableFrom": "ai_subscription_connections",
+ "tableTo": "tool_connections",
"columnsFrom": [
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_subscription_connections_grant_id_connection_grants_id_fk": {
"name": "ai_subscription_connections_grant_id_connection_grants_id_fk",
"tableFrom": "ai_subscription_connections",
+ "tableTo": "connection_grants",
"columnsFrom": [
"grant_id"
],
- "tableTo": "connection_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_subscription_connections_subscription_id_ai_subscriptions_id_fk": {
"name": "ai_subscription_connections_subscription_id_ai_subscriptions_id_fk",
"tableFrom": "ai_subscription_connections",
+ "tableTo": "ai_subscriptions",
"columnsFrom": [
"subscription_id"
],
- "tableTo": "ai_subscriptions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -5159,9 +5181,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"ai_subscription_prices_company_idx": {
"name": "ai_subscription_prices_company_idx",
@@ -5174,37 +5196,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"ai_subscription_prices_company_id_companies_id_fk": {
"name": "ai_subscription_prices_company_id_companies_id_fk",
"tableFrom": "ai_subscription_prices",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_subscription_prices_subscription_id_ai_subscriptions_id_fk": {
"name": "ai_subscription_prices_subscription_id_ai_subscriptions_id_fk",
"tableFrom": "ai_subscription_prices",
+ "tableTo": "ai_subscriptions",
"columnsFrom": [
"subscription_id"
],
- "tableTo": "ai_subscriptions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -5343,9 +5365,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"ai_subscriptions_company_idx": {
"name": "ai_subscriptions_company_idx",
@@ -5358,37 +5380,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"ai_subscriptions_company_id_companies_id_fk": {
"name": "ai_subscriptions_company_id_companies_id_fk",
"tableFrom": "ai_subscriptions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_subscriptions_merged_into_id_ai_subscriptions_id_fk": {
"name": "ai_subscriptions_merged_into_id_ai_subscriptions_id_fk",
"tableFrom": "ai_subscriptions",
+ "tableTo": "ai_subscriptions",
"columnsFrom": [
"merged_into_id"
],
- "tableTo": "ai_subscriptions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -5529,9 +5551,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"approval_comments_approval_idx": {
"name": "approval_comments_approval_idx",
@@ -5544,9 +5566,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"approval_comments_approval_created_idx": {
"name": "approval_comments_approval_created_idx",
@@ -5565,50 +5587,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"approval_comments_company_id_companies_id_fk": {
"name": "approval_comments_company_id_companies_id_fk",
"tableFrom": "approval_comments",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"approval_comments_approval_id_approvals_id_fk": {
"name": "approval_comments_approval_id_approvals_id_fk",
"tableFrom": "approval_comments",
+ "tableTo": "approvals",
"columnsFrom": [
"approval_id"
],
- "tableTo": "approvals",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"approval_comments_author_agent_id_agents_id_fk": {
"name": "approval_comments_author_agent_id_agents_id_fk",
"tableFrom": "approval_comments",
+ "tableTo": "agents",
"columnsFrom": [
"author_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -5722,37 +5744,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"approvals_company_id_companies_id_fk": {
"name": "approvals_company_id_companies_id_fk",
"tableFrom": "approvals",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"approvals_requested_by_agent_id_agents_id_fk": {
"name": "approvals_requested_by_agent_id_agents_id_fk",
"tableFrom": "approvals",
+ "tableTo": "agents",
"columnsFrom": [
"requested_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -5859,9 +5881,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"assets_company_provider_idx": {
"name": "assets_company_provider_idx",
@@ -5880,9 +5902,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"assets_company_object_key_uq": {
"name": "assets_company_object_key_uq",
@@ -5901,37 +5923,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"assets_company_id_companies_id_fk": {
"name": "assets_company_id_companies_id_fk",
"tableFrom": "assets",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"assets_created_by_agent_id_agents_id_fk": {
"name": "assets_created_by_agent_id_agents_id_fk",
"tableFrom": "assets",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -6047,24 +6069,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"account_user_id_user_id_fk": {
"name": "account_user_id_user_id_fk",
"tableFrom": "account",
+ "tableTo": "user",
"columnsFrom": [
"user_id"
],
- "tableTo": "user",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -6131,15 +6153,15 @@
"session_user_id_user_id_fk": {
"name": "session_user_id_user_id_fk",
"tableFrom": "session",
+ "tableTo": "user",
"columnsFrom": [
"user_id"
],
- "tableTo": "user",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -6320,9 +6342,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"board_api_keys_user_idx": {
"name": "board_api_keys_user_idx",
@@ -6335,24 +6357,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"board_api_keys_user_id_user_id_fk": {
"name": "board_api_keys_user_id_user_id_fk",
"tableFrom": "board_api_keys",
+ "tableTo": "user",
"columnsFrom": [
"user_id"
],
- "tableTo": "user",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -6423,9 +6445,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"browser_use_browsers_session_idx": {
"name": "browser_use_browsers_session_idx",
@@ -6438,37 +6460,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"browser_use_browsers_company_id_companies_id_fk": {
"name": "browser_use_browsers_company_id_companies_id_fk",
"tableFrom": "browser_use_browsers",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"browser_use_browsers_session_id_browser_use_sessions_id_fk": {
"name": "browser_use_browsers_session_id_browser_use_sessions_id_fk",
"tableFrom": "browser_use_browsers",
+ "tableTo": "browser_use_sessions",
"columnsFrom": [
"session_id"
],
- "tableTo": "browser_use_sessions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -6590,9 +6612,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"browser_use_runs_provider_uq": {
"name": "browser_use_runs_provider_uq",
@@ -6605,9 +6627,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"browser_use_runs_session_idx": {
"name": "browser_use_runs_session_idx",
@@ -6620,50 +6642,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"browser_use_runs_company_id_companies_id_fk": {
"name": "browser_use_runs_company_id_companies_id_fk",
"tableFrom": "browser_use_runs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"browser_use_runs_session_id_browser_use_sessions_id_fk": {
"name": "browser_use_runs_session_id_browser_use_sessions_id_fk",
"tableFrom": "browser_use_runs",
+ "tableTo": "browser_use_sessions",
"columnsFrom": [
"session_id"
],
- "tableTo": "browser_use_sessions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"browser_use_runs_heartbeat_run_id_heartbeat_runs_id_fk": {
"name": "browser_use_runs_heartbeat_run_id_heartbeat_runs_id_fk",
"tableFrom": "browser_use_runs",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"heartbeat_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -6796,9 +6818,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"browser_use_sessions_provider_uq": {
"name": "browser_use_sessions_provider_uq",
@@ -6811,76 +6833,76 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"browser_use_sessions_company_id_companies_id_fk": {
"name": "browser_use_sessions_company_id_companies_id_fk",
"tableFrom": "browser_use_sessions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"browser_use_sessions_issue_id_issues_id_fk": {
"name": "browser_use_sessions_issue_id_issues_id_fk",
"tableFrom": "browser_use_sessions",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"browser_use_sessions_agent_id_agents_id_fk": {
"name": "browser_use_sessions_agent_id_agents_id_fk",
"tableFrom": "browser_use_sessions",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"browser_use_sessions_connection_id_tool_connections_id_fk": {
"name": "browser_use_sessions_connection_id_tool_connections_id_fk",
"tableFrom": "browser_use_sessions",
+ "tableTo": "tool_connections",
"columnsFrom": [
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"browser_use_sessions_grant_id_connection_grants_id_fk": {
"name": "browser_use_sessions_grant_id_connection_grants_id_fk",
"tableFrom": "browser_use_sessions",
+ "tableTo": "connection_grants",
"columnsFrom": [
"grant_id"
],
- "tableTo": "connection_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -6924,28 +6946,28 @@
"browser_use_settings_grant_id_connection_grants_id_fk": {
"name": "browser_use_settings_grant_id_connection_grants_id_fk",
"tableFrom": "browser_use_settings",
+ "tableTo": "connection_grants",
"columnsFrom": [
"grant_id"
],
- "tableTo": "connection_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"browser_use_settings_company_id_companies_id_fk": {
"name": "browser_use_settings_company_id_companies_id_fk",
"tableFrom": "browser_use_settings",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -7083,9 +7105,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"budget_incidents_company_scope_idx": {
"name": "budget_incidents_company_scope_idx",
@@ -7116,9 +7138,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"budget_incidents_policy_window_threshold_idx": {
"name": "budget_incidents_policy_window_threshold_idx",
@@ -7143,51 +7165,51 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"budget_incidents\".\"status\" = 'open'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"budget_incidents_company_id_companies_id_fk": {
"name": "budget_incidents_company_id_companies_id_fk",
"tableFrom": "budget_incidents",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"budget_incidents_policy_id_budget_policies_id_fk": {
"name": "budget_incidents_policy_id_budget_policies_id_fk",
"tableFrom": "budget_incidents",
+ "tableTo": "budget_policies",
"columnsFrom": [
"policy_id"
],
- "tableTo": "budget_policies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"budget_incidents_approval_id_approvals_id_fk": {
"name": "budget_incidents_approval_id_approvals_id_fk",
"tableFrom": "budget_incidents",
+ "tableTo": "approvals",
"columnsFrom": [
"approval_id"
],
- "tableTo": "approvals",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -7358,9 +7380,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"budget_policies_company_window_idx": {
"name": "budget_policies_company_window_idx",
@@ -7385,9 +7407,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"budget_policies_company_scope_metric_unique_idx": {
"name": "budget_policies_company_scope_metric_unique_idx",
@@ -7424,24 +7446,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"budget_policies_company_id_companies_id_fk": {
"name": "budget_policies_company_id_companies_id_fk",
"tableFrom": "budget_policies",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -7542,9 +7564,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"built_in_managed_resources_resource_idx": {
"name": "built_in_managed_resources_resource_idx",
@@ -7563,9 +7585,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"built_in_managed_resources_company_bundle_resource_uq": {
"name": "built_in_managed_resources_company_bundle_resource_uq",
@@ -7596,24 +7618,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"built_in_managed_resources_company_id_companies_id_fk": {
"name": "built_in_managed_resources_company_id_companies_id_fk",
"tableFrom": "built_in_managed_resources",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -7689,9 +7711,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"case_access_sources_company_case_idx": {
"name": "case_access_sources_company_case_idx",
@@ -7710,37 +7732,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"case_access_sources_company_id_companies_id_fk": {
"name": "case_access_sources_company_id_companies_id_fk",
"tableFrom": "case_access_sources",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"case_access_sources_case_id_cases_id_fk": {
"name": "case_access_sources_case_id_cases_id_fk",
"tableFrom": "case_access_sources",
+ "tableTo": "cases",
"columnsFrom": [
"case_id"
],
- "tableTo": "cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -7816,9 +7838,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"case_attachments_asset_uq": {
"name": "case_attachments_asset_uq",
@@ -7831,50 +7853,50 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"case_attachments_company_id_companies_id_fk": {
"name": "case_attachments_company_id_companies_id_fk",
"tableFrom": "case_attachments",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"case_attachments_case_id_cases_id_fk": {
"name": "case_attachments_case_id_cases_id_fk",
"tableFrom": "case_attachments",
+ "tableTo": "cases",
"columnsFrom": [
"case_id"
],
- "tableTo": "cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"case_attachments_asset_id_assets_id_fk": {
"name": "case_attachments_asset_id_assets_id_fk",
"tableFrom": "case_attachments",
+ "tableTo": "assets",
"columnsFrom": [
"asset_id"
],
- "tableTo": "assets",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -7957,9 +7979,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"case_documents_document_uq": {
"name": "case_documents_document_uq",
@@ -7972,9 +7994,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"case_documents_company_case_updated_idx": {
"name": "case_documents_company_case_updated_idx",
@@ -7999,50 +8021,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"case_documents_company_id_companies_id_fk": {
"name": "case_documents_company_id_companies_id_fk",
"tableFrom": "case_documents",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"case_documents_case_id_cases_id_fk": {
"name": "case_documents_case_id_cases_id_fk",
"tableFrom": "case_documents",
+ "tableTo": "cases",
"columnsFrom": [
"case_id"
],
- "tableTo": "cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"case_documents_document_id_documents_id_fk": {
"name": "case_documents_document_id_documents_id_fk",
"tableFrom": "case_documents",
+ "tableTo": "documents",
"columnsFrom": [
"document_id"
],
- "tableTo": "documents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -8144,9 +8166,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"case_events_company_case_idx": {
"name": "case_events_company_case_idx",
@@ -8165,50 +8187,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"case_events_company_id_companies_id_fk": {
"name": "case_events_company_id_companies_id_fk",
"tableFrom": "case_events",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"case_events_case_id_cases_id_fk": {
"name": "case_events_case_id_cases_id_fk",
"tableFrom": "case_events",
+ "tableTo": "cases",
"columnsFrom": [
"case_id"
],
- "tableTo": "cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"case_events_actor_agent_id_agents_id_fk": {
"name": "case_events_actor_agent_id_agents_id_fk",
"tableFrom": "case_events",
+ "tableTo": "agents",
"columnsFrom": [
"actor_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -8459,9 +8481,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"case_handoffs_actor_idempotency_uq": {
"name": "case_handoffs_actor_idempotency_uq",
@@ -8492,9 +8514,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"case_handoffs_pending_case_uq": {
"name": "case_handoffs_pending_case_uq",
@@ -8507,10 +8529,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"case_handoffs\".\"state\" in ('awaiting_release', 'pending_dispatch', 'awaiting_completion')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"case_handoffs_pending_issue_uq": {
"name": "case_handoffs_pending_issue_uq",
@@ -8523,10 +8545,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"case_handoffs\".\"state\" in ('awaiting_release', 'pending_dispatch', 'awaiting_completion')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"case_handoffs_pending_attempt_idx": {
"name": "case_handoffs_pending_attempt_idx",
@@ -8539,10 +8561,10 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"case_handoffs\".\"state\" in ('awaiting_release', 'pending_dispatch')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"case_handoffs_case_created_idx": {
"name": "case_handoffs_case_created_idx",
@@ -8561,9 +8583,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"case_handoffs_source_run_idx": {
"name": "case_handoffs_source_run_idx",
@@ -8582,10 +8604,10 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"case_handoffs\".\"source_run_id\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"case_handoffs_wakeup_request_uq": {
"name": "case_handoffs_wakeup_request_uq",
@@ -8598,76 +8620,76 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"case_handoffs_company_id_companies_id_fk": {
"name": "case_handoffs_company_id_companies_id_fk",
"tableFrom": "case_handoffs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"case_handoffs_case_id_cases_id_fk": {
"name": "case_handoffs_case_id_cases_id_fk",
"tableFrom": "case_handoffs",
+ "tableTo": "cases",
"columnsFrom": [
"case_id"
],
- "tableTo": "cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"case_handoffs_issue_id_issues_id_fk": {
"name": "case_handoffs_issue_id_issues_id_fk",
"tableFrom": "case_handoffs",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
},
"case_handoffs_from_agent_id_agents_id_fk": {
"name": "case_handoffs_from_agent_id_agents_id_fk",
"tableFrom": "case_handoffs",
+ "tableTo": "agents",
"columnsFrom": [
"from_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
},
"case_handoffs_to_agent_id_agents_id_fk": {
"name": "case_handoffs_to_agent_id_agents_id_fk",
"tableFrom": "case_handoffs",
+ "tableTo": "agents",
"columnsFrom": [
"to_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -8767,9 +8789,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"case_issue_links_company_case_idx": {
"name": "case_issue_links_company_case_idx",
@@ -8788,9 +8810,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"case_issue_links_issue_idx": {
"name": "case_issue_links_issue_idx",
@@ -8803,50 +8825,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"case_issue_links_company_id_companies_id_fk": {
"name": "case_issue_links_company_id_companies_id_fk",
"tableFrom": "case_issue_links",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"case_issue_links_case_id_cases_id_fk": {
"name": "case_issue_links_case_id_cases_id_fk",
"tableFrom": "case_issue_links",
+ "tableTo": "cases",
"columnsFrom": [
"case_id"
],
- "tableTo": "cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"case_issue_links_issue_id_issues_id_fk": {
"name": "case_issue_links_issue_id_issues_id_fk",
"tableFrom": "case_issue_links",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -8922,9 +8944,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"case_labels_company_case_idx": {
"name": "case_labels_company_case_idx",
@@ -8943,9 +8965,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"case_labels_label_idx": {
"name": "case_labels_label_idx",
@@ -8958,50 +8980,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"case_labels_company_id_companies_id_fk": {
"name": "case_labels_company_id_companies_id_fk",
"tableFrom": "case_labels",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"case_labels_case_id_cases_id_fk": {
"name": "case_labels_case_id_cases_id_fk",
"tableFrom": "case_labels",
+ "tableTo": "cases",
"columnsFrom": [
"case_id"
],
- "tableTo": "cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"case_labels_label_id_labels_id_fk": {
"name": "case_labels_label_id_labels_id_fk",
"tableFrom": "case_labels",
+ "tableTo": "labels",
"columnsFrom": [
"label_id"
],
- "tableTo": "labels",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -9159,9 +9181,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cases_identifier_uq": {
"name": "cases_identifier_uq",
@@ -9174,9 +9196,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cases_work_issue_uq": {
"name": "cases_work_issue_uq",
@@ -9189,10 +9211,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"cases\".\"work_issue_id\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"cases_company_type_key_uq": {
"name": "cases_company_type_key_uq",
@@ -9217,9 +9239,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cases_company_status_idx": {
"name": "cases_company_status_idx",
@@ -9238,9 +9260,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cases_company_type_idx": {
"name": "cases_company_type_idx",
@@ -9259,9 +9281,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cases_company_project_idx": {
"name": "cases_company_project_idx",
@@ -9280,9 +9302,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cases_parent_idx": {
"name": "cases_parent_idx",
@@ -9295,9 +9317,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cases_title_search_idx": {
"name": "cases_title_search_idx",
@@ -9311,9 +9333,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "gin",
- "concurrently": false
+ "with": {}
},
"cases_identifier_search_idx": {
"name": "cases_identifier_search_idx",
@@ -9327,9 +9349,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "gin",
- "concurrently": false
+ "with": {}
},
"cases_summary_search_idx": {
"name": "cases_summary_search_idx",
@@ -9343,76 +9365,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "gin",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"cases_company_id_companies_id_fk": {
"name": "cases_company_id_companies_id_fk",
"tableFrom": "cases",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"cases_project_id_projects_id_fk": {
"name": "cases_project_id_projects_id_fk",
"tableFrom": "cases",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"cases_work_issue_id_issues_id_fk": {
"name": "cases_work_issue_id_issues_id_fk",
"tableFrom": "cases",
+ "tableTo": "issues",
"columnsFrom": [
"work_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
},
"cases_parent_case_id_cases_id_fk": {
"name": "cases_parent_case_id_cases_id_fk",
"tableFrom": "cases",
+ "tableTo": "cases",
"columnsFrom": [
"parent_case_id"
],
- "tableTo": "cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"cases_created_by_agent_id_agents_id_fk": {
"name": "cases_created_by_agent_id_agents_id_fk",
"tableFrom": "cases",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -9532,97 +9554,97 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_actions_company_id_companies_id_fk": {
"name": "chat_actions_company_id_companies_id_fk",
"tableFrom": "chat_actions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_actions_delivery_id_chat_deliveries_id_fk": {
"name": "chat_actions_delivery_id_chat_deliveries_id_fk",
"tableFrom": "chat_actions",
+ "tableTo": "chat_deliveries",
"columnsFrom": [
"delivery_id"
],
- "tableTo": "chat_deliveries",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"chat_actions_company_delivery_fk": {
"name": "chat_actions_company_delivery_fk",
"tableFrom": "chat_actions",
+ "tableTo": "chat_deliveries",
"columnsFrom": [
"company_id",
"delivery_id"
],
- "tableTo": "chat_deliveries",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_actions_company_conversation_fk": {
"name": "chat_actions_company_conversation_fk",
"tableFrom": "chat_actions",
+ "tableTo": "chat_conversations",
"columnsFrom": [
"company_id",
"conversation_id"
],
- "tableTo": "chat_conversations",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_actions_company_principal_fk": {
"name": "chat_actions_company_principal_fk",
"tableFrom": "chat_actions",
+ "tableTo": "chat_external_principals",
"columnsFrom": [
"company_id",
"principal_id"
],
- "tableTo": "chat_external_principals",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_actions_company_endpoint_fk": {
"name": "chat_actions_company_endpoint_fk",
"tableFrom": "chat_actions",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -9720,54 +9742,54 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_agent_routes_company_id_companies_id_fk": {
"name": "chat_agent_routes_company_id_companies_id_fk",
"tableFrom": "chat_agent_routes",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_agent_routes_company_source_fk": {
"name": "chat_agent_routes_company_source_fk",
"tableFrom": "chat_agent_routes",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"source_endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_agent_routes_company_destination_fk": {
"name": "chat_agent_routes_company_destination_fk",
"tableFrom": "chat_agent_routes",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"destination_endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -9907,9 +9929,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_conversations_thread_uq": {
"name": "chat_conversations_thread_uq",
@@ -9940,106 +9962,106 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_conversations_company_id_companies_id_fk": {
"name": "chat_conversations_company_id_companies_id_fk",
"tableFrom": "chat_conversations",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_conversations_resource_id_chat_endpoint_resources_id_fk": {
"name": "chat_conversations_resource_id_chat_endpoint_resources_id_fk",
"tableFrom": "chat_conversations",
+ "tableTo": "chat_endpoint_resources",
"columnsFrom": [
"resource_id"
],
- "tableTo": "chat_endpoint_resources",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"chat_conversations_issue_id_issues_id_fk": {
"name": "chat_conversations_issue_id_issues_id_fk",
"tableFrom": "chat_conversations",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
},
"chat_conversations_company_issue_fk": {
"name": "chat_conversations_company_issue_fk",
"tableFrom": "chat_conversations",
+ "tableTo": "issues",
"columnsFrom": [
"company_id",
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_conversations_company_endpoint_fk": {
"name": "chat_conversations_company_endpoint_fk",
"tableFrom": "chat_conversations",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_conversations_company_resource_fk": {
"name": "chat_conversations_company_resource_fk",
"tableFrom": "chat_conversations",
+ "tableTo": "chat_endpoint_resources",
"columnsFrom": [
"company_id",
"resource_id"
],
- "tableTo": "chat_endpoint_resources",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"chat_conversations_company_id_uq": {
"name": "chat_conversations_company_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -10182,9 +10204,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_deliveries_event_uq": {
"name": "chat_deliveries_event_uq",
@@ -10203,9 +10225,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_deliveries_dedupe_uq": {
"name": "chat_deliveries_dedupe_uq",
@@ -10224,106 +10246,106 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_deliveries_company_id_companies_id_fk": {
"name": "chat_deliveries_company_id_companies_id_fk",
"tableFrom": "chat_deliveries",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_deliveries_conversation_id_chat_conversations_id_fk": {
"name": "chat_deliveries_conversation_id_chat_conversations_id_fk",
"tableFrom": "chat_deliveries",
+ "tableTo": "chat_conversations",
"columnsFrom": [
"conversation_id"
],
- "tableTo": "chat_conversations",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"chat_deliveries_principal_id_chat_external_principals_id_fk": {
"name": "chat_deliveries_principal_id_chat_external_principals_id_fk",
"tableFrom": "chat_deliveries",
+ "tableTo": "chat_external_principals",
"columnsFrom": [
"principal_id"
],
- "tableTo": "chat_external_principals",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"chat_deliveries_company_endpoint_fk": {
"name": "chat_deliveries_company_endpoint_fk",
"tableFrom": "chat_deliveries",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_deliveries_company_conversation_fk": {
"name": "chat_deliveries_company_conversation_fk",
"tableFrom": "chat_deliveries",
+ "tableTo": "chat_conversations",
"columnsFrom": [
"company_id",
"conversation_id"
],
- "tableTo": "chat_conversations",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_deliveries_company_principal_fk": {
"name": "chat_deliveries_company_principal_fk",
"tableFrom": "chat_deliveries",
+ "tableTo": "chat_external_principals",
"columnsFrom": [
"company_id",
"principal_id"
],
- "tableTo": "chat_external_principals",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"chat_deliveries_company_id_uq": {
"name": "chat_deliveries_company_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -10409,9 +10431,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_endpoint_leases_expiry_idx": {
"name": "chat_endpoint_leases_expiry_idx",
@@ -10424,39 +10446,39 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_endpoint_leases_company_id_companies_id_fk": {
"name": "chat_endpoint_leases_company_id_companies_id_fk",
"tableFrom": "chat_endpoint_leases",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_endpoint_leases_company_endpoint_fk": {
"name": "chat_endpoint_leases_company_endpoint_fk",
"tableFrom": "chat_endpoint_leases",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -10584,9 +10606,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_endpoint_resources_external_uq": {
"name": "chat_endpoint_resources_external_uq",
@@ -10611,50 +10633,50 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_endpoint_resources_company_id_companies_id_fk": {
"name": "chat_endpoint_resources_company_id_companies_id_fk",
"tableFrom": "chat_endpoint_resources",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_endpoint_resources_company_endpoint_fk": {
"name": "chat_endpoint_resources_company_endpoint_fk",
"tableFrom": "chat_endpoint_resources",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"chat_endpoint_resources_company_id_uq": {
"name": "chat_endpoint_resources_company_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -10902,9 +10924,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_endpoints_agent_idx": {
"name": "chat_endpoints_agent_idx",
@@ -10923,9 +10945,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_endpoints_status_idx": {
"name": "chat_endpoints_status_idx",
@@ -10944,9 +10966,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_endpoints_public_id_uq": {
"name": "chat_endpoints_public_id_uq",
@@ -10959,9 +10981,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_endpoints_agentmail_inbox_uq": {
"name": "chat_endpoints_agentmail_inbox_uq",
@@ -10974,10 +10996,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"chat_endpoints\".\"provider\" = 'agentmail' and \"chat_endpoints\".\"status\" != 'archived' and \"chat_endpoints\".\"bot_external_id\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"chat_endpoints_connection_uq": {
"name": "chat_endpoints_connection_uq",
@@ -10990,9 +11012,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_endpoints_live_bot_external_uq": {
"name": "chat_endpoints_live_bot_external_uq",
@@ -11017,10 +11039,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"chat_endpoints\".\"status\" in ('verifying', 'active', 'paused', 'attention')\n and \"chat_endpoints\".\"provider_account_id\" is not null\n and \"chat_endpoints\".\"bot_external_id\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"chat_endpoints_photon_number_uq": {
"name": "chat_endpoints_photon_number_uq",
@@ -11033,10 +11055,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"chat_endpoints\".\"provider\" = 'imessage-photon' and \"chat_endpoints\".\"status\" <> 'archived' and \"chat_endpoints\".\"bot_external_id\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"chat_endpoints_live_discord_bot_external_uq": {
"name": "chat_endpoints_live_discord_bot_external_uq",
@@ -11055,10 +11077,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"chat_endpoints\".\"provider\" = 'discord'\n and \"chat_endpoints\".\"status\" in ('verifying', 'active', 'paused', 'attention')\n and \"chat_endpoints\".\"bot_external_id\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"chat_endpoints_live_global_app_bot_external_uq": {
"name": "chat_endpoints_live_global_app_bot_external_uq",
@@ -11077,10 +11099,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"chat_endpoints\".\"provider\" in ('github', 'microsoft-teams')\n and \"chat_endpoints\".\"status\" in ('verifying', 'active', 'paused', 'attention')\n and \"chat_endpoints\".\"bot_external_id\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"chat_endpoints_live_bot_username_uq": {
"name": "chat_endpoints_live_bot_username_uq",
@@ -11105,79 +11127,79 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"chat_endpoints\".\"status\" in ('verifying', 'active', 'paused', 'attention')\n and \"chat_endpoints\".\"provider_account_id\" is not null\n and \"chat_endpoints\".\"bot_username\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"chat_endpoints_company_id_companies_id_fk": {
"name": "chat_endpoints_company_id_companies_id_fk",
"tableFrom": "chat_endpoints",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_endpoints_assigned_agent_id_agents_id_fk": {
"name": "chat_endpoints_assigned_agent_id_agents_id_fk",
"tableFrom": "chat_endpoints",
+ "tableTo": "agents",
"columnsFrom": [
"assigned_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
},
"chat_endpoints_company_agent_fk": {
"name": "chat_endpoints_company_agent_fk",
"tableFrom": "chat_endpoints",
+ "tableTo": "agents",
"columnsFrom": [
"company_id",
"assigned_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_endpoints_company_connection_fk": {
"name": "chat_endpoints_company_connection_fk",
"tableFrom": "chat_endpoints",
+ "tableTo": "tool_connections",
"columnsFrom": [
"company_id",
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"chat_endpoints_company_id_uq": {
"name": "chat_endpoints_company_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -11313,9 +11335,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_external_principals_external_uq": {
"name": "chat_external_principals_external_uq",
@@ -11346,35 +11368,35 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_external_principals_company_id_companies_id_fk": {
"name": "chat_external_principals_company_id_companies_id_fk",
"tableFrom": "chat_external_principals",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"chat_external_principals_company_id_uq": {
"name": "chat_external_principals_company_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -11489,9 +11511,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_identity_links_endpoint_principal_uq": {
"name": "chat_identity_links_endpoint_principal_uq",
@@ -11510,54 +11532,54 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_identity_links_company_id_companies_id_fk": {
"name": "chat_identity_links_company_id_companies_id_fk",
"tableFrom": "chat_identity_links",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_identity_links_company_endpoint_fk": {
"name": "chat_identity_links_company_endpoint_fk",
"tableFrom": "chat_identity_links",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_identity_links_company_principal_fk": {
"name": "chat_identity_links_company_principal_fk",
"tableFrom": "chat_identity_links",
+ "tableTo": "chat_external_principals",
"columnsFrom": [
"company_id",
"principal_id"
],
- "tableTo": "chat_external_principals",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -11662,138 +11684,138 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_message_links_company_id_companies_id_fk": {
"name": "chat_message_links_company_id_companies_id_fk",
"tableFrom": "chat_message_links",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_message_links_delivery_id_chat_deliveries_id_fk": {
"name": "chat_message_links_delivery_id_chat_deliveries_id_fk",
"tableFrom": "chat_message_links",
+ "tableTo": "chat_deliveries",
"columnsFrom": [
"delivery_id"
],
- "tableTo": "chat_deliveries",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"chat_message_links_publication_id_chat_publications_id_fk": {
"name": "chat_message_links_publication_id_chat_publications_id_fk",
"tableFrom": "chat_message_links",
+ "tableTo": "chat_publications",
"columnsFrom": [
"publication_id"
],
- "tableTo": "chat_publications",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"chat_message_links_comment_id_issue_comments_id_fk": {
"name": "chat_message_links_comment_id_issue_comments_id_fk",
"tableFrom": "chat_message_links",
+ "tableTo": "issue_comments",
"columnsFrom": [
"comment_id"
],
- "tableTo": "issue_comments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"chat_message_links_company_endpoint_fk": {
"name": "chat_message_links_company_endpoint_fk",
"tableFrom": "chat_message_links",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_message_links_company_delivery_fk": {
"name": "chat_message_links_company_delivery_fk",
"tableFrom": "chat_message_links",
+ "tableTo": "chat_deliveries",
"columnsFrom": [
"company_id",
"delivery_id"
],
- "tableTo": "chat_deliveries",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_message_links_company_publication_fk": {
"name": "chat_message_links_company_publication_fk",
"tableFrom": "chat_message_links",
+ "tableTo": "chat_publications",
"columnsFrom": [
"company_id",
"publication_id"
],
- "tableTo": "chat_publications",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_message_links_company_comment_fk": {
"name": "chat_message_links_company_comment_fk",
"tableFrom": "chat_message_links",
+ "tableTo": "issue_comments",
"columnsFrom": [
"company_id",
"comment_id"
],
- "tableTo": "issue_comments",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_message_links_company_conversation_fk": {
"name": "chat_message_links_company_conversation_fk",
"tableFrom": "chat_message_links",
+ "tableTo": "chat_conversations",
"columnsFrom": [
"company_id",
"conversation_id"
],
- "tableTo": "chat_conversations",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -11937,9 +11959,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_publications_work_idx": {
"name": "chat_publications_work_idx",
@@ -11958,9 +11980,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_publications_idempotency_uq": {
"name": "chat_publications_idempotency_uq",
@@ -11979,110 +12001,110 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_publications_company_id_companies_id_fk": {
"name": "chat_publications_company_id_companies_id_fk",
"tableFrom": "chat_publications",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_publications_issue_id_issues_id_fk": {
"name": "chat_publications_issue_id_issues_id_fk",
"tableFrom": "chat_publications",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
},
"chat_publications_comment_id_issue_comments_id_fk": {
"name": "chat_publications_comment_id_issue_comments_id_fk",
"tableFrom": "chat_publications",
+ "tableTo": "issue_comments",
"columnsFrom": [
"comment_id"
],
- "tableTo": "issue_comments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"chat_publications_company_issue_fk": {
"name": "chat_publications_company_issue_fk",
"tableFrom": "chat_publications",
+ "tableTo": "issues",
"columnsFrom": [
"company_id",
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_publications_company_comment_fk": {
"name": "chat_publications_company_comment_fk",
"tableFrom": "chat_publications",
+ "tableTo": "issue_comments",
"columnsFrom": [
"company_id",
"comment_id"
],
- "tableTo": "issue_comments",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_publications_company_endpoint_fk": {
"name": "chat_publications_company_endpoint_fk",
"tableFrom": "chat_publications",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_publications_company_conversation_fk": {
"name": "chat_publications_company_conversation_fk",
"tableFrom": "chat_publications",
+ "tableTo": "chat_conversations",
"columnsFrom": [
"company_id",
"conversation_id"
],
- "tableTo": "chat_conversations",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -12177,9 +12199,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_sdk_state_expiry_idx": {
"name": "chat_sdk_state_expiry_idx",
@@ -12192,39 +12214,39 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_sdk_state_company_id_companies_id_fk": {
"name": "chat_sdk_state_company_id_companies_id_fk",
"tableFrom": "chat_sdk_state",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_sdk_state_company_endpoint_fk": {
"name": "chat_sdk_state_company_endpoint_fk",
"tableFrom": "chat_sdk_state",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -12327,9 +12349,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_completion_deliveries_pending_idx": {
"name": "chat_completion_deliveries_pending_idx",
@@ -12348,63 +12370,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_completion_deliveries_company_id_companies_id_fk": {
"name": "chat_completion_deliveries_company_id_companies_id_fk",
"tableFrom": "chat_completion_deliveries",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_completion_deliveries_task_id_chat_task_handoffs_task_id_fk": {
"name": "chat_completion_deliveries_task_id_chat_task_handoffs_task_id_fk",
"tableFrom": "chat_completion_deliveries",
+ "tableTo": "chat_task_handoffs",
"columnsFrom": [
"task_id"
],
- "tableTo": "chat_task_handoffs",
"columnsTo": [
"task_id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_completion_deliveries_target_run_id_heartbeat_runs_id_fk": {
"name": "chat_completion_deliveries_target_run_id_heartbeat_runs_id_fk",
"tableFrom": "chat_completion_deliveries",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"target_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"chat_completion_deliveries_response_comment_id_issue_comments_id_fk": {
"name": "chat_completion_deliveries_response_comment_id_issue_comments_id_fk",
"tableFrom": "chat_completion_deliveries",
+ "tableTo": "issue_comments",
"columnsFrom": [
"response_comment_id"
],
- "tableTo": "issue_comments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -12473,63 +12495,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_task_handoffs_task_id_issues_id_fk": {
"name": "chat_task_handoffs_task_id_issues_id_fk",
"tableFrom": "chat_task_handoffs",
+ "tableTo": "issues",
"columnsFrom": [
"task_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_task_handoffs_company_id_companies_id_fk": {
"name": "chat_task_handoffs_company_id_companies_id_fk",
"tableFrom": "chat_task_handoffs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_task_handoffs_conversation_id_issues_id_fk": {
"name": "chat_task_handoffs_conversation_id_issues_id_fk",
"tableFrom": "chat_task_handoffs",
+ "tableTo": "issues",
"columnsFrom": [
"conversation_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_task_handoffs_agent_id_agents_id_fk": {
"name": "chat_task_handoffs_agent_id_agents_id_fk",
"tableFrom": "chat_task_handoffs",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -12642,17 +12664,17 @@
"chat_github_configurations_company_id_endpoint_id_chat_endpoints_company_id_id_fk": {
"name": "chat_github_configurations_company_id_endpoint_id_chat_endpoints_company_id_id_fk",
"tableFrom": "chat_github_configurations",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -12771,9 +12793,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_github_registration_endpoint_idx": {
"name": "chat_github_registration_endpoint_idx",
@@ -12792,26 +12814,26 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_github_registrations_company_id_endpoint_id_chat_endpoints_company_id_id_fk": {
"name": "chat_github_registrations_company_id_endpoint_id_chat_endpoints_company_id_id_fk",
"tableFrom": "chat_github_registrations",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -12991,9 +13013,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_github_reviews_pull_idx": {
"name": "chat_github_reviews_pull_idx",
@@ -13024,9 +13046,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_github_reviews_task_idx": {
"name": "chat_github_reviews_task_idx",
@@ -13051,65 +13073,65 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_github_reviews_run_id_heartbeat_runs_id_fk": {
"name": "chat_github_reviews_run_id_heartbeat_runs_id_fk",
"tableFrom": "chat_github_reviews",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"chat_github_reviews_company_id_endpoint_id_chat_endpoints_company_id_id_fk": {
"name": "chat_github_reviews_company_id_endpoint_id_chat_endpoints_company_id_id_fk",
"tableFrom": "chat_github_reviews",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_github_reviews_company_id_issue_id_issues_company_id_id_fk": {
"name": "chat_github_reviews_company_id_issue_id_issues_company_id_id_fk",
"tableFrom": "chat_github_reviews",
+ "tableTo": "issues",
"columnsFrom": [
"company_id",
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"chat_github_reviews_company_id_uq": {
"name": "chat_github_reviews_company_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -13244,9 +13266,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_slack_manager_grants_owner_idx": {
"name": "chat_slack_manager_grants_owner_idx",
@@ -13277,24 +13299,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_slack_manager_grants_company_id_companies_id_fk": {
"name": "chat_slack_manager_grants_company_id_companies_id_fk",
"tableFrom": "chat_slack_manager_grants",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -13423,32 +13445,32 @@
"chat_slack_registrations_company_id_manager_grant_id_chat_slack_manager_grants_company_id_id_fk": {
"name": "chat_slack_registrations_company_id_manager_grant_id_chat_slack_manager_grants_company_id_id_fk",
"tableFrom": "chat_slack_registrations",
+ "tableTo": "chat_slack_manager_grants",
"columnsFrom": [
"company_id",
"manager_grant_id"
],
- "tableTo": "chat_slack_manager_grants",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_slack_registrations_company_id_endpoint_id_chat_endpoints_company_id_id_fk": {
"name": "chat_slack_registrations_company_id_endpoint_id_chat_endpoints_company_id_id_fk",
"tableFrom": "chat_slack_registrations",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -13712,9 +13734,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_teams_file_transfers_token_uq": {
"name": "chat_teams_file_transfers_token_uq",
@@ -13733,9 +13755,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_teams_file_transfers_work_idx": {
"name": "chat_teams_file_transfers_work_idx",
@@ -13760,97 +13782,97 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_teams_file_transfers_company_id_companies_id_fk": {
"name": "chat_teams_file_transfers_company_id_companies_id_fk",
"tableFrom": "chat_teams_file_transfers",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_teams_file_transfers_issue_id_issues_id_fk": {
"name": "chat_teams_file_transfers_issue_id_issues_id_fk",
"tableFrom": "chat_teams_file_transfers",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
},
"chat_teams_file_transfers_company_id_endpoint_id_chat_endpoints_company_id_id_fk": {
"name": "chat_teams_file_transfers_company_id_endpoint_id_chat_endpoints_company_id_id_fk",
"tableFrom": "chat_teams_file_transfers",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_teams_file_transfers_company_id_publication_id_chat_publications_company_id_id_fk": {
"name": "chat_teams_file_transfers_company_id_publication_id_chat_publications_company_id_id_fk",
"tableFrom": "chat_teams_file_transfers",
+ "tableTo": "chat_publications",
"columnsFrom": [
"company_id",
"publication_id"
],
- "tableTo": "chat_publications",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_teams_file_transfers_company_id_conversation_id_chat_conversations_company_id_id_fk": {
"name": "chat_teams_file_transfers_company_id_conversation_id_chat_conversations_company_id_id_fk",
"tableFrom": "chat_teams_file_transfers",
+ "tableTo": "chat_conversations",
"columnsFrom": [
"company_id",
"conversation_id"
],
- "tableTo": "chat_conversations",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_teams_file_transfers_company_id_principal_id_chat_external_principals_company_id_id_fk": {
"name": "chat_teams_file_transfers_company_id_principal_id_chat_external_principals_company_id_id_fk",
"tableFrom": "chat_teams_file_transfers",
+ "tableTo": "chat_external_principals",
"columnsFrom": [
"company_id",
"principal_id"
],
- "tableTo": "chat_external_principals",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -13950,26 +13972,26 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_voice_callbacks_endpoint_fk": {
"name": "chat_voice_callbacks_endpoint_fk",
"tableFrom": "chat_voice_callbacks",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -14118,81 +14140,81 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_voice_inbound_endpoint_fk": {
"name": "chat_voice_inbound_endpoint_fk",
"tableFrom": "chat_voice_inbound_calls",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_voice_inbound_session_fk": {
"name": "chat_voice_inbound_session_fk",
"tableFrom": "chat_voice_inbound_calls",
+ "tableTo": "chat_voice_sessions",
"columnsFrom": [
"company_id",
"session_id"
],
- "tableTo": "chat_voice_sessions",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_voice_inbound_intake_fk": {
"name": "chat_voice_inbound_intake_fk",
"tableFrom": "chat_voice_inbound_calls",
+ "tableTo": "issues",
"columnsFrom": [
"company_id",
"intake_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_voice_inbound_requested_issue_fk": {
"name": "chat_voice_inbound_requested_issue_fk",
"tableFrom": "chat_voice_inbound_calls",
+ "tableTo": "issues",
"columnsFrom": [
"company_id",
"requested_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"chat_voice_inbound_provider_uq": {
"name": "chat_voice_inbound_provider_uq",
+ "nullsNotDistinct": false,
"columns": [
"provider_session_id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -14277,40 +14299,40 @@
"chat_voice_phone_lines_low_trust_environment_id_environments_id_fk": {
"name": "chat_voice_phone_lines_low_trust_environment_id_environments_id_fk",
"tableFrom": "chat_voice_phone_lines",
+ "tableTo": "environments",
"columnsFrom": [
"low_trust_environment_id"
],
- "tableTo": "environments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_voice_phone_lines_endpoint_fk": {
"name": "chat_voice_phone_lines_endpoint_fk",
"tableFrom": "chat_voice_phone_lines",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"chat_voice_phone_lines_number_uq": {
"name": "chat_voice_phone_lines_number_uq",
+ "nullsNotDistinct": false,
"columns": [
"provider_number_id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -14410,26 +14432,26 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_voice_reports_session_fk": {
"name": "chat_voice_reports_session_fk",
"tableFrom": "chat_voice_reports",
+ "tableTo": "chat_voice_sessions",
"columnsFrom": [
"company_id",
"session_id"
],
- "tableTo": "chat_voice_sessions",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -14528,9 +14550,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_voice_replies_cursor_uq": {
"name": "chat_voice_replies_cursor_uq",
@@ -14549,54 +14571,54 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_voice_replies_company_id_companies_id_fk": {
"name": "chat_voice_replies_company_id_companies_id_fk",
"tableFrom": "chat_voice_replies",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_voice_replies_session_fk": {
"name": "chat_voice_replies_session_fk",
"tableFrom": "chat_voice_replies",
+ "tableTo": "chat_voice_sessions",
"columnsFrom": [
"company_id",
"session_id"
],
- "tableTo": "chat_voice_sessions",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_voice_replies_publication_fk": {
"name": "chat_voice_replies_publication_fk",
"tableFrom": "chat_voice_replies",
+ "tableTo": "chat_publications",
"columnsFrom": [
"company_id",
"publication_id"
],
- "tableTo": "chat_publications",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -14774,9 +14796,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_voice_sessions_request_uq": {
"name": "chat_voice_sessions_request_uq",
@@ -14801,9 +14823,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_voice_sessions_live_caller_task_uq": {
"name": "chat_voice_sessions_live_caller_task_uq",
@@ -14828,10 +14850,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"chat_voice_sessions\".\"state\" not in ('ended', 'failed', 'expired')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"chat_voice_sessions_expiry_idx": {
"name": "chat_voice_sessions_expiry_idx",
@@ -14850,95 +14872,95 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_voice_sessions_company_id_companies_id_fk": {
"name": "chat_voice_sessions_company_id_companies_id_fk",
"tableFrom": "chat_voice_sessions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_voice_sessions_endpoint_fk": {
"name": "chat_voice_sessions_endpoint_fk",
"tableFrom": "chat_voice_sessions",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_voice_sessions_conversation_fk": {
"name": "chat_voice_sessions_conversation_fk",
"tableFrom": "chat_voice_sessions",
+ "tableTo": "chat_conversations",
"columnsFrom": [
"company_id",
"conversation_id"
],
- "tableTo": "chat_conversations",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_voice_sessions_issue_fk": {
"name": "chat_voice_sessions_issue_fk",
"tableFrom": "chat_voice_sessions",
+ "tableTo": "issues",
"columnsFrom": [
"company_id",
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_voice_sessions_agent_fk": {
"name": "chat_voice_sessions_agent_fk",
"tableFrom": "chat_voice_sessions",
+ "tableTo": "agents",
"columnsFrom": [
"company_id",
"assigned_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"chat_voice_sessions_company_id_uq": {
"name": "chat_voice_sessions_company_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -15055,9 +15077,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_voice_tool_calls_webhook_uq": {
"name": "chat_voice_tool_calls_webhook_uq",
@@ -15076,54 +15098,54 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_voice_tool_calls_company_id_companies_id_fk": {
"name": "chat_voice_tool_calls_company_id_companies_id_fk",
"tableFrom": "chat_voice_tool_calls",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_voice_tool_calls_session_fk": {
"name": "chat_voice_tool_calls_session_fk",
"tableFrom": "chat_voice_tool_calls",
+ "tableTo": "chat_voice_sessions",
"columnsFrom": [
"company_id",
"session_id"
],
- "tableTo": "chat_voice_sessions",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_voice_tool_calls_delivery_fk": {
"name": "chat_voice_tool_calls_delivery_fk",
"tableFrom": "chat_voice_tool_calls",
+ "tableTo": "chat_deliveries",
"columnsFrom": [
"company_id",
"delivery_id"
],
- "tableTo": "chat_deliveries",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -15248,9 +15270,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cli_auth_challenges_approved_by_idx": {
"name": "cli_auth_challenges_approved_by_idx",
@@ -15263,9 +15285,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cli_auth_challenges_requested_company_idx": {
"name": "cli_auth_challenges_requested_company_idx",
@@ -15278,50 +15300,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"cli_auth_challenges_requested_company_id_companies_id_fk": {
"name": "cli_auth_challenges_requested_company_id_companies_id_fk",
"tableFrom": "cli_auth_challenges",
+ "tableTo": "companies",
"columnsFrom": [
"requested_company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"cli_auth_challenges_approved_by_user_id_user_id_fk": {
"name": "cli_auth_challenges_approved_by_user_id_user_id_fk",
"tableFrom": "cli_auth_challenges",
+ "tableTo": "user",
"columnsFrom": [
"approved_by_user_id"
],
- "tableTo": "user",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"cli_auth_challenges_board_api_key_id_board_api_keys_id_fk": {
"name": "cli_auth_challenges_board_api_key_id_board_api_keys_id_fk",
"tableFrom": "cli_auth_challenges",
+ "tableTo": "board_api_keys",
"columnsFrom": [
"board_api_key_id"
],
- "tableTo": "board_api_keys",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -15478,9 +15500,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {},
@@ -15540,9 +15562,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_logos_asset_uq": {
"name": "company_logos_asset_uq",
@@ -15555,37 +15577,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_logos_company_id_companies_id_fk": {
"name": "company_logos_company_id_companies_id_fk",
"tableFrom": "company_logos",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_logos_asset_id_assets_id_fk": {
"name": "company_logos_asset_id_assets_id_fk",
"tableFrom": "company_logos",
+ "tableTo": "assets",
"columnsFrom": [
"asset_id"
],
- "tableTo": "assets",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -15675,9 +15697,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_memberships_principal_status_idx": {
"name": "company_memberships_principal_status_idx",
@@ -15702,9 +15724,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_memberships_company_status_idx": {
"name": "company_memberships_company_status_idx",
@@ -15723,24 +15745,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_memberships_company_id_companies_id_fk": {
"name": "company_memberships_company_id_companies_id_fk",
"tableFrom": "company_memberships",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -15823,28 +15845,28 @@
"company_observability_company_id_companies_id_fk": {
"name": "company_observability_company_id_companies_id_fk",
"tableFrom": "company_observability",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_observability_credentials_secret_id_company_secrets_id_fk": {
"name": "company_observability_credentials_secret_id_company_secrets_id_fk",
"tableFrom": "company_observability",
+ "tableTo": "company_secrets",
"columnsFrom": [
"credentials_secret_id"
],
- "tableTo": "company_secrets",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -15958,63 +15980,63 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_onboarding_seeds_company_id_companies_id_fk": {
"name": "company_onboarding_seeds_company_id_companies_id_fk",
"tableFrom": "company_onboarding_seeds",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_onboarding_seeds_goal_id_goals_id_fk": {
"name": "company_onboarding_seeds_goal_id_goals_id_fk",
"tableFrom": "company_onboarding_seeds",
+ "tableTo": "goals",
"columnsFrom": [
"goal_id"
],
- "tableTo": "goals",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"company_onboarding_seeds_agent_id_agents_id_fk": {
"name": "company_onboarding_seeds_agent_id_agents_id_fk",
"tableFrom": "company_onboarding_seeds",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"company_onboarding_seeds_issue_id_issues_id_fk": {
"name": "company_onboarding_seeds_issue_id_issues_id_fk",
"tableFrom": "company_onboarding_seeds",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -16124,9 +16146,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secret_bindings_secret_idx": {
"name": "company_secret_bindings_secret_idx",
@@ -16139,9 +16161,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secret_bindings_target_idx": {
"name": "company_secret_bindings_target_idx",
@@ -16166,9 +16188,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secret_bindings_target_path_uq": {
"name": "company_secret_bindings_target_path_uq",
@@ -16199,37 +16221,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_secret_bindings_company_id_companies_id_fk": {
"name": "company_secret_bindings_company_id_companies_id_fk",
"tableFrom": "company_secret_bindings",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"company_secret_bindings_secret_id_company_secrets_id_fk": {
"name": "company_secret_bindings_secret_id_company_secrets_id_fk",
"tableFrom": "company_secret_bindings",
+ "tableTo": "company_secrets",
"columnsFrom": [
"secret_id"
],
- "tableTo": "company_secrets",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -16464,9 +16486,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secret_proposals_proposer_status_idx": {
"name": "company_secret_proposals_proposer_status_idx",
@@ -16485,9 +16507,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secret_proposals_expiry_idx": {
"name": "company_secret_proposals_expiry_idx",
@@ -16506,9 +16528,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secret_proposals_secret_proposal_idx": {
"name": "company_secret_proposals_secret_proposal_idx",
@@ -16521,9 +16543,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secret_proposals_interaction_idx": {
"name": "company_secret_proposals_interaction_idx",
@@ -16536,128 +16558,128 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_secret_proposals_company_id_companies_id_fk": {
"name": "company_secret_proposals_company_id_companies_id_fk",
"tableFrom": "company_secret_proposals",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"company_secret_proposals_secret_id_company_secrets_id_fk": {
"name": "company_secret_proposals_secret_id_company_secrets_id_fk",
"tableFrom": "company_secret_proposals",
+ "tableTo": "company_secrets",
"columnsFrom": [
"secret_id"
],
- "tableTo": "company_secrets",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"company_secret_proposals_secret_proposal_id_company_secret_proposals_id_fk": {
"name": "company_secret_proposals_secret_proposal_id_company_secret_proposals_id_fk",
"tableFrom": "company_secret_proposals",
+ "tableTo": "company_secret_proposals",
"columnsFrom": [
"secret_proposal_id"
],
- "tableTo": "company_secret_proposals",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_secret_proposals_target_id_agents_id_fk": {
"name": "company_secret_proposals_target_id_agents_id_fk",
"tableFrom": "company_secret_proposals",
+ "tableTo": "agents",
"columnsFrom": [
"target_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_secret_proposals_proposed_by_agent_id_agents_id_fk": {
"name": "company_secret_proposals_proposed_by_agent_id_agents_id_fk",
"tableFrom": "company_secret_proposals",
+ "tableTo": "agents",
"columnsFrom": [
"proposed_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_secret_proposals_origin_issue_id_issues_id_fk": {
"name": "company_secret_proposals_origin_issue_id_issues_id_fk",
"tableFrom": "company_secret_proposals",
+ "tableTo": "issues",
"columnsFrom": [
"origin_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"company_secret_proposals_origin_run_id_heartbeat_runs_id_fk": {
"name": "company_secret_proposals_origin_run_id_heartbeat_runs_id_fk",
"tableFrom": "company_secret_proposals",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"origin_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_secret_proposals_interaction_id_issue_thread_interactions_id_fk": {
"name": "company_secret_proposals_interaction_id_issue_thread_interactions_id_fk",
"tableFrom": "company_secret_proposals",
+ "tableTo": "issue_thread_interactions",
"columnsFrom": [
"interaction_id"
],
- "tableTo": "issue_thread_interactions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"company_secret_proposals_created_secret_id_company_secrets_id_fk": {
"name": "company_secret_proposals_created_secret_id_company_secrets_id_fk",
"tableFrom": "company_secret_proposals",
+ "tableTo": "company_secrets",
"columnsFrom": [
"created_secret_id"
],
- "tableTo": "company_secrets",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -16802,9 +16824,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secret_provider_configs_company_provider_idx": {
"name": "company_secret_provider_configs_company_provider_idx",
@@ -16823,9 +16845,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secret_provider_configs_default_uq": {
"name": "company_secret_provider_configs_default_uq",
@@ -16844,38 +16866,38 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"company_secret_provider_configs\".\"is_default\" = true",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"company_secret_provider_configs_company_id_companies_id_fk": {
"name": "company_secret_provider_configs_company_id_companies_id_fk",
"tableFrom": "company_secret_provider_configs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_secret_provider_configs_created_by_agent_id_agents_id_fk": {
"name": "company_secret_provider_configs_created_by_agent_id_agents_id_fk",
"tableFrom": "company_secret_provider_configs",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -16988,9 +17010,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secret_versions_value_sha256_idx": {
"name": "company_secret_versions_value_sha256_idx",
@@ -17003,9 +17025,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secret_versions_fingerprint_idx": {
"name": "company_secret_versions_fingerprint_idx",
@@ -17018,9 +17040,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secret_versions_secret_version_uq": {
"name": "company_secret_versions_secret_version_uq",
@@ -17039,37 +17061,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_secret_versions_secret_id_company_secrets_id_fk": {
"name": "company_secret_versions_secret_id_company_secrets_id_fk",
"tableFrom": "company_secret_versions",
+ "tableTo": "company_secrets",
"columnsFrom": [
"secret_id"
],
- "tableTo": "company_secrets",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_secret_versions_created_by_agent_id_agents_id_fk": {
"name": "company_secret_versions_created_by_agent_id_agents_id_fk",
"tableFrom": "company_secret_versions",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -17114,6 +17136,12 @@
"primaryKey": false,
"notNull": false
},
+ "owner_project_id": {
+ "name": "owner_project_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
"owner_plugin_id": {
"name": "owner_plugin_id",
"type": "uuid",
@@ -17254,9 +17282,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secrets_company_scope_idx": {
"name": "company_secrets_company_scope_idx",
@@ -17275,9 +17303,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secrets_company_owner_idx": {
"name": "company_secrets_company_owner_idx",
@@ -17296,9 +17324,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secrets_user_definition_owner_idx": {
"name": "company_secrets_user_definition_owner_idx",
@@ -17323,9 +17351,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secrets_company_provider_idx": {
"name": "company_secrets_company_provider_idx",
@@ -17344,9 +17372,43 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
+ },
+ "company_secrets_project_instance_owner_key_uq": {
+ "name": "company_secrets_project_instance_owner_key_uq",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "owner_project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "owner_plugin_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "key",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"company_secrets\".\"scope\" = 'instance' and \"company_secrets\".\"deleted_at\" is null",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"company_secrets_instance_owner_key_uq": {
"name": "company_secrets_instance_owner_key_uq",
@@ -17377,10 +17439,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"company_secrets\".\"scope\" = 'instance' and \"company_secrets\".\"deleted_at\" is null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"company_secrets_provider_config_idx": {
"name": "company_secrets_provider_config_idx",
@@ -17393,9 +17455,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secrets_company_name_uq": {
"name": "company_secrets_company_name_uq",
@@ -17414,10 +17476,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"company_secrets\".\"scope\" = 'company' and \"company_secrets\".\"deleted_at\" is null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"company_secrets_company_key_uq": {
"name": "company_secrets_company_key_uq",
@@ -17436,10 +17498,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"company_secrets\".\"scope\" = 'company' and \"company_secrets\".\"deleted_at\" is null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"company_secrets_user_definition_owner_uq": {
"name": "company_secrets_user_definition_owner_uq",
@@ -17464,92 +17526,107 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"company_secrets\".\"scope\" = 'user' and \"company_secrets\".\"deleted_at\" is null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"company_secrets_company_id_companies_id_fk": {
"name": "company_secrets_company_id_companies_id_fk",
"tableFrom": "company_secrets",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"company_secrets_owner_plugin_id_plugins_id_fk": {
"name": "company_secrets_owner_plugin_id_plugins_id_fk",
"tableFrom": "company_secrets",
+ "tableTo": "plugins",
"columnsFrom": [
"owner_plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_secrets_user_secret_definition_id_user_secret_definitions_id_fk": {
"name": "company_secrets_user_secret_definition_id_user_secret_definitions_id_fk",
"tableFrom": "company_secrets",
+ "tableTo": "user_secret_definitions",
"columnsFrom": [
"user_secret_definition_id"
],
- "tableTo": "user_secret_definitions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"company_secrets_provider_config_id_company_secret_provider_configs_id_fk": {
"name": "company_secrets_provider_config_id_company_secret_provider_configs_id_fk",
"tableFrom": "company_secrets",
+ "tableTo": "company_secret_provider_configs",
"columnsFrom": [
"provider_config_id"
],
- "tableTo": "company_secret_provider_configs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"company_secrets_created_by_agent_id_agents_id_fk": {
"name": "company_secrets_created_by_agent_id_agents_id_fk",
"tableFrom": "company_secrets",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"company_secrets_company_id_owner_agent_id_agents_company_id_id_fk": {
"name": "company_secrets_company_id_owner_agent_id_agents_company_id_id_fk",
"tableFrom": "company_secrets",
+ "tableTo": "agents",
"columnsFrom": [
"company_id",
"owner_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "company_secrets_company_id_owner_project_id_projects_company_id_id_fk": {
+ "name": "company_secrets_company_id_owner_project_id_projects_company_id_id_fk",
+ "tableFrom": "company_secrets",
+ "tableTo": "projects",
+ "columnsFrom": [
+ "company_id",
+ "owner_project_id"
+ ],
+ "columnsTo": [
+ "company_id",
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -17558,7 +17635,7 @@
"checkConstraints": {
"company_secrets_scope_shape_check": {
"name": "company_secrets_scope_shape_check",
- "value": "(\n \"company_secrets\".\"scope\" = 'company'\n and \"company_secrets\".\"owner_user_id\" is null\n and \"company_secrets\".\"user_secret_definition_id\" is null\n and \"company_secrets\".\"owner_agent_id\" is null and \"company_secrets\".\"owner_plugin_id\" is null\n ) or (\n \"company_secrets\".\"scope\" = 'user'\n and \"company_secrets\".\"owner_user_id\" is not null\n and \"company_secrets\".\"user_secret_definition_id\" is not null\n and \"company_secrets\".\"owner_agent_id\" is null and \"company_secrets\".\"owner_plugin_id\" is null\n ) or (\n \"company_secrets\".\"scope\" = 'instance'\n and \"company_secrets\".\"owner_user_id\" is null and \"company_secrets\".\"user_secret_definition_id\" is null\n and \"company_secrets\".\"owner_agent_id\" is not null and \"company_secrets\".\"owner_plugin_id\" is not null\n )"
+ "value": "(\n \"company_secrets\".\"scope\" = 'company'\n and \"company_secrets\".\"owner_user_id\" is null\n and \"company_secrets\".\"user_secret_definition_id\" is null\n and \"company_secrets\".\"owner_agent_id\" is null and \"company_secrets\".\"owner_project_id\" is null and \"company_secrets\".\"owner_plugin_id\" is null\n ) or (\n \"company_secrets\".\"scope\" = 'user'\n and \"company_secrets\".\"owner_user_id\" is not null\n and \"company_secrets\".\"user_secret_definition_id\" is not null\n and \"company_secrets\".\"owner_agent_id\" is null and \"company_secrets\".\"owner_project_id\" is null and \"company_secrets\".\"owner_plugin_id\" is null\n ) or (\n \"company_secrets\".\"scope\" = 'instance'\n and \"company_secrets\".\"owner_user_id\" is null and \"company_secrets\".\"user_secret_definition_id\" is null\n and (\"company_secrets\".\"owner_agent_id\" is not null) <> (\"company_secrets\".\"owner_project_id\" is not null)\n and \"company_secrets\".\"owner_plugin_id\" is not null\n )"
}
},
"isRLSEnabled": false
@@ -17619,15 +17696,15 @@
"company_skill_policies_company_id_companies_id_fk": {
"name": "company_skill_policies_company_id_companies_id_fk",
"tableFrom": "company_skill_policies",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -17666,15 +17743,15 @@
"company_skill_import_budgets_company_id_companies_id_fk": {
"name": "company_skill_import_budgets_company_id_companies_id_fk",
"tableFrom": "company_skill_import_budgets",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -17775,9 +17852,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skill_source_entries_company_skill_idx": {
"name": "company_skill_source_entries_company_skill_idx",
@@ -17796,50 +17873,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_skill_source_entries_company_id_companies_id_fk": {
"name": "company_skill_source_entries_company_id_companies_id_fk",
"tableFrom": "company_skill_source_entries",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_skill_source_entries_source_id_company_skill_sources_id_fk": {
"name": "company_skill_source_entries_source_id_company_skill_sources_id_fk",
"tableFrom": "company_skill_source_entries",
+ "tableTo": "company_skill_sources",
"columnsFrom": [
"source_id"
],
- "tableTo": "company_skill_sources",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_skill_source_entries_skill_id_company_skills_id_fk": {
"name": "company_skill_source_entries_skill_id_company_skills_id_fk",
"tableFrom": "company_skill_source_entries",
+ "tableTo": "company_skills",
"columnsFrom": [
"skill_id"
],
- "tableTo": "company_skills",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -18083,10 +18160,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"company_skill_sources\".\"removed_at\" is null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"company_skill_sources_identity_ref_idx": {
"name": "company_skill_sources_identity_ref_idx",
@@ -18111,25 +18188,25 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"company_skill_sources\".\"removed_at\" is null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"company_skill_sources_company_id_companies_id_fk": {
"name": "company_skill_sources_company_id_companies_id_fk",
"tableFrom": "company_skill_sources",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -18294,9 +18371,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"project_skill_sources_source_project_idx": {
"name": "project_skill_sources_source_project_idx",
@@ -18321,9 +18398,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"project_skill_sources_sync_idx": {
"name": "project_skill_sources_sync_idx",
@@ -18348,63 +18425,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"project_skill_sources_company_id_companies_id_fk": {
"name": "project_skill_sources_company_id_companies_id_fk",
"tableFrom": "project_skill_sources",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"project_skill_sources_project_id_projects_id_fk": {
"name": "project_skill_sources_project_id_projects_id_fk",
"tableFrom": "project_skill_sources",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"project_skill_sources_workspace_id_project_workspaces_id_fk": {
"name": "project_skill_sources_workspace_id_project_workspaces_id_fk",
"tableFrom": "project_skill_sources",
+ "tableTo": "project_workspaces",
"columnsFrom": [
"workspace_id"
],
- "tableTo": "project_workspaces",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"project_skill_sources_source_id_company_skill_sources_id_fk": {
"name": "project_skill_sources_source_id_company_skill_sources_id_fk",
"tableFrom": "project_skill_sources",
+ "tableTo": "company_skill_sources",
"columnsFrom": [
"source_id"
],
- "tableTo": "company_skill_sources",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -18505,9 +18582,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skill_comments_parent_idx": {
"name": "company_skill_comments_parent_idx",
@@ -18520,63 +18597,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_skill_comments_company_id_companies_id_fk": {
"name": "company_skill_comments_company_id_companies_id_fk",
"tableFrom": "company_skill_comments",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_skill_comments_company_skill_id_company_skills_id_fk": {
"name": "company_skill_comments_company_skill_id_company_skills_id_fk",
"tableFrom": "company_skill_comments",
+ "tableTo": "company_skills",
"columnsFrom": [
"company_skill_id"
],
- "tableTo": "company_skills",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_skill_comments_parent_comment_id_company_skill_comments_id_fk": {
"name": "company_skill_comments_parent_comment_id_company_skill_comments_id_fk",
"tableFrom": "company_skill_comments",
+ "tableTo": "company_skill_comments",
"columnsFrom": [
"parent_comment_id"
],
- "tableTo": "company_skill_comments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"company_skill_comments_author_agent_id_agents_id_fk": {
"name": "company_skill_comments_author_agent_id_agents_id_fk",
"tableFrom": "company_skill_comments",
+ "tableTo": "agents",
"columnsFrom": [
"author_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -18640,24 +18717,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_skill_repository_snapshots_company_id_companies_id_fk": {
"name": "company_skill_repository_snapshots_company_id_companies_id_fk",
"tableFrom": "company_skill_repository_snapshots",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -18727,9 +18804,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skill_stars_skill_user_idx": {
"name": "company_skill_stars_skill_user_idx",
@@ -18748,9 +18825,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skill_stars_company_skill_created_idx": {
"name": "company_skill_stars_company_skill_created_idx",
@@ -18775,50 +18852,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_skill_stars_company_id_companies_id_fk": {
"name": "company_skill_stars_company_id_companies_id_fk",
"tableFrom": "company_skill_stars",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_skill_stars_company_skill_id_company_skills_id_fk": {
"name": "company_skill_stars_company_skill_id_company_skills_id_fk",
"tableFrom": "company_skill_stars",
+ "tableTo": "company_skills",
"columnsFrom": [
"company_skill_id"
],
- "tableTo": "company_skills",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_skill_stars_agent_id_agents_id_fk": {
"name": "company_skill_stars_agent_id_agents_id_fk",
"tableFrom": "company_skill_stars",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -18913,9 +18990,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skill_test_inputs_company_skill_active_idx": {
"name": "company_skill_test_inputs_company_skill_active_idx",
@@ -18940,37 +19017,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_skill_test_inputs_company_id_companies_id_fk": {
"name": "company_skill_test_inputs_company_id_companies_id_fk",
"tableFrom": "company_skill_test_inputs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_skill_test_inputs_skill_id_company_skills_id_fk": {
"name": "company_skill_test_inputs_skill_id_company_skills_id_fk",
"tableFrom": "company_skill_test_inputs",
+ "tableTo": "company_skills",
"columnsFrom": [
"skill_id"
],
- "tableTo": "company_skills",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -19083,50 +19160,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_skill_test_run_templates_company_id_companies_id_fk": {
"name": "company_skill_test_run_templates_company_id_companies_id_fk",
"tableFrom": "company_skill_test_run_templates",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_skill_test_run_templates_created_by_agent_id_agents_id_fk": {
"name": "company_skill_test_run_templates_created_by_agent_id_agents_id_fk",
"tableFrom": "company_skill_test_run_templates",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"company_skill_test_run_templates_updated_by_agent_id_agents_id_fk": {
"name": "company_skill_test_run_templates_updated_by_agent_id_agents_id_fk",
"tableFrom": "company_skill_test_run_templates",
+ "tableTo": "agents",
"columnsFrom": [
"updated_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -19316,9 +19393,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skill_test_runs_company_issue_idx": {
"name": "company_skill_test_runs_company_issue_idx",
@@ -19337,9 +19414,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skill_test_runs_company_input_created_idx": {
"name": "company_skill_test_runs_company_input_created_idx",
@@ -19364,9 +19441,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skill_test_runs_company_status_idx": {
"name": "company_skill_test_runs_company_status_idx",
@@ -19385,9 +19462,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skill_test_runs_company_harness_expires_idx": {
"name": "company_skill_test_runs_company_harness_expires_idx",
@@ -19406,89 +19483,89 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_skill_test_runs_company_id_companies_id_fk": {
"name": "company_skill_test_runs_company_id_companies_id_fk",
"tableFrom": "company_skill_test_runs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_skill_test_runs_skill_id_company_skills_id_fk": {
"name": "company_skill_test_runs_skill_id_company_skills_id_fk",
"tableFrom": "company_skill_test_runs",
+ "tableTo": "company_skills",
"columnsFrom": [
"skill_id"
],
- "tableTo": "company_skills",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_skill_test_runs_input_id_company_skill_test_inputs_id_fk": {
"name": "company_skill_test_runs_input_id_company_skill_test_inputs_id_fk",
"tableFrom": "company_skill_test_runs",
+ "tableTo": "company_skill_test_inputs",
"columnsFrom": [
"input_id"
],
- "tableTo": "company_skill_test_inputs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"company_skill_test_runs_skill_version_id_company_skill_versions_id_fk": {
"name": "company_skill_test_runs_skill_version_id_company_skill_versions_id_fk",
"tableFrom": "company_skill_test_runs",
+ "tableTo": "company_skill_versions",
"columnsFrom": [
"skill_version_id"
],
- "tableTo": "company_skill_versions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
},
"company_skill_test_runs_agent_id_agents_id_fk": {
"name": "company_skill_test_runs_agent_id_agents_id_fk",
"tableFrom": "company_skill_test_runs",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
},
"company_skill_test_runs_issue_id_issues_id_fk": {
"name": "company_skill_test_runs_issue_id_issues_id_fk",
"tableFrom": "company_skill_test_runs",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -19607,9 +19684,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skill_versions_skill_release_idx": {
"name": "company_skill_versions_skill_release_idx",
@@ -19628,10 +19705,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"company_skill_versions\".\"release_id\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"company_skill_versions_company_skill_created_idx": {
"name": "company_skill_versions_company_skill_created_idx",
@@ -19656,63 +19733,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_skill_versions_company_id_companies_id_fk": {
"name": "company_skill_versions_company_id_companies_id_fk",
"tableFrom": "company_skill_versions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_skill_versions_company_skill_id_company_skills_id_fk": {
"name": "company_skill_versions_company_skill_id_company_skills_id_fk",
"tableFrom": "company_skill_versions",
+ "tableTo": "company_skills",
"columnsFrom": [
"company_skill_id"
],
- "tableTo": "company_skills",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_skill_versions_repository_snapshot_id_company_skill_repository_snapshots_id_fk": {
"name": "company_skill_versions_repository_snapshot_id_company_skill_repository_snapshots_id_fk",
"tableFrom": "company_skill_versions",
+ "tableTo": "company_skill_repository_snapshots",
"columnsFrom": [
"repository_snapshot_id"
],
- "tableTo": "company_skill_repository_snapshots",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
},
"company_skill_versions_author_agent_id_agents_id_fk": {
"name": "company_skill_versions_author_agent_id_agents_id_fk",
"tableFrom": "company_skill_versions",
+ "tableTo": "agents",
"columnsFrom": [
"author_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -19948,9 +20025,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skills_company_name_idx": {
"name": "company_skills_company_name_idx",
@@ -19969,9 +20046,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skills_company_folder_idx": {
"name": "company_skills_company_folder_idx",
@@ -19990,9 +20067,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skills_company_categories_idx": {
"name": "company_skills_company_categories_idx",
@@ -20005,9 +20082,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "gin",
- "concurrently": false
+ "with": {}
},
"company_skills_company_sharing_scope_idx": {
"name": "company_skills_company_sharing_scope_idx",
@@ -20026,9 +20103,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skills_company_current_version_idx": {
"name": "company_skills_company_current_version_idx",
@@ -20047,9 +20124,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skills_company_forked_from_idx": {
"name": "company_skills_company_forked_from_idx",
@@ -20068,76 +20145,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_skills_company_id_companies_id_fk": {
"name": "company_skills_company_id_companies_id_fk",
"tableFrom": "company_skills",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"company_skills_folder_id_folders_id_fk": {
"name": "company_skills_folder_id_folders_id_fk",
"tableFrom": "company_skills",
+ "tableTo": "folders",
"columnsFrom": [
"folder_id"
],
- "tableTo": "folders",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"company_skills_forked_from_skill_id_company_skills_id_fk": {
"name": "company_skills_forked_from_skill_id_company_skills_id_fk",
"tableFrom": "company_skills",
+ "tableTo": "company_skills",
"columnsFrom": [
"forked_from_skill_id"
],
- "tableTo": "company_skills",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"company_skills_forked_from_company_id_companies_id_fk": {
"name": "company_skills_forked_from_company_id_companies_id_fk",
"tableFrom": "company_skills",
+ "tableTo": "companies",
"columnsFrom": [
"forked_from_company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"company_skills_current_version_id_company_skill_versions_id_fk": {
"name": "company_skills_current_version_id_company_skill_versions_id_fk",
"tableFrom": "company_skills",
+ "tableTo": "company_skill_versions",
"columnsFrom": [
"current_version_id"
],
- "tableTo": "company_skill_versions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -20272,9 +20349,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_transfer_runs_idempotency_direction_idx": {
"name": "company_transfer_runs_idempotency_direction_idx",
@@ -20293,9 +20370,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_transfer_runs_actor_status_idx": {
"name": "company_transfer_runs_actor_status_idx",
@@ -20314,24 +20391,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_transfer_runs_company_id_companies_id_fk": {
"name": "company_transfer_runs_company_id_companies_id_fk",
"tableFrom": "company_transfer_runs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -20397,9 +20474,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_user_sidebar_preferences_user_idx": {
"name": "company_user_sidebar_preferences_user_idx",
@@ -20412,9 +20489,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_user_sidebar_preferences_company_user_uq": {
"name": "company_user_sidebar_preferences_company_user_uq",
@@ -20433,24 +20510,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_user_sidebar_preferences_company_id_companies_id_fk": {
"name": "company_user_sidebar_preferences_company_id_companies_id_fk",
"tableFrom": "company_user_sidebar_preferences",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -20574,9 +20651,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"completion_contracts_issue_hash_uq": {
"name": "completion_contracts_issue_hash_uq",
@@ -20595,68 +20672,68 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"completion_contracts_company_id_companies_id_fk": {
"name": "completion_contracts_company_id_companies_id_fk",
"tableFrom": "completion_contracts",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"completion_contracts_issue_company_fk": {
"name": "completion_contracts_issue_company_fk",
"tableFrom": "completion_contracts",
+ "tableTo": "issues",
"columnsFrom": [
"company_id",
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"completion_contracts_supersedes_owner_fk": {
"name": "completion_contracts_supersedes_owner_fk",
"tableFrom": "completion_contracts",
+ "tableTo": "completion_contracts",
"columnsFrom": [
"company_id",
"issue_id",
"supersedes_contract_id"
],
- "tableTo": "completion_contracts",
"columnsTo": [
"company_id",
"issue_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"completion_contracts_company_issue_id_uq": {
"name": "completion_contracts_company_issue_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"issue_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -20794,9 +20871,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"connection_event_deliveries_company_status_idx": {
"name": "connection_event_deliveries_company_status_idx",
@@ -20821,24 +20898,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"connection_event_deliveries_company_id_companies_id_fk": {
"name": "connection_event_deliveries_company_id_companies_id_fk",
"tableFrom": "connection_event_deliveries",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -20902,37 +20979,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"connection_intent_deliveries_interaction_id_issue_thread_interactions_id_fk": {
"name": "connection_intent_deliveries_interaction_id_issue_thread_interactions_id_fk",
"tableFrom": "connection_intent_deliveries",
+ "tableTo": "issue_thread_interactions",
"columnsFrom": [
"interaction_id"
],
- "tableTo": "issue_thread_interactions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"connection_intent_deliveries_company_id_companies_id_fk": {
"name": "connection_intent_deliveries_company_id_companies_id_fk",
"tableFrom": "connection_intent_deliveries",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -21135,9 +21212,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cost_events_provider_request_idx": {
"name": "cost_events_provider_request_idx",
@@ -21162,9 +21239,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cost_events_company_project_occurred_idx": {
"name": "cost_events_company_project_occurred_idx",
@@ -21189,9 +21266,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cost_events_unpriced_idx": {
"name": "cost_events_unpriced_idx",
@@ -21216,10 +21293,10 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"cost_events\".\"cost_status\" = 'unpriced' and \"cost_events\".\"billing_type\" <> 'subscription_included'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"cost_events_data_quality_idx": {
"name": "cost_events_data_quality_idx",
@@ -21244,10 +21321,10 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"cost_events\".\"billing_type\" = 'unknown' or (\"cost_events\".\"cost_status\" = 'unpriced' and \"cost_events\".\"billing_type\" <> 'subscription_included')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"cost_events_company_occurred_idx": {
"name": "cost_events_company_occurred_idx",
@@ -21266,9 +21343,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cost_events_company_subscription_occurred_idx": {
"name": "cost_events_company_subscription_occurred_idx",
@@ -21293,9 +21370,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cost_events_company_agent_occurred_idx": {
"name": "cost_events_company_agent_occurred_idx",
@@ -21320,9 +21397,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cost_events_company_provider_occurred_idx": {
"name": "cost_events_company_provider_occurred_idx",
@@ -21347,9 +21424,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cost_events_company_biller_occurred_idx": {
"name": "cost_events_company_biller_occurred_idx",
@@ -21374,9 +21451,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cost_events_company_heartbeat_run_idx": {
"name": "cost_events_company_heartbeat_run_idx",
@@ -21395,102 +21472,102 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"cost_events_company_id_companies_id_fk": {
"name": "cost_events_company_id_companies_id_fk",
"tableFrom": "cost_events",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"cost_events_agent_id_agents_id_fk": {
"name": "cost_events_agent_id_agents_id_fk",
"tableFrom": "cost_events",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"cost_events_issue_id_issues_id_fk": {
"name": "cost_events_issue_id_issues_id_fk",
"tableFrom": "cost_events",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"cost_events_project_id_projects_id_fk": {
"name": "cost_events_project_id_projects_id_fk",
"tableFrom": "cost_events",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"cost_events_goal_id_goals_id_fk": {
"name": "cost_events_goal_id_goals_id_fk",
"tableFrom": "cost_events",
+ "tableTo": "goals",
"columnsFrom": [
"goal_id"
],
- "tableTo": "goals",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"cost_events_heartbeat_run_id_heartbeat_runs_id_fk": {
"name": "cost_events_heartbeat_run_id_heartbeat_runs_id_fk",
"tableFrom": "cost_events",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"heartbeat_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"cost_events_subscription_id_ai_subscriptions_id_fk": {
"name": "cost_events_subscription_id_ai_subscriptions_id_fk",
"tableFrom": "cost_events",
+ "tableTo": "ai_subscriptions",
"columnsFrom": [
"subscription_id"
],
- "tableTo": "ai_subscriptions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -21569,15 +21646,15 @@
"company_decision_models_company_id_companies_id_fk": {
"name": "company_decision_models_company_id_companies_id_fk",
"tableFrom": "company_decision_models",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -21773,9 +21850,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"decision_invocations_pending_idx": {
"name": "decision_invocations_pending_idx",
@@ -21788,10 +21865,10 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"decision_invocations\".\"status\" = 'running'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"decision_invocations_cost_idx": {
"name": "decision_invocations_cost_idx",
@@ -21804,37 +21881,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"decision_invocations_company_id_companies_id_fk": {
"name": "decision_invocations_company_id_companies_id_fk",
"tableFrom": "decision_invocations",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"decision_invocations_cost_event_id_cost_events_id_fk": {
"name": "decision_invocations_cost_event_id_cost_events_id_fk",
"tableFrom": "decision_invocations",
+ "tableTo": "cost_events",
"columnsFrom": [
"cost_event_id"
],
- "tableTo": "cost_events",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -21972,9 +22049,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"decision_archive_notification_outbox_pending_idx": {
"name": "decision_archive_notification_outbox_pending_idx",
@@ -21993,37 +22070,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"decision_archive_notification_outbox_company_id_companies_id_fk": {
"name": "decision_archive_notification_outbox_company_id_companies_id_fk",
"tableFrom": "decision_archive_notification_outbox",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"decision_archive_notification_outbox_origin_agent_id_agents_id_fk": {
"name": "decision_archive_notification_outbox_origin_agent_id_agents_id_fk",
"tableFrom": "decision_archive_notification_outbox",
+ "tableTo": "agents",
"columnsFrom": [
"origin_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -22140,9 +22217,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"decision_queue_items_company_source_idx": {
"name": "decision_queue_items_company_source_idx",
@@ -22167,78 +22244,78 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"decision_queue_items_company_id_companies_id_fk": {
"name": "decision_queue_items_company_id_companies_id_fk",
"tableFrom": "decision_queue_items",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"decision_queue_items_added_by_agent_id_agents_id_fk": {
"name": "decision_queue_items_added_by_agent_id_agents_id_fk",
"tableFrom": "decision_queue_items",
+ "tableTo": "agents",
"columnsFrom": [
"added_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_queue_items_added_by_run_id_heartbeat_runs_id_fk": {
"name": "decision_queue_items_added_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "decision_queue_items",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"added_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_queue_items_added_by_agent_api_key_id_agent_api_keys_id_fk": {
"name": "decision_queue_items_added_by_agent_api_key_id_agent_api_keys_id_fk",
"tableFrom": "decision_queue_items",
+ "tableTo": "agent_api_keys",
"columnsFrom": [
"added_by_agent_api_key_id"
],
- "tableTo": "agent_api_keys",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_queue_items_queue_company_fk": {
"name": "decision_queue_items_queue_company_fk",
"tableFrom": "decision_queue_items",
+ "tableTo": "decision_queues",
"columnsFrom": [
"queue_id",
"company_id"
],
- "tableTo": "decision_queues",
"columnsTo": [
"id",
"company_id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -22370,9 +22447,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"decision_queues_company_updated_idx": {
"name": "decision_queues_company_updated_idx",
@@ -22391,74 +22468,74 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"decision_queues_company_id_companies_id_fk": {
"name": "decision_queues_company_id_companies_id_fk",
"tableFrom": "decision_queues",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"decision_queues_created_by_agent_id_agents_id_fk": {
"name": "decision_queues_created_by_agent_id_agents_id_fk",
"tableFrom": "decision_queues",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_queues_created_by_run_id_heartbeat_runs_id_fk": {
"name": "decision_queues_created_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "decision_queues",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"created_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_queues_created_by_agent_api_key_id_agent_api_keys_id_fk": {
"name": "decision_queues_created_by_agent_api_key_id_agent_api_keys_id_fk",
"tableFrom": "decision_queues",
+ "tableTo": "agent_api_keys",
"columnsFrom": [
"created_by_agent_api_key_id"
],
- "tableTo": "agent_api_keys",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"decision_queues_id_company_uq": {
"name": "decision_queues_id_company_uq",
+ "nullsNotDistinct": false,
"columns": [
"id",
"company_id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -22605,9 +22682,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"decision_retention_company_archived_idx": {
"name": "decision_retention_company_archived_idx",
@@ -22626,50 +22703,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"decision_retention_company_id_companies_id_fk": {
"name": "decision_retention_company_id_companies_id_fk",
"tableFrom": "decision_retention",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"decision_retention_archived_by_agent_id_agents_id_fk": {
"name": "decision_retention_archived_by_agent_id_agents_id_fk",
"tableFrom": "decision_retention",
+ "tableTo": "agents",
"columnsFrom": [
"archived_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_retention_archived_by_run_id_heartbeat_runs_id_fk": {
"name": "decision_retention_archived_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "decision_retention",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"archived_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -22812,9 +22889,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"decision_triage_company_decide_by_idx": {
"name": "decision_triage_company_decide_by_idx",
@@ -22833,63 +22910,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"decision_triage_company_id_companies_id_fk": {
"name": "decision_triage_company_id_companies_id_fk",
"tableFrom": "decision_triage",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"decision_triage_set_by_agent_id_agents_id_fk": {
"name": "decision_triage_set_by_agent_id_agents_id_fk",
"tableFrom": "decision_triage",
+ "tableTo": "agents",
"columnsFrom": [
"set_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_triage_set_by_run_id_heartbeat_runs_id_fk": {
"name": "decision_triage_set_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "decision_triage",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"set_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_triage_set_by_agent_api_key_id_agent_api_keys_id_fk": {
"name": "decision_triage_set_by_agent_api_key_id_agent_api_keys_id_fk",
"tableFrom": "decision_triage",
+ "tableTo": "agent_api_keys",
"columnsFrom": [
"set_by_agent_api_key_id"
],
- "tableTo": "agent_api_keys",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -23029,9 +23106,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"decision_triage_events_queue_created_idx": {
"name": "decision_triage_events_queue_created_idx",
@@ -23050,76 +23127,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"decision_triage_events_company_id_companies_id_fk": {
"name": "decision_triage_events_company_id_companies_id_fk",
"tableFrom": "decision_triage_events",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"decision_triage_events_queue_id_decision_queues_id_fk": {
"name": "decision_triage_events_queue_id_decision_queues_id_fk",
"tableFrom": "decision_triage_events",
+ "tableTo": "decision_queues",
"columnsFrom": [
"queue_id"
],
- "tableTo": "decision_queues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_triage_events_actor_agent_id_agents_id_fk": {
"name": "decision_triage_events_actor_agent_id_agents_id_fk",
"tableFrom": "decision_triage_events",
+ "tableTo": "agents",
"columnsFrom": [
"actor_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_triage_events_actor_run_id_heartbeat_runs_id_fk": {
"name": "decision_triage_events_actor_run_id_heartbeat_runs_id_fk",
"tableFrom": "decision_triage_events",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"actor_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_triage_events_agent_api_key_id_agent_api_keys_id_fk": {
"name": "decision_triage_events_agent_api_key_id_agent_api_keys_id_fk",
"tableFrom": "decision_triage_events",
+ "tableTo": "agent_api_keys",
"columnsFrom": [
"agent_api_key_id"
],
- "tableTo": "agent_api_keys",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -23246,9 +23323,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"decision_training_examples_issue_idx": {
"name": "decision_training_examples_issue_idx",
@@ -23261,9 +23338,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"decision_training_examples_source_author_uq": {
"name": "decision_training_examples_source_author_uq",
@@ -23288,37 +23365,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"decision_training_examples_company_id_companies_id_fk": {
"name": "decision_training_examples_company_id_companies_id_fk",
"tableFrom": "decision_training_examples",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"decision_training_examples_issue_id_issues_id_fk": {
"name": "decision_training_examples_issue_id_issues_id_fk",
"tableFrom": "decision_training_examples",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -23400,63 +23477,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"decision_bundles_company_id_companies_id_fk": {
"name": "decision_bundles_company_id_companies_id_fk",
"tableFrom": "decision_bundles",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_bundles_origin_agent_id_agents_id_fk": {
"name": "decision_bundles_origin_agent_id_agents_id_fk",
"tableFrom": "decision_bundles",
+ "tableTo": "agents",
"columnsFrom": [
"origin_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_bundles_origin_issue_id_issues_id_fk": {
"name": "decision_bundles_origin_issue_id_issues_id_fk",
"tableFrom": "decision_bundles",
+ "tableTo": "issues",
"columnsFrom": [
"origin_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_bundles_origin_run_id_heartbeat_runs_id_fk": {
"name": "decision_bundles_origin_run_id_heartbeat_runs_id_fk",
"tableFrom": "decision_bundles",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"origin_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -23550,9 +23627,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"decision_effect_executions_target_issue_idx": {
"name": "decision_effect_executions_target_issue_idx",
@@ -23565,50 +23642,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"decision_effect_executions_decision_id_decisions_id_fk": {
"name": "decision_effect_executions_decision_id_decisions_id_fk",
"tableFrom": "decision_effect_executions",
+ "tableTo": "decisions",
"columnsFrom": [
"decision_id"
],
- "tableTo": "decisions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"decision_effect_executions_target_issue_id_issues_id_fk": {
"name": "decision_effect_executions_target_issue_id_issues_id_fk",
"tableFrom": "decision_effect_executions",
+ "tableTo": "issues",
"columnsFrom": [
"target_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_effect_executions_activity_log_id_activity_log_id_fk": {
"name": "decision_effect_executions_activity_log_id_activity_log_id_fk",
"tableFrom": "decision_effect_executions",
+ "tableTo": "activity_log",
"columnsFrom": [
"activity_log_id"
],
- "tableTo": "activity_log",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -23652,9 +23729,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"decision_target_issues_issue_idx": {
"name": "decision_target_issues_issue_idx",
@@ -23667,50 +23744,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"decision_target_issues_decision_id_decisions_id_fk": {
"name": "decision_target_issues_decision_id_decisions_id_fk",
"tableFrom": "decision_target_issues",
+ "tableTo": "decisions",
"columnsFrom": [
"decision_id"
],
- "tableTo": "decisions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"decision_target_issues_issue_id_issues_id_fk": {
"name": "decision_target_issues_issue_id_issues_id_fk",
"tableFrom": "decision_target_issues",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"decision_target_issues_company_id_companies_id_fk": {
"name": "decision_target_issues_company_id_companies_id_fk",
"tableFrom": "decision_target_issues",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {
@@ -23912,9 +23989,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"decisions_bundle_idx": {
"name": "decisions_bundle_idx",
@@ -23927,9 +24004,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"decisions_origin_issue_idx": {
"name": "decisions_origin_issue_idx",
@@ -23942,9 +24019,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"decisions_company_idempotency_uq": {
"name": "decisions_company_idempotency_uq",
@@ -23963,77 +24040,77 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"decisions\".\"idempotency_key\" IS NOT NULL",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"decisions_company_id_companies_id_fk": {
"name": "decisions_company_id_companies_id_fk",
"tableFrom": "decisions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decisions_bundle_id_decision_bundles_id_fk": {
"name": "decisions_bundle_id_decision_bundles_id_fk",
"tableFrom": "decisions",
+ "tableTo": "decision_bundles",
"columnsFrom": [
"bundle_id"
],
- "tableTo": "decision_bundles",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"decisions_origin_agent_id_agents_id_fk": {
"name": "decisions_origin_agent_id_agents_id_fk",
"tableFrom": "decisions",
+ "tableTo": "agents",
"columnsFrom": [
"origin_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decisions_origin_issue_id_issues_id_fk": {
"name": "decisions_origin_issue_id_issues_id_fk",
"tableFrom": "decisions",
+ "tableTo": "issues",
"columnsFrom": [
"origin_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decisions_origin_run_id_heartbeat_runs_id_fk": {
"name": "decisions_origin_run_id_heartbeat_runs_id_fk",
"tableFrom": "decisions",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"origin_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -24157,9 +24234,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"document_annotation_anchor_snapshots_company_document_revision_idx": {
"name": "document_annotation_anchor_snapshots_company_document_revision_idx",
@@ -24184,76 +24261,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"document_annotation_anchor_snapshots_company_id_companies_id_fk": {
"name": "document_annotation_anchor_snapshots_company_id_companies_id_fk",
"tableFrom": "document_annotation_anchor_snapshots",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"document_annotation_anchor_snapshots_thread_id_document_annotation_threads_id_fk": {
"name": "document_annotation_anchor_snapshots_thread_id_document_annotation_threads_id_fk",
"tableFrom": "document_annotation_anchor_snapshots",
+ "tableTo": "document_annotation_threads",
"columnsFrom": [
"thread_id"
],
- "tableTo": "document_annotation_threads",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"document_annotation_anchor_snapshots_document_id_documents_id_fk": {
"name": "document_annotation_anchor_snapshots_document_id_documents_id_fk",
"tableFrom": "document_annotation_anchor_snapshots",
+ "tableTo": "documents",
"columnsFrom": [
"document_id"
],
- "tableTo": "documents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"document_annotation_anchor_snapshots_from_revision_id_document_revisions_id_fk": {
"name": "document_annotation_anchor_snapshots_from_revision_id_document_revisions_id_fk",
"tableFrom": "document_annotation_anchor_snapshots",
+ "tableTo": "document_revisions",
"columnsFrom": [
"from_revision_id"
],
- "tableTo": "document_revisions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"document_annotation_anchor_snapshots_to_revision_id_document_revisions_id_fk": {
"name": "document_annotation_anchor_snapshots_to_revision_id_document_revisions_id_fk",
"tableFrom": "document_annotation_anchor_snapshots",
+ "tableTo": "document_revisions",
"columnsFrom": [
"to_revision_id"
],
- "tableTo": "document_revisions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -24390,9 +24467,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"document_annotation_comments_company_issue_created_at_idx": {
"name": "document_annotation_comments_company_issue_created_at_idx",
@@ -24417,9 +24494,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"document_annotation_comments_company_routine_created_at_idx": {
"name": "document_annotation_comments_company_routine_created_at_idx",
@@ -24444,9 +24521,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"document_annotation_comments_company_case_created_at_idx": {
"name": "document_annotation_comments_company_case_created_at_idx",
@@ -24471,9 +24548,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"document_annotation_comments_company_document_created_at_idx": {
"name": "document_annotation_comments_company_document_created_at_idx",
@@ -24498,9 +24575,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"document_annotation_comments_issue_comment_idx": {
"name": "document_annotation_comments_issue_comment_idx",
@@ -24513,9 +24590,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"document_annotation_comments_body_search_idx": {
"name": "document_annotation_comments_body_search_idx",
@@ -24529,128 +24606,128 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "gin",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"document_annotation_comments_company_id_companies_id_fk": {
"name": "document_annotation_comments_company_id_companies_id_fk",
"tableFrom": "document_annotation_comments",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"document_annotation_comments_thread_id_document_annotation_threads_id_fk": {
"name": "document_annotation_comments_thread_id_document_annotation_threads_id_fk",
"tableFrom": "document_annotation_comments",
+ "tableTo": "document_annotation_threads",
"columnsFrom": [
"thread_id"
],
- "tableTo": "document_annotation_threads",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"document_annotation_comments_issue_id_issues_id_fk": {
"name": "document_annotation_comments_issue_id_issues_id_fk",
"tableFrom": "document_annotation_comments",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"document_annotation_comments_routine_id_routines_id_fk": {
"name": "document_annotation_comments_routine_id_routines_id_fk",
"tableFrom": "document_annotation_comments",
+ "tableTo": "routines",
"columnsFrom": [
"routine_id"
],
- "tableTo": "routines",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"document_annotation_comments_case_id_cases_id_fk": {
"name": "document_annotation_comments_case_id_cases_id_fk",
"tableFrom": "document_annotation_comments",
+ "tableTo": "cases",
"columnsFrom": [
"case_id"
],
- "tableTo": "cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"document_annotation_comments_document_id_documents_id_fk": {
"name": "document_annotation_comments_document_id_documents_id_fk",
"tableFrom": "document_annotation_comments",
+ "tableTo": "documents",
"columnsFrom": [
"document_id"
],
- "tableTo": "documents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"document_annotation_comments_author_agent_id_agents_id_fk": {
"name": "document_annotation_comments_author_agent_id_agents_id_fk",
"tableFrom": "document_annotation_comments",
+ "tableTo": "agents",
"columnsFrom": [
"author_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"document_annotation_comments_created_by_run_id_heartbeat_runs_id_fk": {
"name": "document_annotation_comments_created_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "document_annotation_comments",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"created_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"document_annotation_comments_issue_comment_id_issue_comments_id_fk": {
"name": "document_annotation_comments_issue_comment_id_issue_comments_id_fk",
"tableFrom": "document_annotation_comments",
+ "tableTo": "issue_comments",
"columnsFrom": [
"issue_comment_id"
],
- "tableTo": "issue_comments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -24875,9 +24952,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"document_annotation_threads_company_issue_status_idx": {
"name": "document_annotation_threads_company_issue_status_idx",
@@ -24902,9 +24979,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"document_annotation_threads_company_routine_status_idx": {
"name": "document_annotation_threads_company_routine_status_idx",
@@ -24929,9 +25006,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"document_annotation_threads_company_case_status_idx": {
"name": "document_annotation_threads_company_case_status_idx",
@@ -24956,9 +25033,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"document_annotation_threads_company_current_revision_open_idx": {
"name": "document_annotation_threads_company_current_revision_open_idx",
@@ -24989,9 +25066,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"document_annotation_threads_company_anchor_state_idx": {
"name": "document_annotation_threads_company_anchor_state_idx",
@@ -25010,128 +25087,128 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"document_annotation_threads_company_id_companies_id_fk": {
"name": "document_annotation_threads_company_id_companies_id_fk",
"tableFrom": "document_annotation_threads",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"document_annotation_threads_issue_id_issues_id_fk": {
"name": "document_annotation_threads_issue_id_issues_id_fk",
"tableFrom": "document_annotation_threads",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"document_annotation_threads_routine_id_routines_id_fk": {
"name": "document_annotation_threads_routine_id_routines_id_fk",
"tableFrom": "document_annotation_threads",
+ "tableTo": "routines",
"columnsFrom": [
"routine_id"
],
- "tableTo": "routines",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"document_annotation_threads_case_id_cases_id_fk": {
"name": "document_annotation_threads_case_id_cases_id_fk",
"tableFrom": "document_annotation_threads",
+ "tableTo": "cases",
"columnsFrom": [
"case_id"
],
- "tableTo": "cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"document_annotation_threads_document_id_documents_id_fk": {
"name": "document_annotation_threads_document_id_documents_id_fk",
"tableFrom": "document_annotation_threads",
+ "tableTo": "documents",
"columnsFrom": [
"document_id"
],
- "tableTo": "documents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"document_annotation_threads_original_revision_id_document_revisions_id_fk": {
"name": "document_annotation_threads_original_revision_id_document_revisions_id_fk",
"tableFrom": "document_annotation_threads",
+ "tableTo": "document_revisions",
"columnsFrom": [
"original_revision_id"
],
- "tableTo": "document_revisions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"document_annotation_threads_current_revision_id_document_revisions_id_fk": {
"name": "document_annotation_threads_current_revision_id_document_revisions_id_fk",
"tableFrom": "document_annotation_threads",
+ "tableTo": "document_revisions",
"columnsFrom": [
"current_revision_id"
],
- "tableTo": "document_revisions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"document_annotation_threads_created_by_agent_id_agents_id_fk": {
"name": "document_annotation_threads_created_by_agent_id_agents_id_fk",
"tableFrom": "document_annotation_threads",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"document_annotation_threads_resolved_by_agent_id_agents_id_fk": {
"name": "document_annotation_threads_resolved_by_agent_id_agents_id_fk",
"tableFrom": "document_annotation_threads",
+ "tableTo": "agents",
"columnsFrom": [
"resolved_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -25219,9 +25296,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"document_memberships_company_user_document_uq": {
"name": "document_memberships_company_user_document_uq",
@@ -25246,37 +25323,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"document_memberships_company_id_companies_id_fk": {
"name": "document_memberships_company_id_companies_id_fk",
"tableFrom": "document_memberships",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"document_memberships_document_id_documents_id_fk": {
"name": "document_memberships_document_id_documents_id_fk",
"tableFrom": "document_memberships",
+ "tableTo": "documents",
"columnsFrom": [
"document_id"
],
- "tableTo": "documents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -25383,9 +25460,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"document_revisions_company_document_created_idx": {
"name": "document_revisions_company_document_created_idx",
@@ -25410,63 +25487,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"document_revisions_company_id_companies_id_fk": {
"name": "document_revisions_company_id_companies_id_fk",
"tableFrom": "document_revisions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"document_revisions_document_id_documents_id_fk": {
"name": "document_revisions_document_id_documents_id_fk",
"tableFrom": "document_revisions",
+ "tableTo": "documents",
"columnsFrom": [
"document_id"
],
- "tableTo": "documents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"document_revisions_created_by_agent_id_agents_id_fk": {
"name": "document_revisions_created_by_agent_id_agents_id_fk",
"tableFrom": "document_revisions",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"document_revisions_created_by_run_id_heartbeat_runs_id_fk": {
"name": "document_revisions_created_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "document_revisions",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"created_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -25605,9 +25682,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"documents_company_created_idx": {
"name": "documents_company_created_idx",
@@ -25626,9 +25703,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"documents_title_search_idx": {
"name": "documents_title_search_idx",
@@ -25642,9 +25719,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "gin",
- "concurrently": false
+ "with": {}
},
"documents_latest_body_search_idx": {
"name": "documents_latest_body_search_idx",
@@ -25658,63 +25735,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "gin",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"documents_company_id_companies_id_fk": {
"name": "documents_company_id_companies_id_fk",
"tableFrom": "documents",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"documents_created_by_agent_id_agents_id_fk": {
"name": "documents_created_by_agent_id_agents_id_fk",
"tableFrom": "documents",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"documents_updated_by_agent_id_agents_id_fk": {
"name": "documents_updated_by_agent_id_agents_id_fk",
"tableFrom": "documents",
+ "tableTo": "agents",
"columnsFrom": [
"updated_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"documents_locked_by_agent_id_agents_id_fk": {
"name": "documents_locked_by_agent_id_agents_id_fk",
"tableFrom": "documents",
+ "tableTo": "agents",
"columnsFrom": [
"locked_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -25854,10 +25931,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"dot_agent_bindings\".\"revoked_at\" IS NULL",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"dot_bindings_active_grant_uq": {
"name": "dot_bindings_active_grant_uq",
@@ -25870,10 +25947,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"dot_agent_bindings\".\"revoked_at\" IS NULL AND \"dot_agent_bindings\".\"grant_id\" IS NOT NULL",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"dot_bindings_pairing_code_uq": {
"name": "dot_bindings_pairing_code_uq",
@@ -25886,50 +25963,50 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"dot_agent_bindings_company_id_companies_id_fk": {
"name": "dot_agent_bindings_company_id_companies_id_fk",
"tableFrom": "dot_agent_bindings",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"dot_agent_bindings_agent_id_agents_id_fk": {
"name": "dot_agent_bindings_agent_id_agents_id_fk",
"tableFrom": "dot_agent_bindings",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"dot_agent_bindings_grant_id_mcp_oauth_grants_id_fk": {
"name": "dot_agent_bindings_grant_id_mcp_oauth_grants_id_fk",
"tableFrom": "dot_agent_bindings",
+ "tableTo": "mcp_oauth_grants",
"columnsFrom": [
"grant_id"
],
- "tableTo": "mcp_oauth_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -26022,9 +26099,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"dot_mailbox_binding_cursor_idx": {
"name": "dot_mailbox_binding_cursor_idx",
@@ -26049,50 +26126,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"dot_mailbox_items_company_id_companies_id_fk": {
"name": "dot_mailbox_items_company_id_companies_id_fk",
"tableFrom": "dot_mailbox_items",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"dot_mailbox_items_binding_id_dot_agent_bindings_id_fk": {
"name": "dot_mailbox_items_binding_id_dot_agent_bindings_id_fk",
"tableFrom": "dot_mailbox_items",
+ "tableTo": "dot_agent_bindings",
"columnsFrom": [
"binding_id"
],
- "tableTo": "dot_agent_bindings",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"dot_mailbox_items_assignment_id_dot_runner_assignments_id_fk": {
"name": "dot_mailbox_items_assignment_id_dot_runner_assignments_id_fk",
"tableFrom": "dot_mailbox_items",
+ "tableTo": "dot_runner_assignments",
"columnsFrom": [
"assignment_id"
],
- "tableTo": "dot_runner_assignments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -26242,9 +26319,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"dot_assignments_active_binding_uq": {
"name": "dot_assignments_active_binding_uq",
@@ -26257,10 +26334,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"dot_runner_assignments\".\"status\" IN ('offered', 'accepted')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"dot_assignments_company_idx": {
"name": "dot_assignments_company_idx",
@@ -26273,63 +26350,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"dot_runner_assignments_company_id_companies_id_fk": {
"name": "dot_runner_assignments_company_id_companies_id_fk",
"tableFrom": "dot_runner_assignments",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"dot_runner_assignments_binding_id_dot_agent_bindings_id_fk": {
"name": "dot_runner_assignments_binding_id_dot_agent_bindings_id_fk",
"tableFrom": "dot_runner_assignments",
+ "tableTo": "dot_agent_bindings",
"columnsFrom": [
"binding_id"
],
- "tableTo": "dot_agent_bindings",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"dot_runner_assignments_run_id_heartbeat_runs_id_fk": {
"name": "dot_runner_assignments_run_id_heartbeat_runs_id_fk",
"tableFrom": "dot_runner_assignments",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"dot_runner_assignments_agent_id_agents_id_fk": {
"name": "dot_runner_assignments_agent_id_agents_id_fk",
"tableFrom": "dot_runner_assignments",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -26443,37 +26520,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"dot_runner_operations_company_id_companies_id_fk": {
"name": "dot_runner_operations_company_id_companies_id_fk",
"tableFrom": "dot_runner_operations",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"dot_runner_operations_assignment_id_dot_runner_assignments_id_fk": {
"name": "dot_runner_operations_assignment_id_dot_runner_assignments_id_fk",
"tableFrom": "dot_runner_operations",
+ "tableTo": "dot_runner_assignments",
"columnsFrom": [
"assignment_id"
],
- "tableTo": "dot_runner_assignments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -26540,17 +26617,17 @@
"email_endpoints_company_id_endpoint_id_chat_endpoints_company_id_id_fk": {
"name": "email_endpoints_company_id_endpoint_id_chat_endpoints_company_id_id_fk",
"tableFrom": "email_endpoints",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -26663,9 +26740,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"email_messages_conversation_idx": {
"name": "email_messages_conversation_idx",
@@ -26690,41 +26767,41 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"email_messages_company_id_endpoint_id_chat_endpoints_company_id_id_fk": {
"name": "email_messages_company_id_endpoint_id_chat_endpoints_company_id_id_fk",
"tableFrom": "email_messages",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"email_messages_company_id_conversation_id_chat_conversations_company_id_id_fk": {
"name": "email_messages_company_id_conversation_id_chat_conversations_company_id_id_fk",
"tableFrom": "email_messages",
+ "tableTo": "chat_conversations",
"columnsFrom": [
"company_id",
"conversation_id"
],
- "tableTo": "chat_conversations",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -26810,42 +26887,42 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"email_sends\".\"outcome\" in ('queued', 'uncertain')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"email_sends_company_id_endpoint_id_chat_endpoints_company_id_id_fk": {
"name": "email_sends_company_id_endpoint_id_chat_endpoints_company_id_id_fk",
"tableFrom": "email_sends",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"email_sends_company_id_publication_id_chat_publications_company_id_id_fk": {
"name": "email_sends_company_id_publication_id_chat_publications_company_id_id_fk",
"tableFrom": "email_sends",
+ "tableTo": "chat_publications",
"columnsFrom": [
"company_id",
"publication_id"
],
- "tableTo": "chat_publications",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -27000,9 +27077,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"environment_custom_image_setup_sessions_environment_active_uq": {
"name": "environment_custom_image_setup_sessions_environment_active_uq",
@@ -27015,10 +27092,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"environment_custom_image_setup_sessions\".\"status\" IN ('starting', 'waiting_for_user', 'capturing')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"environment_custom_image_setup_sessions_template_idx": {
"name": "environment_custom_image_setup_sessions_template_idx",
@@ -27031,9 +27108,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"environment_custom_image_setup_sessions_promoted_template_idx": {
"name": "environment_custom_image_setup_sessions_promoted_template_idx",
@@ -27046,9 +27123,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"environment_custom_image_setup_sessions_expires_idx": {
"name": "environment_custom_image_setup_sessions_expires_idx",
@@ -27061,9 +27138,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"environment_custom_image_setup_sessions_provider_lease_idx": {
"name": "environment_custom_image_setup_sessions_provider_lease_idx",
@@ -27082,76 +27159,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"environment_custom_image_setup_sessions_environment_id_environments_id_fk": {
"name": "environment_custom_image_setup_sessions_environment_id_environments_id_fk",
"tableFrom": "environment_custom_image_setup_sessions",
+ "tableTo": "environments",
"columnsFrom": [
"environment_id"
],
- "tableTo": "environments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"environment_custom_image_setup_sessions_template_id_environment_custom_image_templates_id_fk": {
"name": "environment_custom_image_setup_sessions_template_id_environment_custom_image_templates_id_fk",
"tableFrom": "environment_custom_image_setup_sessions",
+ "tableTo": "environment_custom_image_templates",
"columnsFrom": [
"template_id"
],
- "tableTo": "environment_custom_image_templates",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"environment_custom_image_setup_sessions_promoted_template_id_environment_custom_image_templates_id_fk": {
"name": "environment_custom_image_setup_sessions_promoted_template_id_environment_custom_image_templates_id_fk",
"tableFrom": "environment_custom_image_setup_sessions",
+ "tableTo": "environment_custom_image_templates",
"columnsFrom": [
"promoted_template_id"
],
- "tableTo": "environment_custom_image_templates",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"environment_custom_image_setup_sessions_environment_lease_id_environment_leases_id_fk": {
"name": "environment_custom_image_setup_sessions_environment_lease_id_environment_leases_id_fk",
"tableFrom": "environment_custom_image_setup_sessions",
+ "tableTo": "environment_leases",
"columnsFrom": [
"environment_lease_id"
],
- "tableTo": "environment_leases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"environment_custom_image_setup_sessions_started_by_agent_id_agents_id_fk": {
"name": "environment_custom_image_setup_sessions_started_by_agent_id_agents_id_fk",
"tableFrom": "environment_custom_image_setup_sessions",
+ "tableTo": "agents",
"columnsFrom": [
"started_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -27284,9 +27361,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"environment_custom_image_templates_environment_provider_status_idx": {
"name": "environment_custom_image_templates_environment_provider_status_idx",
@@ -27311,9 +27388,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"environment_custom_image_templates_environment_active_uq": {
"name": "environment_custom_image_templates_environment_active_uq",
@@ -27326,10 +27403,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"environment_custom_image_templates\".\"status\" = 'active'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"environment_custom_image_templates_superseded_by_idx": {
"name": "environment_custom_image_templates_superseded_by_idx",
@@ -27342,9 +27419,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"environment_custom_image_templates_last_used_idx": {
"name": "environment_custom_image_templates_last_used_idx",
@@ -27357,50 +27434,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"environment_custom_image_templates_environment_id_environments_id_fk": {
"name": "environment_custom_image_templates_environment_id_environments_id_fk",
"tableFrom": "environment_custom_image_templates",
+ "tableTo": "environments",
"columnsFrom": [
"environment_id"
],
- "tableTo": "environments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"environment_custom_image_templates_created_by_agent_id_agents_id_fk": {
"name": "environment_custom_image_templates_created_by_agent_id_agents_id_fk",
"tableFrom": "environment_custom_image_templates",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"environment_custom_image_templates_superseded_by_template_id_environment_custom_image_templates_id_fk": {
"name": "environment_custom_image_templates_superseded_by_template_id_environment_custom_image_templates_id_fk",
"tableFrom": "environment_custom_image_templates",
+ "tableTo": "environment_custom_image_templates",
"columnsFrom": [
"superseded_by_template_id"
],
- "tableTo": "environment_custom_image_templates",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -27536,6 +27613,22 @@
}
},
"indexes": {
+ "environment_leases_retained_recovery_adoption_idx": {
+ "name": "environment_leases_retained_recovery_adoption_idx",
+ "columns": [
+ {
+ "expression": "heartbeat_run_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "where": "\"environment_leases\".\"lease_policy\" = 'retain_on_failure'\n and \"environment_leases\".\"heartbeat_run_id\" is not null\n and not (coalesce(\"environment_leases\".\"metadata\", '{}'::jsonb) ? 'systemRecoveryAdoption')",
+ "concurrently": true,
+ "method": "btree",
+ "with": {}
+ },
"environment_leases_company_environment_status_idx": {
"name": "environment_leases_company_environment_status_idx",
"columns": [
@@ -27559,9 +27652,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"environment_leases_company_execution_workspace_idx": {
"name": "environment_leases_company_execution_workspace_idx",
@@ -27580,9 +27673,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"environment_leases_company_issue_idx": {
"name": "environment_leases_company_issue_idx",
@@ -27601,9 +27694,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"environment_leases_heartbeat_run_idx": {
"name": "environment_leases_heartbeat_run_idx",
@@ -27616,9 +27709,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"environment_leases_company_last_used_idx": {
"name": "environment_leases_company_last_used_idx",
@@ -27637,9 +27730,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"environment_leases_provider_lease_idx": {
"name": "environment_leases_provider_lease_idx",
@@ -27652,76 +27745,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"environment_leases_company_id_companies_id_fk": {
"name": "environment_leases_company_id_companies_id_fk",
"tableFrom": "environment_leases",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"environment_leases_environment_id_environments_id_fk": {
"name": "environment_leases_environment_id_environments_id_fk",
"tableFrom": "environment_leases",
+ "tableTo": "environments",
"columnsFrom": [
"environment_id"
],
- "tableTo": "environments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"environment_leases_execution_workspace_id_execution_workspaces_id_fk": {
"name": "environment_leases_execution_workspace_id_execution_workspaces_id_fk",
"tableFrom": "environment_leases",
+ "tableTo": "execution_workspaces",
"columnsFrom": [
"execution_workspace_id"
],
- "tableTo": "execution_workspaces",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"environment_leases_issue_id_issues_id_fk": {
"name": "environment_leases_issue_id_issues_id_fk",
"tableFrom": "environment_leases",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"environment_leases_heartbeat_run_id_heartbeat_runs_id_fk": {
"name": "environment_leases_heartbeat_run_id_heartbeat_runs_id_fk",
"tableFrom": "environment_leases",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"heartbeat_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -27814,9 +27907,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"environments_local_driver_idx": {
"name": "environments_local_driver_idx",
@@ -27829,10 +27922,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"environments\".\"driver\" = 'local'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"environments_managed_sandbox_idx": {
"name": "environments_managed_sandbox_idx",
@@ -27845,10 +27938,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"environments\".\"driver\" = 'sandbox' AND (\"environments\".\"metadata\" ->> 'managedByPaperclip')::boolean = true",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"environments_name_idx": {
"name": "environments_name_idx",
@@ -27861,9 +27954,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {},
@@ -28004,9 +28097,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"execution_workspace_repositories_path_idx": {
"name": "execution_workspace_repositories_path_idx",
@@ -28025,9 +28118,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"execution_workspace_repositories_request_idx": {
"name": "execution_workspace_repositories_request_idx",
@@ -28046,9 +28139,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"execution_workspace_repositories_company_workspace_idx": {
"name": "execution_workspace_repositories_company_workspace_idx",
@@ -28067,50 +28160,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"execution_workspace_repositories_company_id_companies_id_fk": {
"name": "execution_workspace_repositories_company_id_companies_id_fk",
"tableFrom": "execution_workspace_repositories",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"execution_workspace_repositories_execution_workspace_id_execution_workspaces_id_fk": {
"name": "execution_workspace_repositories_execution_workspace_id_execution_workspaces_id_fk",
"tableFrom": "execution_workspace_repositories",
+ "tableTo": "execution_workspaces",
"columnsFrom": [
"execution_workspace_id"
],
- "tableTo": "execution_workspaces",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"execution_workspace_repositories_requested_by_issue_id_issues_id_fk": {
"name": "execution_workspace_repositories_requested_by_issue_id_issues_id_fk",
"tableFrom": "execution_workspace_repositories",
+ "tableTo": "issues",
"columnsFrom": [
"requested_by_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -28223,24 +28316,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"execution_workspace_repository_access_company_id_companies_id_fk": {
"name": "execution_workspace_repository_access_company_id_companies_id_fk",
"tableFrom": "execution_workspace_repository_access",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -28317,24 +28410,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"execution_workspace_repository_roots_company_id_companies_id_fk": {
"name": "execution_workspace_repository_roots_company_id_companies_id_fk",
"tableFrom": "execution_workspace_repository_roots",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -28455,9 +28548,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"execution_workspace_runtime_leases_company_owner_idx": {
"name": "execution_workspace_runtime_leases_company_owner_idx",
@@ -28476,9 +28569,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"execution_workspace_runtime_leases_expires_at_idx": {
"name": "execution_workspace_runtime_leases_expires_at_idx",
@@ -28491,86 +28584,86 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"execution_workspace_runtime_leases_company_id_companies_id_fk": {
"name": "execution_workspace_runtime_leases_company_id_companies_id_fk",
"tableFrom": "execution_workspace_runtime_leases",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"execution_workspace_runtime_leases_execution_workspace_id_execution_workspaces_id_fk": {
"name": "execution_workspace_runtime_leases_execution_workspace_id_execution_workspaces_id_fk",
"tableFrom": "execution_workspace_runtime_leases",
+ "tableTo": "execution_workspaces",
"columnsFrom": [
"execution_workspace_id"
],
- "tableTo": "execution_workspaces",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"execution_workspace_runtime_leases_owner_issue_id_issues_id_fk": {
"name": "execution_workspace_runtime_leases_owner_issue_id_issues_id_fk",
"tableFrom": "execution_workspace_runtime_leases",
+ "tableTo": "issues",
"columnsFrom": [
"owner_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"execution_workspace_runtime_leases_owner_run_id_heartbeat_runs_id_fk": {
"name": "execution_workspace_runtime_leases_owner_run_id_heartbeat_runs_id_fk",
"tableFrom": "execution_workspace_runtime_leases",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"owner_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"execution_workspace_runtime_leases_owner_agent_id_agents_id_fk": {
"name": "execution_workspace_runtime_leases_owner_agent_id_agents_id_fk",
"tableFrom": "execution_workspace_runtime_leases",
+ "tableTo": "agents",
"columnsFrom": [
"owner_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"execution_workspace_runtime_leases_execution_workspace_id_unique": {
"name": "execution_workspace_runtime_leases_execution_workspace_id_unique",
+ "nullsNotDistinct": false,
"columns": [
"execution_workspace_id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -28757,9 +28850,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"execution_workspaces_company_project_workspace_status_idx": {
"name": "execution_workspaces_company_project_workspace_status_idx",
@@ -28784,9 +28877,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"execution_workspaces_company_source_issue_idx": {
"name": "execution_workspaces_company_source_issue_idx",
@@ -28805,9 +28898,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"execution_workspaces_company_last_used_idx": {
"name": "execution_workspaces_company_last_used_idx",
@@ -28826,9 +28919,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"execution_workspaces_company_branch_idx": {
"name": "execution_workspaces_company_branch_idx",
@@ -28847,76 +28940,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"execution_workspaces_company_id_companies_id_fk": {
"name": "execution_workspaces_company_id_companies_id_fk",
"tableFrom": "execution_workspaces",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"execution_workspaces_project_id_projects_id_fk": {
"name": "execution_workspaces_project_id_projects_id_fk",
"tableFrom": "execution_workspaces",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
},
"execution_workspaces_project_workspace_id_project_workspaces_id_fk": {
"name": "execution_workspaces_project_workspace_id_project_workspaces_id_fk",
"tableFrom": "execution_workspaces",
+ "tableTo": "project_workspaces",
"columnsFrom": [
"project_workspace_id"
],
- "tableTo": "project_workspaces",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"execution_workspaces_source_issue_id_issues_id_fk": {
"name": "execution_workspaces_source_issue_id_issues_id_fk",
"tableFrom": "execution_workspaces",
+ "tableTo": "issues",
"columnsFrom": [
"source_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"execution_workspaces_derived_from_execution_workspace_id_execution_workspaces_id_fk": {
"name": "execution_workspaces_derived_from_execution_workspace_id_execution_workspaces_id_fk",
"tableFrom": "execution_workspaces",
+ "tableTo": "execution_workspaces",
"columnsFrom": [
"derived_from_execution_workspace_id"
],
- "tableTo": "execution_workspaces",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -29066,9 +29159,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"external_object_mentions_company_object_idx": {
"name": "external_object_mentions_company_object_idx",
@@ -29087,9 +29180,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"external_object_mentions_company_provider_idx": {
"name": "external_object_mentions_company_provider_idx",
@@ -29114,9 +29207,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"external_object_mentions_company_source_record_uq": {
"name": "external_object_mentions_company_source_record_uq",
@@ -29165,10 +29258,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"external_object_mentions\".\"source_record_id\" is not null and \"external_object_mentions\".\"canonical_identity_hash\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"external_object_mentions_company_source_null_record_uq": {
"name": "external_object_mentions_company_source_null_record_uq",
@@ -29211,64 +29304,64 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"external_object_mentions\".\"source_record_id\" is null and \"external_object_mentions\".\"canonical_identity_hash\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"external_object_mentions_company_id_companies_id_fk": {
"name": "external_object_mentions_company_id_companies_id_fk",
"tableFrom": "external_object_mentions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"external_object_mentions_source_issue_id_issues_id_fk": {
"name": "external_object_mentions_source_issue_id_issues_id_fk",
"tableFrom": "external_object_mentions",
+ "tableTo": "issues",
"columnsFrom": [
"source_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"external_object_mentions_object_id_external_objects_id_fk": {
"name": "external_object_mentions_object_id_external_objects_id_fk",
"tableFrom": "external_object_mentions",
+ "tableTo": "external_objects",
"columnsFrom": [
"object_id"
],
- "tableTo": "external_objects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"external_object_mentions_created_by_plugin_id_plugins_id_fk": {
"name": "external_object_mentions_created_by_plugin_id_plugins_id_fk",
"tableFrom": "external_object_mentions",
+ "tableTo": "plugins",
"columnsFrom": [
"created_by_plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -29500,9 +29593,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"external_objects_company_provider_status_idx": {
"name": "external_objects_company_provider_status_idx",
@@ -29527,9 +29620,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"external_objects_company_refresh_idx": {
"name": "external_objects_company_refresh_idx",
@@ -29548,9 +29641,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"external_objects_company_external_id_uq": {
"name": "external_objects_company_external_id_uq",
@@ -29581,9 +29674,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"external_objects_company_identity_uq": {
"name": "external_objects_company_identity_uq",
@@ -29614,37 +29707,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"external_objects_company_id_companies_id_fk": {
"name": "external_objects_company_id_companies_id_fk",
"tableFrom": "external_objects",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"external_objects_plugin_id_plugins_id_fk": {
"name": "external_objects_plugin_id_plugins_id_fk",
"tableFrom": "external_objects",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -29714,15 +29807,15 @@
"company_fast_responses_company_id_companies_id_fk": {
"name": "company_fast_responses_company_id_companies_id_fk",
"tableFrom": "company_fast_responses",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -29944,9 +30037,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"fast_response_requests_history_idx": {
"name": "fast_response_requests_history_idx",
@@ -29965,9 +30058,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"fast_response_requests_work_idx": {
"name": "fast_response_requests_work_idx",
@@ -29980,38 +30073,38 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"fast_response_requests\".\"status\" in ('pending', 'running')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"fast_response_requests_company_id_companies_id_fk": {
"name": "fast_response_requests_company_id_companies_id_fk",
"tableFrom": "fast_response_requests",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"fast_response_requests_cost_event_id_cost_events_id_fk": {
"name": "fast_response_requests_cost_event_id_cost_events_id_fk",
"tableFrom": "fast_response_requests",
+ "tableTo": "cost_events",
"columnsFrom": [
"cost_event_id"
],
- "tableTo": "cost_events",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -30206,9 +30299,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"feedback_exports_company_created_idx": {
"name": "feedback_exports_company_created_idx",
@@ -30227,9 +30320,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"feedback_exports_company_status_idx": {
"name": "feedback_exports_company_status_idx",
@@ -30254,9 +30347,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"feedback_exports_company_issue_idx": {
"name": "feedback_exports_company_issue_idx",
@@ -30281,9 +30374,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"feedback_exports_company_project_idx": {
"name": "feedback_exports_company_project_idx",
@@ -30308,9 +30401,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"feedback_exports_company_author_idx": {
"name": "feedback_exports_company_author_idx",
@@ -30335,63 +30428,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"feedback_exports_company_id_companies_id_fk": {
"name": "feedback_exports_company_id_companies_id_fk",
"tableFrom": "feedback_exports",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"feedback_exports_feedback_vote_id_feedback_votes_id_fk": {
"name": "feedback_exports_feedback_vote_id_feedback_votes_id_fk",
"tableFrom": "feedback_exports",
+ "tableTo": "feedback_votes",
"columnsFrom": [
"feedback_vote_id"
],
- "tableTo": "feedback_votes",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"feedback_exports_issue_id_issues_id_fk": {
"name": "feedback_exports_issue_id_issues_id_fk",
"tableFrom": "feedback_exports",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"feedback_exports_project_id_projects_id_fk": {
"name": "feedback_exports_project_id_projects_id_fk",
"tableFrom": "feedback_exports",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -30511,9 +30604,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"feedback_votes_issue_target_idx": {
"name": "feedback_votes_issue_target_idx",
@@ -30538,9 +30631,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"feedback_votes_author_idx": {
"name": "feedback_votes_author_idx",
@@ -30559,9 +30652,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"feedback_votes_company_target_author_idx": {
"name": "feedback_votes_company_target_author_idx",
@@ -30592,37 +30685,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"feedback_votes_company_id_companies_id_fk": {
"name": "feedback_votes_company_id_companies_id_fk",
"tableFrom": "feedback_votes",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"feedback_votes_issue_id_issues_id_fk": {
"name": "feedback_votes_issue_id_issues_id_fk",
"tableFrom": "feedback_votes",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -30833,9 +30926,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"finance_events_company_occurred_idx": {
"name": "finance_events_company_occurred_idx",
@@ -30854,9 +30947,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"finance_events_company_biller_occurred_idx": {
"name": "finance_events_company_biller_occurred_idx",
@@ -30881,9 +30974,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"finance_events_company_kind_occurred_idx": {
"name": "finance_events_company_kind_occurred_idx",
@@ -30908,9 +31001,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"finance_events_company_direction_occurred_idx": {
"name": "finance_events_company_direction_occurred_idx",
@@ -30935,9 +31028,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"finance_events_company_heartbeat_run_idx": {
"name": "finance_events_company_heartbeat_run_idx",
@@ -30956,9 +31049,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"finance_events_company_cost_event_idx": {
"name": "finance_events_company_cost_event_idx",
@@ -30977,102 +31070,102 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"finance_events_company_id_companies_id_fk": {
"name": "finance_events_company_id_companies_id_fk",
"tableFrom": "finance_events",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"finance_events_agent_id_agents_id_fk": {
"name": "finance_events_agent_id_agents_id_fk",
"tableFrom": "finance_events",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"finance_events_issue_id_issues_id_fk": {
"name": "finance_events_issue_id_issues_id_fk",
"tableFrom": "finance_events",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"finance_events_project_id_projects_id_fk": {
"name": "finance_events_project_id_projects_id_fk",
"tableFrom": "finance_events",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"finance_events_goal_id_goals_id_fk": {
"name": "finance_events_goal_id_goals_id_fk",
"tableFrom": "finance_events",
+ "tableTo": "goals",
"columnsFrom": [
"goal_id"
],
- "tableTo": "goals",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"finance_events_heartbeat_run_id_heartbeat_runs_id_fk": {
"name": "finance_events_heartbeat_run_id_heartbeat_runs_id_fk",
"tableFrom": "finance_events",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"heartbeat_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"finance_events_cost_event_id_cost_events_id_fk": {
"name": "finance_events_cost_event_id_cost_events_id_fk",
"tableFrom": "finance_events",
+ "tableTo": "cost_events",
"columnsFrom": [
"cost_event_id"
],
- "tableTo": "cost_events",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -31186,9 +31279,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"folders_company_kind_root_slug_uq": {
"name": "folders_company_kind_root_slug_uq",
@@ -31213,10 +31306,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"folders\".\"parent_id\" is null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"folders_company_kind_parent_slug_uq": {
"name": "folders_company_kind_parent_slug_uq",
@@ -31247,10 +31340,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"folders\".\"parent_id\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"folders_company_kind_system_key_uq": {
"name": "folders_company_kind_system_key_uq",
@@ -31275,10 +31368,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"folders\".\"system_key\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"folders_company_kind_parent_position_idx": {
"name": "folders_company_kind_parent_position_idx",
@@ -31315,37 +31408,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"folders_company_id_companies_id_fk": {
"name": "folders_company_id_companies_id_fk",
"tableFrom": "folders",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"folders_parent_id_folders_id_fk": {
"name": "folders_parent_id_folders_id_fk",
"tableFrom": "folders",
+ "tableTo": "folders",
"columnsFrom": [
"parent_id"
],
- "tableTo": "folders",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -31436,50 +31529,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"goals_company_id_companies_id_fk": {
"name": "goals_company_id_companies_id_fk",
"tableFrom": "goals",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"goals_parent_id_goals_id_fk": {
"name": "goals_parent_id_goals_id_fk",
"tableFrom": "goals",
+ "tableTo": "goals",
"columnsFrom": [
"parent_id"
],
- "tableTo": "goals",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"goals_owner_agent_id_agents_id_fk": {
"name": "goals_owner_agent_id_agents_id_fk",
"tableFrom": "goals",
+ "tableTo": "agents",
"columnsFrom": [
"owner_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -31641,9 +31734,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"grok_dispatch_company_status_idx": {
"name": "grok_dispatch_company_status_idx",
@@ -31662,9 +31755,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"grok_dispatch_assignment_kind_idx": {
"name": "grok_dispatch_assignment_kind_idx",
@@ -31683,76 +31776,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"grok_bot_dispatches_company_id_companies_id_fk": {
"name": "grok_bot_dispatches_company_id_companies_id_fk",
"tableFrom": "grok_bot_dispatches",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"grok_bot_dispatches_routine_id_grok_bot_routines_id_fk": {
"name": "grok_bot_dispatches_routine_id_grok_bot_routines_id_fk",
"tableFrom": "grok_bot_dispatches",
+ "tableTo": "grok_bot_routines",
"columnsFrom": [
"routine_id"
],
- "tableTo": "grok_bot_routines",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"grok_bot_dispatches_binding_id_dot_agent_bindings_id_fk": {
"name": "grok_bot_dispatches_binding_id_dot_agent_bindings_id_fk",
"tableFrom": "grok_bot_dispatches",
+ "tableTo": "dot_agent_bindings",
"columnsFrom": [
"binding_id"
],
- "tableTo": "dot_agent_bindings",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"grok_bot_dispatches_grant_id_mcp_oauth_grants_id_fk": {
"name": "grok_bot_dispatches_grant_id_mcp_oauth_grants_id_fk",
"tableFrom": "grok_bot_dispatches",
+ "tableTo": "mcp_oauth_grants",
"columnsFrom": [
"grant_id"
],
- "tableTo": "mcp_oauth_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"grok_bot_dispatches_assignment_id_dot_runner_assignments_id_fk": {
"name": "grok_bot_dispatches_assignment_id_dot_runner_assignments_id_fk",
"tableFrom": "grok_bot_dispatches",
+ "tableTo": "dot_runner_assignments",
"columnsFrom": [
"assignment_id"
],
- "tableTo": "dot_runner_assignments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -31878,9 +31971,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"grok_routines_company_agent_idx": {
"name": "grok_routines_company_agent_idx",
@@ -31899,76 +31992,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"grok_bot_routines_company_id_companies_id_fk": {
"name": "grok_bot_routines_company_id_companies_id_fk",
"tableFrom": "grok_bot_routines",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"grok_bot_routines_agent_id_agents_id_fk": {
"name": "grok_bot_routines_agent_id_agents_id_fk",
"tableFrom": "grok_bot_routines",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"grok_bot_routines_binding_id_dot_agent_bindings_id_fk": {
"name": "grok_bot_routines_binding_id_dot_agent_bindings_id_fk",
"tableFrom": "grok_bot_routines",
+ "tableTo": "dot_agent_bindings",
"columnsFrom": [
"binding_id"
],
- "tableTo": "dot_agent_bindings",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"grok_bot_routines_secret_id_company_secrets_id_fk": {
"name": "grok_bot_routines_secret_id_company_secrets_id_fk",
"tableFrom": "grok_bot_routines",
+ "tableTo": "company_secrets",
"columnsFrom": [
"secret_id"
],
- "tableTo": "company_secrets",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"grok_bot_routines_verified_grant_id_mcp_oauth_grants_id_fk": {
"name": "grok_bot_routines_verified_grant_id_mcp_oauth_grants_id_fk",
"tableFrom": "grok_bot_routines",
+ "tableTo": "mcp_oauth_grants",
"columnsFrom": [
"verified_grant_id"
],
- "tableTo": "mcp_oauth_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -32103,9 +32196,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"heartbeat_run_events_run_source_event_uq": {
"name": "heartbeat_run_events_run_source_event_uq",
@@ -32124,10 +32217,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"heartbeat_run_events\".\"source_event_id\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"heartbeat_run_events_run_source_seq_uq": {
"name": "heartbeat_run_events_run_source_seq_uq",
@@ -32152,10 +32245,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"heartbeat_run_events\".\"source_instance_id\" is not null and \"heartbeat_run_events\".\"source_seq\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"heartbeat_run_events_company_run_idx": {
"name": "heartbeat_run_events_company_run_idx",
@@ -32174,9 +32267,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"heartbeat_run_events_company_created_idx": {
"name": "heartbeat_run_events_company_created_idx",
@@ -32195,50 +32288,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"heartbeat_run_events_company_id_companies_id_fk": {
"name": "heartbeat_run_events_company_id_companies_id_fk",
"tableFrom": "heartbeat_run_events",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"heartbeat_run_events_run_id_heartbeat_runs_id_fk": {
"name": "heartbeat_run_events_run_id_heartbeat_runs_id_fk",
"tableFrom": "heartbeat_run_events",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"heartbeat_run_events_agent_id_agents_id_fk": {
"name": "heartbeat_run_events_agent_id_agents_id_fk",
"tableFrom": "heartbeat_run_events",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -32344,9 +32437,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"heartbeat_run_watchdog_decisions_company_run_snooze_idx": {
"name": "heartbeat_run_watchdog_decisions_company_run_snooze_idx",
@@ -32371,76 +32464,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"heartbeat_run_watchdog_decisions_company_id_companies_id_fk": {
"name": "heartbeat_run_watchdog_decisions_company_id_companies_id_fk",
"tableFrom": "heartbeat_run_watchdog_decisions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"heartbeat_run_watchdog_decisions_run_id_heartbeat_runs_id_fk": {
"name": "heartbeat_run_watchdog_decisions_run_id_heartbeat_runs_id_fk",
"tableFrom": "heartbeat_run_watchdog_decisions",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"heartbeat_run_watchdog_decisions_evaluation_issue_id_issues_id_fk": {
"name": "heartbeat_run_watchdog_decisions_evaluation_issue_id_issues_id_fk",
"tableFrom": "heartbeat_run_watchdog_decisions",
+ "tableTo": "issues",
"columnsFrom": [
"evaluation_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"heartbeat_run_watchdog_decisions_created_by_agent_id_agents_id_fk": {
"name": "heartbeat_run_watchdog_decisions_created_by_agent_id_agents_id_fk",
"tableFrom": "heartbeat_run_watchdog_decisions",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"heartbeat_run_watchdog_decisions_created_by_run_id_heartbeat_runs_id_fk": {
"name": "heartbeat_run_watchdog_decisions_created_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "heartbeat_run_watchdog_decisions",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"created_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -32939,6 +33032,22 @@
}
},
"indexes": {
+ "heartbeat_runs_retained_recovery_adoption_idx": {
+ "name": "heartbeat_runs_retained_recovery_adoption_idx",
+ "columns": [
+ {
+ "expression": "id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "where": "\"heartbeat_runs\".\"result_json\"->'workspaceRestoreRecovery'->>'schema' = 'paperclip.workspace-restore-recovery.v1'\n and not (coalesce(\"heartbeat_runs\".\"result_json\", '{}'::jsonb) ? 'systemRecoveryAdoption')\n and \"heartbeat_runs\".\"status\" in ('failed', 'interrupted', 'timed_out', 'cancelled', 'succeeded')",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
"heartbeat_runs_cost_accounting_pending_idx": {
"name": "heartbeat_runs_cost_accounting_pending_idx",
"columns": [
@@ -32956,10 +33065,10 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"heartbeat_runs\".\"cost_accounting_pending\" = true",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"heartbeat_runs_cost_data_quality_idx": {
"name": "heartbeat_runs_cost_data_quality_idx",
@@ -32972,8 +33081,8 @@
},
{
"expression": "coalesce(\"finished_at\", \"created_at\") desc",
- "isExpression": true,
"asc": true,
+ "isExpression": true,
"nulls": "last"
},
{
@@ -32984,10 +33093,10 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"heartbeat_runs\".\"cost_accounting_pending\" = true and \"heartbeat_runs\".\"status\" in ('succeeded','failed','timed_out','cancelled','interrupted')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"heartbeat_runs_execution_status_delivery_idx": {
"name": "heartbeat_runs_execution_status_delivery_idx",
@@ -33000,10 +33109,10 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"heartbeat_runs\".\"execution_status_delivery_id\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"heartbeat_runs_execution_control_deadline_idx": {
"name": "heartbeat_runs_execution_control_deadline_idx",
@@ -33016,10 +33125,10 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"heartbeat_runs\".\"execution_control_deadline_at\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"heartbeat_runs_native_replacement_predecessor_uq": {
"name": "heartbeat_runs_native_replacement_predecessor_uq",
@@ -33038,10 +33147,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"heartbeat_runs\".\"scheduled_retry_reason\" = 'native_safe_replacement'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"heartbeat_runs_company_agent_started_idx": {
"name": "heartbeat_runs_company_agent_started_idx",
@@ -33066,9 +33175,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"heartbeat_runs_company_issue_created_idx": {
"name": "heartbeat_runs_company_issue_created_idx",
@@ -33093,9 +33202,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"heartbeat_runs_company_responsible_user_idx": {
"name": "heartbeat_runs_company_responsible_user_idx",
@@ -33120,9 +33229,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"heartbeat_runs_company_liveness_idx": {
"name": "heartbeat_runs_company_liveness_idx",
@@ -33147,9 +33256,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"heartbeat_runs_company_status_last_output_idx": {
"name": "heartbeat_runs_company_status_last_output_idx",
@@ -33174,9 +33283,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"heartbeat_runs_company_status_process_started_idx": {
"name": "heartbeat_runs_company_status_process_started_idx",
@@ -33201,9 +33310,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"heartbeat_runs_company_created_at_desc_idx": {
"name": "heartbeat_runs_company_created_at_desc_idx",
@@ -33222,9 +33331,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"heartbeat_runs_company_ctx_issue_created_idx": {
"name": "heartbeat_runs_company_ctx_issue_created_idx",
@@ -33237,8 +33346,8 @@
},
{
"expression": "(\"context_snapshot\" ->> 'issueId')",
- "isExpression": true,
"asc": true,
+ "isExpression": true,
"nulls": "last"
},
{
@@ -33249,9 +33358,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"heartbeat_runs_company_ctx_task_created_idx": {
"name": "heartbeat_runs_company_ctx_task_created_idx",
@@ -33264,8 +33373,8 @@
},
{
"expression": "(\"context_snapshot\" ->> 'taskId')",
- "isExpression": true,
"asc": true,
+ "isExpression": true,
"nulls": "last"
},
{
@@ -33276,9 +33385,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"heartbeat_runs_company_ctx_taskkey_created_idx": {
"name": "heartbeat_runs_company_ctx_taskkey_created_idx",
@@ -33291,8 +33400,8 @@
},
{
"expression": "(\"context_snapshot\" ->> 'taskKey')",
- "isExpression": true,
"asc": true,
+ "isExpression": true,
"nulls": "last"
},
{
@@ -33303,9 +33412,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"heartbeat_runs_company_ctx_paperclip_issue_created_idx": {
"name": "heartbeat_runs_company_ctx_paperclip_issue_created_idx",
@@ -33318,8 +33427,8 @@
},
{
"expression": "(\"context_snapshot\" -> 'paperclipIssue' ->> 'id')",
- "isExpression": true,
"asc": true,
+ "isExpression": true,
"nulls": "last"
},
{
@@ -33330,9 +33439,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": true,
"method": "btree",
- "concurrently": true
+ "with": {}
},
"heartbeat_runs_company_origin_issue_idx": {
"name": "heartbeat_runs_company_origin_issue_idx",
@@ -33345,104 +33454,104 @@
},
{
"expression": "coalesce(\n \"native_issue_id\"::text,\n nullif(\"context_snapshot\"->>'issueId', ''),\n nullif(\"context_snapshot\"->>'taskId', ''),\n nullif(\"context_snapshot\"->>'taskKey', '')\n )",
- "isExpression": true,
"asc": true,
+ "isExpression": true,
"nulls": "last"
}
],
"isUnique": false,
- "with": {},
+ "concurrently": true,
"method": "btree",
- "concurrently": true
+ "with": {}
}
},
"foreignKeys": {
"heartbeat_runs_company_id_companies_id_fk": {
"name": "heartbeat_runs_company_id_companies_id_fk",
"tableFrom": "heartbeat_runs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"heartbeat_runs_agent_id_agents_id_fk": {
"name": "heartbeat_runs_agent_id_agents_id_fk",
"tableFrom": "heartbeat_runs",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"heartbeat_runs_issue_id_issues_id_fk": {
"name": "heartbeat_runs_issue_id_issues_id_fk",
"tableFrom": "heartbeat_runs",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"heartbeat_runs_wakeup_request_id_agent_wakeup_requests_id_fk": {
"name": "heartbeat_runs_wakeup_request_id_agent_wakeup_requests_id_fk",
"tableFrom": "heartbeat_runs",
+ "tableTo": "agent_wakeup_requests",
"columnsFrom": [
"wakeup_request_id"
],
- "tableTo": "agent_wakeup_requests",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"heartbeat_runs_retry_of_run_id_heartbeat_runs_id_fk": {
"name": "heartbeat_runs_retry_of_run_id_heartbeat_runs_id_fk",
"tableFrom": "heartbeat_runs",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"retry_of_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"heartbeat_runs_company_native_issue_id_uq": {
"name": "heartbeat_runs_company_native_issue_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"native_issue_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
},
"heartbeat_runs_company_native_issue_contract_id_uq": {
"name": "heartbeat_runs_company_native_issue_contract_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"native_issue_id",
"id",
"completion_contract_id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -33536,9 +33645,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"inbox_dismissals_company_item_idx": {
"name": "inbox_dismissals_company_item_idx",
@@ -33557,9 +33666,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"inbox_dismissals_company_user_item_idx": {
"name": "inbox_dismissals_company_user_item_idx",
@@ -33584,24 +33693,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"inbox_dismissals_company_id_companies_id_fk": {
"name": "inbox_dismissals_company_id_companies_id_fk",
"tableFrom": "inbox_dismissals",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -33671,9 +33780,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"connection_grant_delegations_grant_agent_uq": {
"name": "connection_grant_delegations_grant_agent_uq",
@@ -33692,52 +33801,52 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"connection_grant_delegations_company_id_companies_id_fk": {
"name": "connection_grant_delegations_company_id_companies_id_fk",
"tableFrom": "connection_grant_delegations",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"connection_grant_delegations_agent_id_agents_id_fk": {
"name": "connection_grant_delegations_agent_id_agents_id_fk",
"tableFrom": "connection_grant_delegations",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"connection_grant_delegations_company_grant_fk": {
"name": "connection_grant_delegations_company_grant_fk",
"tableFrom": "connection_grant_delegations",
+ "tableTo": "connection_grants",
"columnsFrom": [
"company_id",
"grant_id"
],
- "tableTo": "connection_grants",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -33813,9 +33922,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"connection_grant_members_grant_subject_uq": {
"name": "connection_grant_members_grant_subject_uq",
@@ -33840,39 +33949,39 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"connection_grant_members_company_id_companies_id_fk": {
"name": "connection_grant_members_company_id_companies_id_fk",
"tableFrom": "connection_grant_members",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"connection_grant_members_company_grant_fk": {
"name": "connection_grant_members_company_grant_fk",
"tableFrom": "connection_grant_members",
+ "tableTo": "connection_grants",
"columnsFrom": [
"company_id",
"grant_id"
],
- "tableTo": "connection_grants",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -34029,9 +34138,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"connection_grants_subject_user_idx": {
"name": "connection_grants_subject_user_idx",
@@ -34050,9 +34159,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"connection_grants_subject_agent_idx": {
"name": "connection_grants_subject_agent_idx",
@@ -34071,9 +34180,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"connection_grants_user_uq": {
"name": "connection_grants_user_uq",
@@ -34092,9 +34201,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"connection_grants_agent_uq": {
"name": "connection_grants_agent_uq",
@@ -34113,9 +34222,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"connection_grants_default_uq": {
"name": "connection_grants_default_uq",
@@ -34128,90 +34237,90 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"connection_grants\".\"is_default\" = true and \"connection_grants\".\"kind\" = 'organization'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"connection_grants_company_id_companies_id_fk": {
"name": "connection_grants_company_id_companies_id_fk",
"tableFrom": "connection_grants",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"connection_grants_subject_agent_id_agents_id_fk": {
"name": "connection_grants_subject_agent_id_agents_id_fk",
"tableFrom": "connection_grants",
+ "tableTo": "agents",
"columnsFrom": [
"subject_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"connection_grants_created_by_agent_id_agents_id_fk": {
"name": "connection_grants_created_by_agent_id_agents_id_fk",
"tableFrom": "connection_grants",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"connection_grants_revoked_by_agent_id_agents_id_fk": {
"name": "connection_grants_revoked_by_agent_id_agents_id_fk",
"tableFrom": "connection_grants",
+ "tableTo": "agents",
"columnsFrom": [
"revoked_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"connection_grants_company_connection_fk": {
"name": "connection_grants_company_connection_fk",
"tableFrom": "connection_grants",
+ "tableTo": "tool_connections",
"columnsFrom": [
"company_id",
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"connection_grants_company_id_uq": {
"name": "connection_grants_company_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -34381,9 +34490,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"connection_token_issuances_connection_created_idx": {
"name": "connection_token_issuances_connection_created_idx",
@@ -34408,9 +34517,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"connection_token_issuances_agent_connection_idx": {
"name": "connection_token_issuances_agent_connection_idx",
@@ -34441,9 +34550,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"connection_token_issuances_run_idx": {
"name": "connection_token_issuances_run_idx",
@@ -34462,102 +34571,102 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"connection_token_issuances_company_id_companies_id_fk": {
"name": "connection_token_issuances_company_id_companies_id_fk",
"tableFrom": "connection_token_issuances",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"connection_token_issuances_application_id_tool_applications_id_fk": {
"name": "connection_token_issuances_application_id_tool_applications_id_fk",
"tableFrom": "connection_token_issuances",
+ "tableTo": "tool_applications",
"columnsFrom": [
"application_id"
],
- "tableTo": "tool_applications",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"connection_token_issuances_connection_id_tool_connections_id_fk": {
"name": "connection_token_issuances_connection_id_tool_connections_id_fk",
"tableFrom": "connection_token_issuances",
+ "tableTo": "tool_connections",
"columnsFrom": [
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"connection_token_issuances_agent_id_agents_id_fk": {
"name": "connection_token_issuances_agent_id_agents_id_fk",
"tableFrom": "connection_token_issuances",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"connection_token_issuances_run_id_heartbeat_runs_id_fk": {
"name": "connection_token_issuances_run_id_heartbeat_runs_id_fk",
"tableFrom": "connection_token_issuances",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"connection_token_issuances_issue_id_issues_id_fk": {
"name": "connection_token_issuances_issue_id_issues_id_fk",
"tableFrom": "connection_token_issuances",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"connection_token_issuances_project_id_projects_id_fk": {
"name": "connection_token_issuances_project_id_projects_id_fk",
"tableFrom": "connection_token_issuances",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -34631,24 +34740,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"instance_settings_default_environment_id_environments_id_fk": {
"name": "instance_settings_default_environment_id_environments_id_fk",
"tableFrom": "instance_settings",
+ "tableTo": "environments",
"columnsFrom": [
"default_environment_id"
],
- "tableTo": "environments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -34714,9 +34823,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"instance_user_roles_role_idx": {
"name": "instance_user_roles_role_idx",
@@ -34729,9 +34838,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {},
@@ -34835,9 +34944,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"invites_company_invite_state_idx": {
"name": "invites_company_invite_state_idx",
@@ -34868,24 +34977,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"invites_company_id_companies_id_fk": {
"name": "invites_company_id_companies_id_fk",
"tableFrom": "invites",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -34985,9 +35094,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_access_grants_issue_idx": {
"name": "issue_access_grants_issue_idx",
@@ -35006,37 +35115,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_access_grants_issue_id_issues_id_fk": {
"name": "issue_access_grants_issue_id_issues_id_fk",
"tableFrom": "issue_access_grants",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_access_grants_granted_by_agent_id_agents_id_fk": {
"name": "issue_access_grants_granted_by_agent_id_agents_id_fk",
"tableFrom": "issue_access_grants",
+ "tableTo": "agents",
"columnsFrom": [
"granted_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -35108,9 +35217,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_approvals_approval_idx": {
"name": "issue_approvals_approval_idx",
@@ -35123,9 +35232,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_approvals_company_idx": {
"name": "issue_approvals_company_idx",
@@ -35138,63 +35247,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_approvals_company_id_companies_id_fk": {
"name": "issue_approvals_company_id_companies_id_fk",
"tableFrom": "issue_approvals",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_approvals_issue_id_issues_id_fk": {
"name": "issue_approvals_issue_id_issues_id_fk",
"tableFrom": "issue_approvals",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_approvals_approval_id_approvals_id_fk": {
"name": "issue_approvals_approval_id_approvals_id_fk",
"tableFrom": "issue_approvals",
+ "tableTo": "approvals",
"columnsFrom": [
"approval_id"
],
- "tableTo": "approvals",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_approvals_linked_by_agent_id_agents_id_fk": {
"name": "issue_approvals_linked_by_agent_id_agents_id_fk",
"tableFrom": "issue_approvals",
+ "tableTo": "agents",
"columnsFrom": [
"linked_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {
@@ -35285,9 +35394,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_attachments_issue_comment_idx": {
"name": "issue_attachments_issue_comment_idx",
@@ -35300,9 +35409,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_attachments_originating_run_idx": {
"name": "issue_attachments_originating_run_idx",
@@ -35315,9 +35424,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_attachments_asset_uq": {
"name": "issue_attachments_asset_uq",
@@ -35330,76 +35439,76 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_attachments_company_id_companies_id_fk": {
"name": "issue_attachments_company_id_companies_id_fk",
"tableFrom": "issue_attachments",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_attachments_issue_id_issues_id_fk": {
"name": "issue_attachments_issue_id_issues_id_fk",
"tableFrom": "issue_attachments",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_attachments_asset_id_assets_id_fk": {
"name": "issue_attachments_asset_id_assets_id_fk",
"tableFrom": "issue_attachments",
+ "tableTo": "assets",
"columnsFrom": [
"asset_id"
],
- "tableTo": "assets",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_attachments_issue_comment_id_issue_comments_id_fk": {
"name": "issue_attachments_issue_comment_id_issue_comments_id_fk",
"tableFrom": "issue_attachments",
+ "tableTo": "issue_comments",
"columnsFrom": [
"issue_comment_id"
],
- "tableTo": "issue_comments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_attachments_originating_run_id_heartbeat_runs_id_fk": {
"name": "issue_attachments_originating_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_attachments",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"originating_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -35585,9 +35694,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_comments_company_idx": {
"name": "issue_comments_company_idx",
@@ -35600,9 +35709,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_comments_company_issue_created_at_idx": {
"name": "issue_comments_company_issue_created_at_idx",
@@ -35627,9 +35736,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_comments_company_author_issue_created_at_idx": {
"name": "issue_comments_company_author_issue_created_at_idx",
@@ -35660,9 +35769,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_comments_body_search_idx": {
"name": "issue_comments_body_search_idx",
@@ -35676,148 +35785,148 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "gin",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_comments_company_id_companies_id_fk": {
"name": "issue_comments_company_id_companies_id_fk",
"tableFrom": "issue_comments",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_comments_issue_id_issues_id_fk": {
"name": "issue_comments_issue_id_issues_id_fk",
"tableFrom": "issue_comments",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_comments_author_agent_id_agents_id_fk": {
"name": "issue_comments_author_agent_id_agents_id_fk",
"tableFrom": "issue_comments",
+ "tableTo": "agents",
"columnsFrom": [
"author_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_comments_on_behalf_of_user_id_user_id_fk": {
"name": "issue_comments_on_behalf_of_user_id_user_id_fk",
"tableFrom": "issue_comments",
+ "tableTo": "user",
"columnsFrom": [
"on_behalf_of_user_id"
],
- "tableTo": "user",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_comments_created_by_run_id_heartbeat_runs_id_fk": {
"name": "issue_comments_created_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_comments",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"created_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_comments_derived_author_agent_id_agents_id_fk": {
"name": "issue_comments_derived_author_agent_id_agents_id_fk",
"tableFrom": "issue_comments",
+ "tableTo": "agents",
"columnsFrom": [
"derived_author_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_comments_derived_created_by_run_id_heartbeat_runs_id_fk": {
"name": "issue_comments_derived_created_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_comments",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"derived_created_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_comments_deleted_by_agent_id_agents_id_fk": {
"name": "issue_comments_deleted_by_agent_id_agents_id_fk",
"tableFrom": "issue_comments",
+ "tableTo": "agents",
"columnsFrom": [
"deleted_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_comments_deleted_by_run_id_heartbeat_runs_id_fk": {
"name": "issue_comments_deleted_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_comments",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"deleted_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"issue_comments_client_request_uq": {
"name": "issue_comments_client_request_uq",
+ "nullsNotDistinct": false,
"columns": [
"issue_id",
"author_user_id",
"client_request_id"
- ],
- "nullsNotDistinct": false
+ ]
},
"issue_comments_company_id_uq": {
"name": "issue_comments_company_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -35879,9 +35988,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_create_idempotency_keys_issue_idx": {
"name": "issue_create_idempotency_keys_issue_idx",
@@ -35894,9 +36003,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_create_idempotency_keys_company_created_at_idx": {
"name": "issue_create_idempotency_keys_company_created_at_idx",
@@ -35915,37 +36024,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_create_idempotency_keys_company_id_companies_id_fk": {
"name": "issue_create_idempotency_keys_company_id_companies_id_fk",
"tableFrom": "issue_create_idempotency_keys",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_create_idempotency_keys_issue_id_issues_id_fk": {
"name": "issue_create_idempotency_keys_issue_id_issues_id_fk",
"tableFrom": "issue_create_idempotency_keys",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -36028,9 +36137,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_documents_document_uq": {
"name": "issue_documents_document_uq",
@@ -36043,9 +36152,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_documents_company_issue_updated_idx": {
"name": "issue_documents_company_issue_updated_idx",
@@ -36070,50 +36179,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_documents_company_id_companies_id_fk": {
"name": "issue_documents_company_id_companies_id_fk",
"tableFrom": "issue_documents",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_documents_issue_id_issues_id_fk": {
"name": "issue_documents_issue_id_issues_id_fk",
"tableFrom": "issue_documents",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_documents_document_id_documents_id_fk": {
"name": "issue_documents_document_id_documents_id_fk",
"tableFrom": "issue_documents",
+ "tableTo": "documents",
"columnsFrom": [
"document_id"
],
- "tableTo": "documents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -36220,9 +36329,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_execution_decisions_stage_idx": {
"name": "issue_execution_decisions_stage_idx",
@@ -36247,63 +36356,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_execution_decisions_company_id_companies_id_fk": {
"name": "issue_execution_decisions_company_id_companies_id_fk",
"tableFrom": "issue_execution_decisions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_execution_decisions_issue_id_issues_id_fk": {
"name": "issue_execution_decisions_issue_id_issues_id_fk",
"tableFrom": "issue_execution_decisions",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_execution_decisions_actor_agent_id_agents_id_fk": {
"name": "issue_execution_decisions_actor_agent_id_agents_id_fk",
"tableFrom": "issue_execution_decisions",
+ "tableTo": "agents",
"columnsFrom": [
"actor_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_execution_decisions_created_by_run_id_heartbeat_runs_id_fk": {
"name": "issue_execution_decisions_created_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_execution_decisions",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"created_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -36400,9 +36509,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_inbox_archives_company_user_idx": {
"name": "issue_inbox_archives_company_user_idx",
@@ -36421,9 +36530,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_inbox_archives_company_issue_user_idx": {
"name": "issue_inbox_archives_company_issue_user_idx",
@@ -36448,63 +36557,63 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_inbox_archives_company_id_companies_id_fk": {
"name": "issue_inbox_archives_company_id_companies_id_fk",
"tableFrom": "issue_inbox_archives",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_inbox_archives_issue_id_issues_id_fk": {
"name": "issue_inbox_archives_issue_id_issues_id_fk",
"tableFrom": "issue_inbox_archives",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_inbox_archives_archived_by_agent_id_agents_id_fk": {
"name": "issue_inbox_archives_archived_by_agent_id_agents_id_fk",
"tableFrom": "issue_inbox_archives",
+ "tableTo": "agents",
"columnsFrom": [
"archived_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_inbox_archives_archived_by_run_id_heartbeat_runs_id_fk": {
"name": "issue_inbox_archives_archived_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_inbox_archives",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"archived_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -36560,9 +36669,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_labels_label_idx": {
"name": "issue_labels_label_idx",
@@ -36575,9 +36684,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_labels_company_idx": {
"name": "issue_labels_company_idx",
@@ -36590,50 +36699,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_labels_issue_id_issues_id_fk": {
"name": "issue_labels_issue_id_issues_id_fk",
"tableFrom": "issue_labels",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_labels_label_id_labels_id_fk": {
"name": "issue_labels_label_id_labels_id_fk",
"tableFrom": "issue_labels",
+ "tableTo": "labels",
"columnsFrom": [
"label_id"
],
- "tableTo": "labels",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_labels_company_id_companies_id_fk": {
"name": "issue_labels_company_id_companies_id_fk",
"tableFrom": "issue_labels",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {
@@ -36782,9 +36891,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_plan_decompositions_active_owner_idx": {
"name": "issue_plan_decompositions_active_owner_idx",
@@ -36803,10 +36912,10 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"issue_plan_decompositions\".\"status\" = 'in_flight'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"issue_plan_decompositions_source_revision_uq": {
"name": "issue_plan_decompositions_source_revision_uq",
@@ -36831,89 +36940,89 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_plan_decompositions_company_id_companies_id_fk": {
"name": "issue_plan_decompositions_company_id_companies_id_fk",
"tableFrom": "issue_plan_decompositions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_plan_decompositions_source_issue_id_issues_id_fk": {
"name": "issue_plan_decompositions_source_issue_id_issues_id_fk",
"tableFrom": "issue_plan_decompositions",
+ "tableTo": "issues",
"columnsFrom": [
"source_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_plan_decompositions_accepted_plan_revision_id_document_revisions_id_fk": {
"name": "issue_plan_decompositions_accepted_plan_revision_id_document_revisions_id_fk",
"tableFrom": "issue_plan_decompositions",
+ "tableTo": "document_revisions",
"columnsFrom": [
"accepted_plan_revision_id"
],
- "tableTo": "document_revisions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_plan_decompositions_accepted_interaction_id_issue_thread_interactions_id_fk": {
"name": "issue_plan_decompositions_accepted_interaction_id_issue_thread_interactions_id_fk",
"tableFrom": "issue_plan_decompositions",
+ "tableTo": "issue_thread_interactions",
"columnsFrom": [
"accepted_interaction_id"
],
- "tableTo": "issue_thread_interactions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_plan_decompositions_owner_agent_id_agents_id_fk": {
"name": "issue_plan_decompositions_owner_agent_id_agents_id_fk",
"tableFrom": "issue_plan_decompositions",
+ "tableTo": "agents",
"columnsFrom": [
"owner_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_plan_decompositions_owner_run_id_heartbeat_runs_id_fk": {
"name": "issue_plan_decompositions_owner_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_plan_decompositions",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"owner_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -37053,9 +37162,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_question_response_deliveries_correlation_uq": {
"name": "issue_question_response_deliveries_correlation_uq",
@@ -37068,9 +37177,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_question_response_deliveries_pending_idx": {
"name": "issue_question_response_deliveries_pending_idx",
@@ -37089,9 +37198,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_question_response_deliveries_company_issue_idx": {
"name": "issue_question_response_deliveries_company_issue_idx",
@@ -37116,76 +37225,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_question_response_deliveries_company_id_companies_id_fk": {
"name": "issue_question_response_deliveries_company_id_companies_id_fk",
"tableFrom": "issue_question_response_deliveries",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_question_response_deliveries_issue_id_issues_id_fk": {
"name": "issue_question_response_deliveries_issue_id_issues_id_fk",
"tableFrom": "issue_question_response_deliveries",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_question_response_deliveries_interaction_id_issue_thread_interactions_id_fk": {
"name": "issue_question_response_deliveries_interaction_id_issue_thread_interactions_id_fk",
"tableFrom": "issue_question_response_deliveries",
+ "tableTo": "issue_thread_interactions",
"columnsFrom": [
"interaction_id"
],
- "tableTo": "issue_thread_interactions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_question_response_deliveries_source_run_id_heartbeat_runs_id_fk": {
"name": "issue_question_response_deliveries_source_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_question_response_deliveries",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"source_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_question_response_deliveries_target_run_id_heartbeat_runs_id_fk": {
"name": "issue_question_response_deliveries_target_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_question_response_deliveries",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"target_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -37272,9 +37381,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_read_states_company_user_idx": {
"name": "issue_read_states_company_user_idx",
@@ -37293,9 +37402,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_read_states_company_issue_user_idx": {
"name": "issue_read_states_company_issue_user_idx",
@@ -37320,37 +37429,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_read_states_company_id_companies_id_fk": {
"name": "issue_read_states_company_id_companies_id_fk",
"tableFrom": "issue_read_states",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_read_states_issue_id_issues_id_fk": {
"name": "issue_read_states_issue_id_issues_id_fk",
"tableFrom": "issue_read_states",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -37528,6 +37637,71 @@
}
},
"indexes": {
+ "issue_recovery_actions_source_run_idx": {
+ "name": "issue_recovery_actions_source_run_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "source_issue_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "(\"evidence\"->>'runId')",
+ "asc": true,
+ "isExpression": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "issue_recovery_actions_system_recovery_due_idx": {
+ "name": "issue_recovery_actions_system_recovery_due_idx",
+ "columns": [
+ {
+ "expression": "(\"evidence\"#>'{systemRecovery,nextAttemptAt}')",
+ "asc": true,
+ "isExpression": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "where": "\"issue_recovery_actions\".\"evidence\" ? 'systemRecovery'",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "issue_recovery_actions_system_recovery_adoption_idx": {
+ "name": "issue_recovery_actions_system_recovery_adoption_idx",
+ "columns": [
+ {
+ "expression": "id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "where": "not (\"issue_recovery_actions\".\"evidence\" ? 'systemRecovery') and (\n \"issue_recovery_actions\".\"evidence\"->'workspaceRestoreRecovery'->>'schema' = 'paperclip.workspace-restore-recovery.v1'\n or \"issue_recovery_actions\".\"cause\" in ('native_workspace_sync_out_unrecoverable', 'native_workspace_sync_out_retry_exhausted')\n )",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
"issue_recovery_actions_retained_workspace_recovery_idx": {
"name": "issue_recovery_actions_retained_workspace_recovery_idx",
"columns": [
@@ -37539,10 +37713,10 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\n (\"issue_recovery_actions\".\"evidence\"->'workspaceRestoreRecovery'->>'schema' = 'paperclip.workspace-restore-recovery.v1'\n or \"issue_recovery_actions\".\"cause\" in ('native_workspace_sync_out_unrecoverable', 'native_workspace_sync_out_retry_exhausted'))\n and (\"issue_recovery_actions\".\"evidence\"->'executionReconciliation' is null\n or \"issue_recovery_actions\".\"evidence\"#>>'{workspaceRecovery,status}' = 'recovered')\n ",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"issue_recovery_actions_company_source_status_idx": {
"name": "issue_recovery_actions_company_source_status_idx",
@@ -37567,9 +37741,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_recovery_actions_company_owner_status_idx": {
"name": "issue_recovery_actions_company_owner_status_idx",
@@ -37594,9 +37768,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_recovery_actions_company_recovery_issue_idx": {
"name": "issue_recovery_actions_company_recovery_issue_idx",
@@ -37615,9 +37789,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_recovery_actions_active_source_uq": {
"name": "issue_recovery_actions_active_source_uq",
@@ -37636,10 +37810,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"issue_recovery_actions\".\"status\" in ('active', 'escalated')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"issue_recovery_actions_active_fingerprint_uq": {
"name": "issue_recovery_actions_active_fingerprint_uq",
@@ -37670,90 +37844,90 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"issue_recovery_actions\".\"status\" in ('active', 'escalated')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"issue_recovery_actions_company_id_companies_id_fk": {
"name": "issue_recovery_actions_company_id_companies_id_fk",
"tableFrom": "issue_recovery_actions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_recovery_actions_source_issue_id_issues_id_fk": {
"name": "issue_recovery_actions_source_issue_id_issues_id_fk",
"tableFrom": "issue_recovery_actions",
+ "tableTo": "issues",
"columnsFrom": [
"source_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_recovery_actions_recovery_issue_id_issues_id_fk": {
"name": "issue_recovery_actions_recovery_issue_id_issues_id_fk",
"tableFrom": "issue_recovery_actions",
+ "tableTo": "issues",
"columnsFrom": [
"recovery_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_recovery_actions_owner_agent_id_agents_id_fk": {
"name": "issue_recovery_actions_owner_agent_id_agents_id_fk",
"tableFrom": "issue_recovery_actions",
+ "tableTo": "agents",
"columnsFrom": [
"owner_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_recovery_actions_previous_owner_agent_id_agents_id_fk": {
"name": "issue_recovery_actions_previous_owner_agent_id_agents_id_fk",
"tableFrom": "issue_recovery_actions",
+ "tableTo": "agents",
"columnsFrom": [
"previous_owner_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_recovery_actions_return_owner_agent_id_agents_id_fk": {
"name": "issue_recovery_actions_return_owner_agent_id_agents_id_fk",
"tableFrom": "issue_recovery_actions",
+ "tableTo": "agents",
"columnsFrom": [
"return_owner_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -37848,9 +38022,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_reference_mentions_company_target_issue_idx": {
"name": "issue_reference_mentions_company_target_issue_idx",
@@ -37869,9 +38043,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_reference_mentions_company_issue_pair_idx": {
"name": "issue_reference_mentions_company_issue_pair_idx",
@@ -37896,9 +38070,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_reference_mentions_company_source_mention_record_uq": {
"name": "issue_reference_mentions_company_source_mention_record_uq",
@@ -37935,10 +38109,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"issue_reference_mentions\".\"source_record_id\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"issue_reference_mentions_company_source_mention_null_record_uq": {
"name": "issue_reference_mentions_company_source_mention_null_record_uq",
@@ -37969,51 +38143,51 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"issue_reference_mentions\".\"source_record_id\" is null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"issue_reference_mentions_company_id_companies_id_fk": {
"name": "issue_reference_mentions_company_id_companies_id_fk",
"tableFrom": "issue_reference_mentions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_reference_mentions_source_issue_id_issues_id_fk": {
"name": "issue_reference_mentions_source_issue_id_issues_id_fk",
"tableFrom": "issue_reference_mentions",
+ "tableTo": "issues",
"columnsFrom": [
"source_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_reference_mentions_target_issue_id_issues_id_fk": {
"name": "issue_reference_mentions_target_issue_id_issues_id_fk",
"tableFrom": "issue_reference_mentions",
+ "tableTo": "issues",
"columnsFrom": [
"target_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -38102,9 +38276,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_relations_company_related_issue_idx": {
"name": "issue_relations_company_related_issue_idx",
@@ -38123,9 +38297,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_relations_company_type_idx": {
"name": "issue_relations_company_type_idx",
@@ -38144,9 +38318,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_relations_company_edge_uq": {
"name": "issue_relations_company_edge_uq",
@@ -38177,63 +38351,63 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_relations_company_id_companies_id_fk": {
"name": "issue_relations_company_id_companies_id_fk",
"tableFrom": "issue_relations",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_relations_issue_id_issues_id_fk": {
"name": "issue_relations_issue_id_issues_id_fk",
"tableFrom": "issue_relations",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_relations_related_issue_id_issues_id_fk": {
"name": "issue_relations_related_issue_id_issues_id_fk",
"tableFrom": "issue_relations",
+ "tableTo": "issues",
"columnsFrom": [
"related_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_relations_created_by_agent_id_agents_id_fk": {
"name": "issue_relations_created_by_agent_id_agents_id_fk",
"tableFrom": "issue_relations",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -38443,9 +38617,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_thread_interactions_company_issue_created_at_idx": {
"name": "issue_thread_interactions_company_issue_created_at_idx",
@@ -38470,9 +38644,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_thread_interactions_company_issue_status_idx": {
"name": "issue_thread_interactions_company_issue_status_idx",
@@ -38497,9 +38671,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_thread_interactions_company_issue_idempotency_uq": {
"name": "issue_thread_interactions_company_issue_idempotency_uq",
@@ -38524,10 +38698,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"issue_thread_interactions\".\"idempotency_key\" IS NOT NULL",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"issue_thread_interactions_source_comment_idx": {
"name": "issue_thread_interactions_source_comment_idx",
@@ -38540,9 +38714,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_thread_interactions_addressee_agent_idx": {
"name": "issue_thread_interactions_addressee_agent_idx",
@@ -38555,9 +38729,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_thread_interactions_addressee_user_idx": {
"name": "issue_thread_interactions_addressee_user_idx",
@@ -38570,115 +38744,115 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_thread_interactions_company_id_companies_id_fk": {
"name": "issue_thread_interactions_company_id_companies_id_fk",
"tableFrom": "issue_thread_interactions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_thread_interactions_issue_id_issues_id_fk": {
"name": "issue_thread_interactions_issue_id_issues_id_fk",
"tableFrom": "issue_thread_interactions",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_thread_interactions_source_comment_id_issue_comments_id_fk": {
"name": "issue_thread_interactions_source_comment_id_issue_comments_id_fk",
"tableFrom": "issue_thread_interactions",
+ "tableTo": "issue_comments",
"columnsFrom": [
"source_comment_id"
],
- "tableTo": "issue_comments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_thread_interactions_source_run_id_heartbeat_runs_id_fk": {
"name": "issue_thread_interactions_source_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_thread_interactions",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"source_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_thread_interactions_created_by_agent_id_agents_id_fk": {
"name": "issue_thread_interactions_created_by_agent_id_agents_id_fk",
"tableFrom": "issue_thread_interactions",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_thread_interactions_addressee_agent_id_agents_id_fk": {
"name": "issue_thread_interactions_addressee_agent_id_agents_id_fk",
"tableFrom": "issue_thread_interactions",
+ "tableTo": "agents",
"columnsFrom": [
"addressee_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_thread_interactions_resolved_by_agent_id_agents_id_fk": {
"name": "issue_thread_interactions_resolved_by_agent_id_agents_id_fk",
"tableFrom": "issue_thread_interactions",
+ "tableTo": "agents",
"columnsFrom": [
"resolved_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_thread_interactions_resolved_by_run_id_heartbeat_runs_id_fk": {
"name": "issue_thread_interactions_resolved_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_thread_interactions",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"resolved_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -38810,9 +38984,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_tree_hold_members_company_issue_idx": {
"name": "issue_tree_hold_members_company_issue_idx",
@@ -38831,9 +39005,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_tree_hold_members_hold_depth_idx": {
"name": "issue_tree_hold_members_hold_depth_idx",
@@ -38852,89 +39026,89 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_tree_hold_members_company_id_companies_id_fk": {
"name": "issue_tree_hold_members_company_id_companies_id_fk",
"tableFrom": "issue_tree_hold_members",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_tree_hold_members_hold_id_issue_tree_holds_id_fk": {
"name": "issue_tree_hold_members_hold_id_issue_tree_holds_id_fk",
"tableFrom": "issue_tree_hold_members",
+ "tableTo": "issue_tree_holds",
"columnsFrom": [
"hold_id"
],
- "tableTo": "issue_tree_holds",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_tree_hold_members_issue_id_issues_id_fk": {
"name": "issue_tree_hold_members_issue_id_issues_id_fk",
"tableFrom": "issue_tree_hold_members",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_tree_hold_members_parent_issue_id_issues_id_fk": {
"name": "issue_tree_hold_members_parent_issue_id_issues_id_fk",
"tableFrom": "issue_tree_hold_members",
+ "tableTo": "issues",
"columnsFrom": [
"parent_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_tree_hold_members_assignee_agent_id_agents_id_fk": {
"name": "issue_tree_hold_members_assignee_agent_id_agents_id_fk",
"tableFrom": "issue_tree_hold_members",
+ "tableTo": "agents",
"columnsFrom": [
"assignee_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_tree_hold_members_active_run_id_heartbeat_runs_id_fk": {
"name": "issue_tree_hold_members_active_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_tree_hold_members",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"active_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -39097,9 +39271,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_tree_holds_company_status_mode_idx": {
"name": "issue_tree_holds_company_status_mode_idx",
@@ -39124,89 +39298,89 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_tree_holds_company_id_companies_id_fk": {
"name": "issue_tree_holds_company_id_companies_id_fk",
"tableFrom": "issue_tree_holds",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_tree_holds_root_issue_id_issues_id_fk": {
"name": "issue_tree_holds_root_issue_id_issues_id_fk",
"tableFrom": "issue_tree_holds",
+ "tableTo": "issues",
"columnsFrom": [
"root_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_tree_holds_created_by_agent_id_agents_id_fk": {
"name": "issue_tree_holds_created_by_agent_id_agents_id_fk",
"tableFrom": "issue_tree_holds",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_tree_holds_created_by_run_id_heartbeat_runs_id_fk": {
"name": "issue_tree_holds_created_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_tree_holds",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"created_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_tree_holds_released_by_agent_id_agents_id_fk": {
"name": "issue_tree_holds_released_by_agent_id_agents_id_fk",
"tableFrom": "issue_tree_holds",
+ "tableTo": "agents",
"columnsFrom": [
"released_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_tree_holds_released_by_run_id_heartbeat_runs_id_fk": {
"name": "issue_tree_holds_released_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_tree_holds",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"released_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -39375,9 +39549,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_watchdogs_company_status_idx": {
"name": "issue_watchdogs_company_status_idx",
@@ -39396,9 +39570,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_watchdogs_company_agent_idx": {
"name": "issue_watchdogs_company_agent_idx",
@@ -39417,9 +39591,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_watchdogs_company_watchdog_issue_uq": {
"name": "issue_watchdogs_company_watchdog_issue_uq",
@@ -39438,116 +39612,116 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"issue_watchdogs\".\"watchdog_issue_id\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"issue_watchdogs_company_id_companies_id_fk": {
"name": "issue_watchdogs_company_id_companies_id_fk",
"tableFrom": "issue_watchdogs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_watchdogs_issue_id_issues_id_fk": {
"name": "issue_watchdogs_issue_id_issues_id_fk",
"tableFrom": "issue_watchdogs",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_watchdogs_watchdog_agent_id_agents_id_fk": {
"name": "issue_watchdogs_watchdog_agent_id_agents_id_fk",
"tableFrom": "issue_watchdogs",
+ "tableTo": "agents",
"columnsFrom": [
"watchdog_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_watchdogs_watchdog_issue_id_issues_id_fk": {
"name": "issue_watchdogs_watchdog_issue_id_issues_id_fk",
"tableFrom": "issue_watchdogs",
+ "tableTo": "issues",
"columnsFrom": [
"watchdog_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_watchdogs_created_by_agent_id_agents_id_fk": {
"name": "issue_watchdogs_created_by_agent_id_agents_id_fk",
"tableFrom": "issue_watchdogs",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_watchdogs_created_by_run_id_heartbeat_runs_id_fk": {
"name": "issue_watchdogs_created_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_watchdogs",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"created_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_watchdogs_updated_by_agent_id_agents_id_fk": {
"name": "issue_watchdogs_updated_by_agent_id_agents_id_fk",
"tableFrom": "issue_watchdogs",
+ "tableTo": "agents",
"columnsFrom": [
"updated_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_watchdogs_updated_by_run_id_heartbeat_runs_id_fk": {
"name": "issue_watchdogs_updated_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_watchdogs",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"updated_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -39717,9 +39891,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_work_products_company_execution_workspace_type_idx": {
"name": "issue_work_products_company_execution_workspace_type_idx",
@@ -39744,9 +39918,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_work_products_company_provider_external_id_idx": {
"name": "issue_work_products_company_provider_external_id_idx",
@@ -39771,9 +39945,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_work_products_company_updated_idx": {
"name": "issue_work_products_company_updated_idx",
@@ -39792,89 +39966,89 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_work_products_company_id_companies_id_fk": {
"name": "issue_work_products_company_id_companies_id_fk",
"tableFrom": "issue_work_products",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_work_products_project_id_projects_id_fk": {
"name": "issue_work_products_project_id_projects_id_fk",
"tableFrom": "issue_work_products",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_work_products_issue_id_issues_id_fk": {
"name": "issue_work_products_issue_id_issues_id_fk",
"tableFrom": "issue_work_products",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_work_products_execution_workspace_id_execution_workspaces_id_fk": {
"name": "issue_work_products_execution_workspace_id_execution_workspaces_id_fk",
"tableFrom": "issue_work_products",
+ "tableTo": "execution_workspaces",
"columnsFrom": [
"execution_workspace_id"
],
- "tableTo": "execution_workspaces",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_work_products_runtime_service_id_workspace_runtime_services_id_fk": {
"name": "issue_work_products_runtime_service_id_workspace_runtime_services_id_fk",
"tableFrom": "issue_work_products",
+ "tableTo": "workspace_runtime_services",
"columnsFrom": [
"runtime_service_id"
],
- "tableTo": "workspace_runtime_services",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_work_products_created_by_run_id_heartbeat_runs_id_fk": {
"name": "issue_work_products_created_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_work_products",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"created_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -40335,9 +40509,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_status_idx": {
"name": "issues_company_status_idx",
@@ -40356,9 +40530,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_harness_kind_idx": {
"name": "issues_company_harness_kind_idx",
@@ -40377,9 +40551,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_assignee_status_idx": {
"name": "issues_company_assignee_status_idx",
@@ -40404,9 +40578,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_assignee_user_status_idx": {
"name": "issues_company_assignee_user_status_idx",
@@ -40431,9 +40605,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_responsible_user_idx": {
"name": "issues_company_responsible_user_idx",
@@ -40452,9 +40626,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_parent_idx": {
"name": "issues_company_parent_idx",
@@ -40473,9 +40647,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_privacy_parent_idx": {
"name": "issues_company_privacy_parent_idx",
@@ -40494,9 +40668,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_privacy_root_idx": {
"name": "issues_company_privacy_root_idx",
@@ -40515,9 +40689,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_project_idx": {
"name": "issues_company_project_idx",
@@ -40536,9 +40710,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_origin_idx": {
"name": "issues_company_origin_idx",
@@ -40563,9 +40737,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_project_workspace_idx": {
"name": "issues_company_project_workspace_idx",
@@ -40584,9 +40758,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_execution_workspace_idx": {
"name": "issues_company_execution_workspace_idx",
@@ -40605,9 +40779,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_monitor_due_idx": {
"name": "issues_company_monitor_due_idx",
@@ -40626,9 +40800,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_updated_idx": {
"name": "issues_company_updated_idx",
@@ -40647,9 +40821,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_created_idx": {
"name": "issues_company_created_idx",
@@ -40668,9 +40842,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_open_normalized_title_created_idx": {
"name": "issues_open_normalized_title_created_idx",
@@ -40689,8 +40863,8 @@
},
{
"expression": "lower(regexp_replace(btrim(\"title\"), '\\s+', ' ', 'g'))",
- "isExpression": true,
"asc": true,
+ "isExpression": true,
"nulls": "last"
},
{
@@ -40701,10 +40875,10 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"issues\".\"hidden_at\" is null and \"issues\".\"status\" not in ('done', 'cancelled')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"issues_company_priority_idx": {
"name": "issues_company_priority_idx",
@@ -40723,9 +40897,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_identifier_idx": {
"name": "issues_identifier_idx",
@@ -40738,9 +40912,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_title_search_idx": {
"name": "issues_title_search_idx",
@@ -40754,9 +40928,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "gin",
- "concurrently": false
+ "with": {}
},
"issues_identifier_search_idx": {
"name": "issues_identifier_search_idx",
@@ -40770,9 +40944,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "gin",
- "concurrently": false
+ "with": {}
},
"issues_description_search_idx": {
"name": "issues_description_search_idx",
@@ -40786,9 +40960,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "gin",
- "concurrently": false
+ "with": {}
},
"issues_open_routine_execution_uq": {
"name": "issues_open_routine_execution_uq",
@@ -40819,10 +40993,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"issues\".\"origin_kind\" = 'routine_execution'\n and \"issues\".\"origin_id\" is not null\n and \"issues\".\"hidden_at\" is null\n and \"issues\".\"execution_run_id\" is not null\n and \"issues\".\"status\" in ('backlog', 'todo', 'in_progress', 'in_review', 'blocked')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"issues_active_liveness_recovery_incident_uq": {
"name": "issues_active_liveness_recovery_incident_uq",
@@ -40847,10 +41021,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"issues\".\"origin_kind\" = 'harness_liveness_escalation'\n and \"issues\".\"origin_id\" is not null\n and \"issues\".\"hidden_at\" is null\n and \"issues\".\"status\" not in ('done', 'cancelled')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"issues_active_liveness_recovery_leaf_uq": {
"name": "issues_active_liveness_recovery_leaf_uq",
@@ -40875,10 +41049,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"issues\".\"origin_kind\" = 'harness_liveness_escalation'\n and \"issues\".\"origin_fingerprint\" <> 'default'\n and \"issues\".\"hidden_at\" is null\n and \"issues\".\"status\" not in ('done', 'cancelled')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"issues_active_stale_run_evaluation_uq": {
"name": "issues_active_stale_run_evaluation_uq",
@@ -40903,10 +41077,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"issues\".\"origin_kind\" = 'stale_active_run_evaluation'\n and \"issues\".\"origin_id\" is not null\n and \"issues\".\"hidden_at\" is null\n and \"issues\".\"status\" not in ('done', 'cancelled')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"issues_active_task_watchdog_uq": {
"name": "issues_active_task_watchdog_uq",
@@ -40931,10 +41105,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"issues\".\"origin_kind\" = 'task_watchdog'\n and \"issues\".\"origin_id\" is not null\n and \"issues\".\"hidden_at\" is null\n and \"issues\".\"status\" not in ('done', 'cancelled')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"issues_active_productivity_review_uq": {
"name": "issues_active_productivity_review_uq",
@@ -40959,10 +41133,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"issues\".\"origin_kind\" = 'issue_productivity_review'\n and \"issues\".\"origin_id\" is not null\n and \"issues\".\"hidden_at\" is null\n and \"issues\".\"status\" not in ('done', 'cancelled')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"issues_active_stranded_issue_recovery_uq": {
"name": "issues_active_stranded_issue_recovery_uq",
@@ -40987,10 +41161,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"issues\".\"origin_kind\" = 'stranded_issue_recovery'\n and \"issues\".\"origin_id\" is not null\n and \"issues\".\"hidden_at\" is null\n and \"issues\".\"status\" not in ('done', 'cancelled')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"issues_onboarding_first_task_uq": {
"name": "issues_onboarding_first_task_uq",
@@ -41003,192 +41177,192 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"issues\".\"origin_kind\" = 'onboarding_first_task'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"issues_company_id_companies_id_fk": {
"name": "issues_company_id_companies_id_fk",
"tableFrom": "issues",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issues_conversation_agent_id_agents_id_fk": {
"name": "issues_conversation_agent_id_agents_id_fk",
"tableFrom": "issues",
+ "tableTo": "agents",
"columnsFrom": [
"conversation_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issues_project_id_projects_id_fk": {
"name": "issues_project_id_projects_id_fk",
"tableFrom": "issues",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issues_project_workspace_id_project_workspaces_id_fk": {
"name": "issues_project_workspace_id_project_workspaces_id_fk",
"tableFrom": "issues",
+ "tableTo": "project_workspaces",
"columnsFrom": [
"project_workspace_id"
],
- "tableTo": "project_workspaces",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issues_goal_id_goals_id_fk": {
"name": "issues_goal_id_goals_id_fk",
"tableFrom": "issues",
+ "tableTo": "goals",
"columnsFrom": [
"goal_id"
],
- "tableTo": "goals",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issues_parent_id_issues_id_fk": {
"name": "issues_parent_id_issues_id_fk",
"tableFrom": "issues",
+ "tableTo": "issues",
"columnsFrom": [
"parent_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issues_privacy_root_issue_id_issues_id_fk": {
"name": "issues_privacy_root_issue_id_issues_id_fk",
"tableFrom": "issues",
+ "tableTo": "issues",
"columnsFrom": [
"privacy_root_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issues_privacy_parent_issue_id_issues_id_fk": {
"name": "issues_privacy_parent_issue_id_issues_id_fk",
"tableFrom": "issues",
+ "tableTo": "issues",
"columnsFrom": [
"privacy_parent_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issues_assignee_agent_id_agents_id_fk": {
"name": "issues_assignee_agent_id_agents_id_fk",
"tableFrom": "issues",
+ "tableTo": "agents",
"columnsFrom": [
"assignee_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issues_checkout_run_id_heartbeat_runs_id_fk": {
"name": "issues_checkout_run_id_heartbeat_runs_id_fk",
"tableFrom": "issues",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"checkout_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issues_execution_run_id_heartbeat_runs_id_fk": {
"name": "issues_execution_run_id_heartbeat_runs_id_fk",
"tableFrom": "issues",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"execution_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issues_created_by_agent_id_agents_id_fk": {
"name": "issues_created_by_agent_id_agents_id_fk",
"tableFrom": "issues",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issues_execution_workspace_id_execution_workspaces_id_fk": {
"name": "issues_execution_workspace_id_execution_workspaces_id_fk",
"tableFrom": "issues",
+ "tableTo": "execution_workspaces",
"columnsFrom": [
"execution_workspace_id"
],
- "tableTo": "execution_workspaces",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"issues_company_id_uq": {
"name": "issues_company_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -41357,9 +41531,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"join_requests_company_status_type_created_idx": {
"name": "join_requests_company_status_type_created_idx",
@@ -41390,9 +41564,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"join_requests_pending_human_user_uq": {
"name": "join_requests_pending_human_user_uq",
@@ -41411,10 +41585,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"join_requests\".\"request_type\" = 'human' AND \"join_requests\".\"status\" = 'pending_approval' AND \"join_requests\".\"requesting_user_id\" IS NOT NULL",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"join_requests_pending_human_email_uq": {
"name": "join_requests_pending_human_email_uq",
@@ -41427,57 +41601,57 @@
},
{
"expression": "lower(\"request_email_snapshot\")",
- "isExpression": true,
"asc": true,
+ "isExpression": true,
"nulls": "last"
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"join_requests\".\"request_type\" = 'human' AND \"join_requests\".\"status\" = 'pending_approval' AND \"join_requests\".\"request_email_snapshot\" IS NOT NULL",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"join_requests_invite_id_invites_id_fk": {
"name": "join_requests_invite_id_invites_id_fk",
"tableFrom": "join_requests",
+ "tableTo": "invites",
"columnsFrom": [
"invite_id"
],
- "tableTo": "invites",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"join_requests_company_id_companies_id_fk": {
"name": "join_requests_company_id_companies_id_fk",
"tableFrom": "join_requests",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"join_requests_created_agent_id_agents_id_fk": {
"name": "join_requests_created_agent_id_agents_id_fk",
"tableFrom": "join_requests",
+ "tableTo": "agents",
"columnsFrom": [
"created_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -41542,9 +41716,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"labels_company_name_idx": {
"name": "labels_company_name_idx",
@@ -41563,24 +41737,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"labels_company_id_companies_id_fk": {
"name": "labels_company_id_companies_id_fk",
"tableFrom": "labels",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -41730,9 +41904,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"managed_agent_profiles_company_key_uq": {
"name": "managed_agent_profiles_company_key_uq",
@@ -41751,9 +41925,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"managed_agent_profiles_company_resource_uq": {
"name": "managed_agent_profiles_company_resource_uq",
@@ -41784,37 +41958,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"managed_agent_profiles_company_id_companies_id_fk": {
"name": "managed_agent_profiles_company_id_companies_id_fk",
"tableFrom": "managed_agent_profiles",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"managed_agent_profiles_api_key_secret_id_company_secrets_id_fk": {
"name": "managed_agent_profiles_api_key_secret_id_company_secrets_id_fk",
"tableFrom": "managed_agent_profiles",
+ "tableTo": "company_secrets",
"columnsFrom": [
"api_key_secret_id"
],
- "tableTo": "company_secrets",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -42000,99 +42174,100 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"native_run_finalizations\".\"control_deadline_at\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"native_run_finalizations_company_id_companies_id_fk": {
"name": "native_run_finalizations_company_id_companies_id_fk",
"tableFrom": "native_run_finalizations",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"native_run_finalizations_issue_company_fk": {
"name": "native_run_finalizations_issue_company_fk",
"tableFrom": "native_run_finalizations",
+ "tableTo": "issues",
"columnsFrom": [
"company_id",
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"native_run_finalizations_run_owner_fk": {
"name": "native_run_finalizations_run_owner_fk",
"tableFrom": "native_run_finalizations",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"company_id",
"issue_id",
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"company_id",
"native_issue_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"native_run_finalizations_result_owner_fk": {
"name": "native_run_finalizations_result_owner_fk",
"tableFrom": "native_run_finalizations",
+ "tableTo": "native_run_results",
"columnsFrom": [
"company_id",
"issue_id",
"run_id",
"result_id"
],
- "tableTo": "native_run_results",
"columnsTo": [
"company_id",
"issue_id",
"run_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"native_run_finalizations_assessment_owner_fk": {
"name": "native_run_finalizations_assessment_owner_fk",
"tableFrom": "native_run_finalizations",
+ "tableTo": "work_assessments",
"columnsFrom": [
"company_id",
"issue_id",
"run_id",
"assessment_id"
],
- "tableTo": "work_assessments",
"columnsTo": [
"company_id",
"issue_id",
"run_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"native_run_finalizations_decision_owner_fk": {
"name": "native_run_finalizations_decision_owner_fk",
"tableFrom": "native_run_finalizations",
+ "tableTo": "status_decisions",
"columnsFrom": [
"company_id",
"issue_id",
@@ -42100,7 +42275,6 @@
"assessment_id",
"decision_id"
],
- "tableTo": "status_decisions",
"columnsTo": [
"company_id",
"issue_id",
@@ -42108,8 +42282,8 @@
"assessment_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -42236,9 +42410,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"native_run_results_run_caller_result_uq": {
"name": "native_run_results_run_caller_result_uq",
@@ -42257,9 +42431,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"native_run_results_run_caller_dedupe_uq": {
"name": "native_run_results_run_caller_dedupe_uq",
@@ -42278,88 +42452,88 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"native_run_results_company_id_companies_id_fk": {
"name": "native_run_results_company_id_companies_id_fk",
"tableFrom": "native_run_results",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"native_run_results_issue_company_fk": {
"name": "native_run_results_issue_company_fk",
"tableFrom": "native_run_results",
+ "tableTo": "issues",
"columnsFrom": [
"company_id",
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"native_run_results_run_contract_owner_fk": {
"name": "native_run_results_run_contract_owner_fk",
"tableFrom": "native_run_results",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"company_id",
"issue_id",
"run_id",
"completion_contract_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"company_id",
"native_issue_id",
"id",
"completion_contract_id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"native_run_results_completion_contract_owner_fk": {
"name": "native_run_results_completion_contract_owner_fk",
"tableFrom": "native_run_results",
+ "tableTo": "completion_contracts",
"columnsFrom": [
"company_id",
"issue_id",
"completion_contract_id"
],
- "tableTo": "completion_contracts",
"columnsTo": [
"company_id",
"issue_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"native_run_results_company_issue_run_id_uq": {
"name": "native_run_results_company_issue_run_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"issue_id",
"run_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -42477,9 +42651,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_automation_executions_company_case_idx": {
"name": "pipeline_automation_executions_company_case_idx",
@@ -42498,9 +42672,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_automation_executions_routine_idx": {
"name": "pipeline_automation_executions_routine_idx",
@@ -42513,9 +42687,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_automation_executions_execution_issue_idx": {
"name": "pipeline_automation_executions_execution_issue_idx",
@@ -42528,9 +42702,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_automation_executions_retry_of_execution_idx": {
"name": "pipeline_automation_executions_retry_of_execution_idx",
@@ -42543,63 +42717,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"pipeline_automation_executions_company_id_companies_id_fk": {
"name": "pipeline_automation_executions_company_id_companies_id_fk",
"tableFrom": "pipeline_automation_executions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_automation_executions_case_id_pipeline_cases_id_fk": {
"name": "pipeline_automation_executions_case_id_pipeline_cases_id_fk",
"tableFrom": "pipeline_automation_executions",
+ "tableTo": "pipeline_cases",
"columnsFrom": [
"case_id"
],
- "tableTo": "pipeline_cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_automation_executions_routine_id_routines_id_fk": {
"name": "pipeline_automation_executions_routine_id_routines_id_fk",
"tableFrom": "pipeline_automation_executions",
+ "tableTo": "routines",
"columnsFrom": [
"routine_id"
],
- "tableTo": "routines",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_automation_executions_execution_issue_id_issues_id_fk": {
"name": "pipeline_automation_executions_execution_issue_id_issues_id_fk",
"tableFrom": "pipeline_automation_executions",
+ "tableTo": "issues",
"columnsFrom": [
"execution_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -42675,9 +42849,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_case_blockers_blocked_by_idx": {
"name": "pipeline_case_blockers_blocked_by_idx",
@@ -42690,9 +42864,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_case_blockers_company_case_idx": {
"name": "pipeline_case_blockers_company_case_idx",
@@ -42711,50 +42885,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"pipeline_case_blockers_company_id_companies_id_fk": {
"name": "pipeline_case_blockers_company_id_companies_id_fk",
"tableFrom": "pipeline_case_blockers",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_case_blockers_case_id_pipeline_cases_id_fk": {
"name": "pipeline_case_blockers_case_id_pipeline_cases_id_fk",
"tableFrom": "pipeline_case_blockers",
+ "tableTo": "pipeline_cases",
"columnsFrom": [
"case_id"
],
- "tableTo": "pipeline_cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_case_blockers_blocked_by_case_id_pipeline_cases_id_fk": {
"name": "pipeline_case_blockers_blocked_by_case_id_pipeline_cases_id_fk",
"tableFrom": "pipeline_case_blockers",
+ "tableTo": "pipeline_cases",
"columnsFrom": [
"blocked_by_case_id"
],
- "tableTo": "pipeline_cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -42842,9 +43016,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_case_documents_document_uq": {
"name": "pipeline_case_documents_document_uq",
@@ -42857,9 +43031,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_case_documents_company_case_updated_idx": {
"name": "pipeline_case_documents_company_case_updated_idx",
@@ -42884,50 +43058,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"pipeline_case_documents_company_id_companies_id_fk": {
"name": "pipeline_case_documents_company_id_companies_id_fk",
"tableFrom": "pipeline_case_documents",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_case_documents_case_id_pipeline_cases_id_fk": {
"name": "pipeline_case_documents_case_id_pipeline_cases_id_fk",
"tableFrom": "pipeline_case_documents",
+ "tableTo": "pipeline_cases",
"columnsFrom": [
"case_id"
],
- "tableTo": "pipeline_cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_case_documents_document_id_documents_id_fk": {
"name": "pipeline_case_documents_document_id_documents_id_fk",
"tableFrom": "pipeline_case_documents",
+ "tableTo": "documents",
"columnsFrom": [
"document_id"
],
- "tableTo": "documents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -43041,9 +43215,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_case_events_company_case_idx": {
"name": "pipeline_case_events_company_case_idx",
@@ -43062,76 +43236,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"pipeline_case_events_company_id_companies_id_fk": {
"name": "pipeline_case_events_company_id_companies_id_fk",
"tableFrom": "pipeline_case_events",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_case_events_case_id_pipeline_cases_id_fk": {
"name": "pipeline_case_events_case_id_pipeline_cases_id_fk",
"tableFrom": "pipeline_case_events",
+ "tableTo": "pipeline_cases",
"columnsFrom": [
"case_id"
],
- "tableTo": "pipeline_cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_case_events_actor_agent_id_agents_id_fk": {
"name": "pipeline_case_events_actor_agent_id_agents_id_fk",
"tableFrom": "pipeline_case_events",
+ "tableTo": "agents",
"columnsFrom": [
"actor_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"pipeline_case_events_from_stage_id_pipeline_stages_id_fk": {
"name": "pipeline_case_events_from_stage_id_pipeline_stages_id_fk",
"tableFrom": "pipeline_case_events",
+ "tableTo": "pipeline_stages",
"columnsFrom": [
"from_stage_id"
],
- "tableTo": "pipeline_stages",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"pipeline_case_events_to_stage_id_pipeline_stages_id_fk": {
"name": "pipeline_case_events_to_stage_id_pipeline_stages_id_fk",
"tableFrom": "pipeline_case_events",
+ "tableTo": "pipeline_stages",
"columnsFrom": [
"to_stage_id"
],
- "tableTo": "pipeline_stages",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -43251,9 +43425,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_case_issue_links_issue_idx": {
"name": "pipeline_case_issue_links_issue_idx",
@@ -43266,9 +43440,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_case_issue_links_company_case_idx": {
"name": "pipeline_case_issue_links_company_case_idx",
@@ -43287,9 +43461,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_case_issue_links_automation_attempt_idx": {
"name": "pipeline_case_issue_links_automation_attempt_idx",
@@ -43302,50 +43476,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"pipeline_case_issue_links_company_id_companies_id_fk": {
"name": "pipeline_case_issue_links_company_id_companies_id_fk",
"tableFrom": "pipeline_case_issue_links",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_case_issue_links_case_id_pipeline_cases_id_fk": {
"name": "pipeline_case_issue_links_case_id_pipeline_cases_id_fk",
"tableFrom": "pipeline_case_issue_links",
+ "tableTo": "pipeline_cases",
"columnsFrom": [
"case_id"
],
- "tableTo": "pipeline_cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_case_issue_links_issue_id_issues_id_fk": {
"name": "pipeline_case_issue_links_issue_id_issues_id_fk",
"tableFrom": "pipeline_case_issue_links",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -43587,9 +43761,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_cases_parent_request_key_uq": {
"name": "pipeline_cases_parent_request_key_uq",
@@ -43608,10 +43782,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"pipeline_cases\".\"request_key\" is not null and \"pipeline_cases\".\"retired_at\" is null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"pipeline_cases_company_idx": {
"name": "pipeline_cases_company_idx",
@@ -43624,9 +43798,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_cases_pipeline_stage_idx": {
"name": "pipeline_cases_pipeline_stage_idx",
@@ -43645,9 +43819,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_cases_parent_idx": {
"name": "pipeline_cases_parent_idx",
@@ -43660,9 +43834,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_cases_automation_attempt_idx": {
"name": "pipeline_cases_automation_attempt_idx",
@@ -43675,9 +43849,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_cases_retired_idx": {
"name": "pipeline_cases_retired_idx",
@@ -43696,9 +43870,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_cases_lease_expires_idx": {
"name": "pipeline_cases_lease_expires_idx",
@@ -43711,90 +43885,90 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"pipeline_cases\".\"lease_expires_at\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"pipeline_cases_company_id_companies_id_fk": {
"name": "pipeline_cases_company_id_companies_id_fk",
"tableFrom": "pipeline_cases",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_cases_pipeline_id_pipelines_id_fk": {
"name": "pipeline_cases_pipeline_id_pipelines_id_fk",
"tableFrom": "pipeline_cases",
+ "tableTo": "pipelines",
"columnsFrom": [
"pipeline_id"
],
- "tableTo": "pipelines",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_cases_stage_id_pipeline_stages_id_fk": {
"name": "pipeline_cases_stage_id_pipeline_stages_id_fk",
"tableFrom": "pipeline_cases",
+ "tableTo": "pipeline_stages",
"columnsFrom": [
"stage_id"
],
- "tableTo": "pipeline_stages",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"pipeline_cases_parent_case_id_pipeline_cases_id_fk": {
"name": "pipeline_cases_parent_case_id_pipeline_cases_id_fk",
"tableFrom": "pipeline_cases",
+ "tableTo": "pipeline_cases",
"columnsFrom": [
"parent_case_id"
],
- "tableTo": "pipeline_cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"pipeline_cases_lease_agent_id_agents_id_fk": {
"name": "pipeline_cases_lease_agent_id_agents_id_fk",
"tableFrom": "pipeline_cases",
+ "tableTo": "agents",
"columnsFrom": [
"lease_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"pipeline_cases_created_by_agent_id_agents_id_fk": {
"name": "pipeline_cases_created_by_agent_id_agents_id_fk",
"tableFrom": "pipeline_cases",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -43886,9 +44060,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_documents_document_uq": {
"name": "pipeline_documents_document_uq",
@@ -43901,9 +44075,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_documents_company_pipeline_updated_idx": {
"name": "pipeline_documents_company_pipeline_updated_idx",
@@ -43928,50 +44102,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"pipeline_documents_company_id_companies_id_fk": {
"name": "pipeline_documents_company_id_companies_id_fk",
"tableFrom": "pipeline_documents",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_documents_pipeline_id_pipelines_id_fk": {
"name": "pipeline_documents_pipeline_id_pipelines_id_fk",
"tableFrom": "pipeline_documents",
+ "tableTo": "pipelines",
"columnsFrom": [
"pipeline_id"
],
- "tableTo": "pipelines",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_documents_document_id_documents_id_fk": {
"name": "pipeline_documents_document_id_documents_id_fk",
"tableFrom": "pipeline_documents",
+ "tableTo": "documents",
"columnsFrom": [
"document_id"
],
- "tableTo": "documents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -44061,9 +44235,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_stages_pipeline_position_idx": {
"name": "pipeline_stages_pipeline_position_idx",
@@ -44082,24 +44256,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"pipeline_stages_pipeline_id_pipelines_id_fk": {
"name": "pipeline_stages_pipeline_id_pipelines_id_fk",
"tableFrom": "pipeline_stages",
+ "tableTo": "pipelines",
"columnsFrom": [
"pipeline_id"
],
- "tableTo": "pipelines",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -44187,9 +44361,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_transitions_pipeline_from_idx": {
"name": "pipeline_transitions_pipeline_from_idx",
@@ -44208,9 +44382,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_transitions_pipeline_to_idx": {
"name": "pipeline_transitions_pipeline_to_idx",
@@ -44229,50 +44403,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"pipeline_transitions_pipeline_id_pipelines_id_fk": {
"name": "pipeline_transitions_pipeline_id_pipelines_id_fk",
"tableFrom": "pipeline_transitions",
+ "tableTo": "pipelines",
"columnsFrom": [
"pipeline_id"
],
- "tableTo": "pipelines",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_transitions_from_stage_id_pipeline_stages_id_fk": {
"name": "pipeline_transitions_from_stage_id_pipeline_stages_id_fk",
"tableFrom": "pipeline_transitions",
+ "tableTo": "pipeline_stages",
"columnsFrom": [
"from_stage_id"
],
- "tableTo": "pipeline_stages",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_transitions_to_stage_id_pipeline_stages_id_fk": {
"name": "pipeline_transitions_to_stage_id_pipeline_stages_id_fk",
"tableFrom": "pipeline_transitions",
+ "tableTo": "pipeline_stages",
"columnsFrom": [
"to_stage_id"
],
- "tableTo": "pipeline_stages",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -44380,9 +44554,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipelines_company_idx": {
"name": "pipelines_company_idx",
@@ -44395,9 +44569,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipelines_company_project_idx": {
"name": "pipelines_company_project_idx",
@@ -44416,50 +44590,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"pipelines_company_id_companies_id_fk": {
"name": "pipelines_company_id_companies_id_fk",
"tableFrom": "pipelines",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipelines_project_id_projects_id_fk": {
"name": "pipelines_project_id_projects_id_fk",
"tableFrom": "pipelines",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"pipelines_created_by_agent_id_agents_id_fk": {
"name": "pipelines_created_by_agent_id_agents_id_fk",
"tableFrom": "pipelines",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -44538,9 +44712,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_company_settings_plugin_idx": {
"name": "plugin_company_settings_plugin_idx",
@@ -44553,9 +44727,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_company_settings_company_plugin_uq": {
"name": "plugin_company_settings_company_plugin_uq",
@@ -44574,37 +44748,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"plugin_company_settings_company_id_companies_id_fk": {
"name": "plugin_company_settings_company_id_companies_id_fk",
"tableFrom": "plugin_company_settings",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"plugin_company_settings_plugin_id_plugins_id_fk": {
"name": "plugin_company_settings_plugin_id_plugins_id_fk",
"tableFrom": "plugin_company_settings",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -44682,37 +44856,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"plugin_config_plugin_id_plugins_id_fk": {
"name": "plugin_config_plugin_id_plugins_id_fk",
"tableFrom": "plugin_config",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"plugin_config_company_id_companies_id_fk": {
"name": "plugin_config_company_id_companies_id_fk",
"tableFrom": "plugin_config",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -44791,9 +44965,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_database_namespaces_namespace_idx": {
"name": "plugin_database_namespaces_namespace_idx",
@@ -44806,9 +44980,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_database_namespaces_status_idx": {
"name": "plugin_database_namespaces_status_idx",
@@ -44821,24 +44995,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"plugin_database_namespaces_plugin_id_plugins_id_fk": {
"name": "plugin_database_namespaces_plugin_id_plugins_id_fk",
"tableFrom": "plugin_database_namespaces",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -44940,9 +45114,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_entities_company_idx": {
"name": "plugin_entities_company_idx",
@@ -44955,9 +45129,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_entities_type_idx": {
"name": "plugin_entities_type_idx",
@@ -44970,9 +45144,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_entities_scope_idx": {
"name": "plugin_entities_scope_idx",
@@ -44991,50 +45165,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"plugin_entities_plugin_id_plugins_id_fk": {
"name": "plugin_entities_plugin_id_plugins_id_fk",
"tableFrom": "plugin_entities",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"plugin_entities_company_id_companies_id_fk": {
"name": "plugin_entities_company_id_companies_id_fk",
"tableFrom": "plugin_entities",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"plugin_entities_external_idx": {
"name": "plugin_entities_external_idx",
+ "nullsNotDistinct": true,
"columns": [
"company_id",
"plugin_id",
"entity_type",
"external_id"
- ],
- "nullsNotDistinct": true
+ ]
}
},
"policies": {},
@@ -45134,9 +45308,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_job_runs_plugin_idx": {
"name": "plugin_job_runs_plugin_idx",
@@ -45149,9 +45323,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_job_runs_company_idx": {
"name": "plugin_job_runs_company_idx",
@@ -45164,9 +45338,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_job_runs_status_idx": {
"name": "plugin_job_runs_status_idx",
@@ -45179,50 +45353,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"plugin_job_runs_job_id_plugin_jobs_id_fk": {
"name": "plugin_job_runs_job_id_plugin_jobs_id_fk",
"tableFrom": "plugin_job_runs",
+ "tableTo": "plugin_jobs",
"columnsFrom": [
"job_id"
],
- "tableTo": "plugin_jobs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"plugin_job_runs_plugin_id_plugins_id_fk": {
"name": "plugin_job_runs_plugin_id_plugins_id_fk",
"tableFrom": "plugin_job_runs",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"plugin_job_runs_company_id_companies_id_fk": {
"name": "plugin_job_runs_company_id_companies_id_fk",
"tableFrom": "plugin_job_runs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -45306,9 +45480,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_jobs_next_run_idx": {
"name": "plugin_jobs_next_run_idx",
@@ -45321,9 +45495,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_jobs_unique_idx": {
"name": "plugin_jobs_unique_idx",
@@ -45342,24 +45516,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"plugin_jobs_plugin_id_plugins_id_fk": {
"name": "plugin_jobs_plugin_id_plugins_id_fk",
"tableFrom": "plugin_jobs",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -45404,37 +45578,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"plugin_lifecycle_acknowledgments_plugin_id_plugins_id_fk": {
"name": "plugin_lifecycle_acknowledgments_plugin_id_plugins_id_fk",
"tableFrom": "plugin_lifecycle_acknowledgments",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"plugin_lifecycle_acknowledgments_event_id_resource_lifecycle_events_id_fk": {
"name": "plugin_lifecycle_acknowledgments_event_id_resource_lifecycle_events_id_fk",
"tableFrom": "plugin_lifecycle_acknowledgments",
+ "tableTo": "resource_lifecycle_events",
"columnsFrom": [
"event_id"
],
- "tableTo": "resource_lifecycle_events",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {
@@ -45519,9 +45693,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_logs_company_idx": {
"name": "plugin_logs_company_idx",
@@ -45534,9 +45708,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_logs_level_idx": {
"name": "plugin_logs_level_idx",
@@ -45549,37 +45723,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"plugin_logs_plugin_id_plugins_id_fk": {
"name": "plugin_logs_plugin_id_plugins_id_fk",
"tableFrom": "plugin_logs",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"plugin_logs_company_id_companies_id_fk": {
"name": "plugin_logs_company_id_companies_id_fk",
"tableFrom": "plugin_logs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -45669,9 +45843,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_managed_resources_plugin_idx": {
"name": "plugin_managed_resources_plugin_idx",
@@ -45684,9 +45858,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_managed_resources_resource_idx": {
"name": "plugin_managed_resources_resource_idx",
@@ -45705,9 +45879,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_managed_resources_company_plugin_resource_uq": {
"name": "plugin_managed_resources_company_plugin_resource_uq",
@@ -45738,37 +45912,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"plugin_managed_resources_company_id_companies_id_fk": {
"name": "plugin_managed_resources_company_id_companies_id_fk",
"tableFrom": "plugin_managed_resources",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"plugin_managed_resources_plugin_id_plugins_id_fk": {
"name": "plugin_managed_resources_plugin_id_plugins_id_fk",
"tableFrom": "plugin_managed_resources",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -45868,9 +46042,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_migrations_plugin_idx": {
"name": "plugin_migrations_plugin_idx",
@@ -45883,9 +46057,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_migrations_status_idx": {
"name": "plugin_migrations_status_idx",
@@ -45898,24 +46072,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"plugin_migrations_plugin_id_plugins_id_fk": {
"name": "plugin_migrations_plugin_id_plugins_id_fk",
"tableFrom": "plugin_migrations",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -45998,38 +46172,38 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"plugin_state_plugin_id_plugins_id_fk": {
"name": "plugin_state_plugin_id_plugins_id_fk",
"tableFrom": "plugin_state",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"plugin_state_unique_entry_idx": {
"name": "plugin_state_unique_entry_idx",
+ "nullsNotDistinct": true,
"columns": [
"plugin_id",
"scope_kind",
"scope_id",
"namespace",
"state_key"
- ],
- "nullsNotDistinct": true
+ ]
}
},
"policies": {},
@@ -46135,9 +46309,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_webhook_deliveries_company_idx": {
"name": "plugin_webhook_deliveries_company_idx",
@@ -46150,9 +46324,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_webhook_deliveries_status_idx": {
"name": "plugin_webhook_deliveries_status_idx",
@@ -46165,9 +46339,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_webhook_deliveries_key_idx": {
"name": "plugin_webhook_deliveries_key_idx",
@@ -46180,37 +46354,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"plugin_webhook_deliveries_plugin_id_plugins_id_fk": {
"name": "plugin_webhook_deliveries_plugin_id_plugins_id_fk",
"tableFrom": "plugin_webhook_deliveries",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"plugin_webhook_deliveries_company_id_companies_id_fk": {
"name": "plugin_webhook_deliveries_company_id_companies_id_fk",
"tableFrom": "plugin_webhook_deliveries",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -46320,9 +46494,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugins_status_idx": {
"name": "plugins_status_idx",
@@ -46335,9 +46509,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {},
@@ -46439,9 +46613,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"principal_permission_grants_company_permission_idx": {
"name": "principal_permission_grants_company_permission_idx",
@@ -46460,24 +46634,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"principal_permission_grants_company_id_companies_id_fk": {
"name": "principal_permission_grants_company_id_companies_id_fk",
"tableFrom": "principal_permission_grants",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -46553,9 +46727,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"project_access_members_subject_lookup_idx": {
"name": "project_access_members_subject_lookup_idx",
@@ -46586,37 +46760,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"project_access_members_company_id_companies_id_fk": {
"name": "project_access_members_company_id_companies_id_fk",
"tableFrom": "project_access_members",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"project_access_members_project_id_projects_id_fk": {
"name": "project_access_members_project_id_projects_id_fk",
"tableFrom": "project_access_members",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -46679,9 +46853,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"project_goals_goal_idx": {
"name": "project_goals_goal_idx",
@@ -46694,9 +46868,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"project_goals_company_idx": {
"name": "project_goals_company_idx",
@@ -46709,50 +46883,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"project_goals_project_id_projects_id_fk": {
"name": "project_goals_project_id_projects_id_fk",
"tableFrom": "project_goals",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"project_goals_goal_id_goals_id_fk": {
"name": "project_goals_goal_id_goals_id_fk",
"tableFrom": "project_goals",
+ "tableTo": "goals",
"columnsFrom": [
"goal_id"
],
- "tableTo": "goals",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"project_goals_company_id_companies_id_fk": {
"name": "project_goals_company_id_companies_id_fk",
"tableFrom": "project_goals",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {
@@ -46844,9 +47018,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"project_memberships_company_user_starred_idx": {
"name": "project_memberships_company_user_starred_idx",
@@ -46871,9 +47045,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"project_memberships_project_idx": {
"name": "project_memberships_project_idx",
@@ -46886,9 +47060,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"project_memberships_company_user_project_uq": {
"name": "project_memberships_company_user_project_uq",
@@ -46913,37 +47087,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"project_memberships_company_id_companies_id_fk": {
"name": "project_memberships_company_id_companies_id_fk",
"tableFrom": "project_memberships",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"project_memberships_project_id_projects_id_fk": {
"name": "project_memberships_project_id_projects_id_fk",
"tableFrom": "project_memberships",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -47095,9 +47269,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"project_workspaces_project_primary_idx": {
"name": "project_workspaces_project_primary_idx",
@@ -47116,9 +47290,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"project_workspaces_project_source_type_idx": {
"name": "project_workspaces_project_source_type_idx",
@@ -47137,9 +47311,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"project_workspaces_company_shared_key_idx": {
"name": "project_workspaces_company_shared_key_idx",
@@ -47158,9 +47332,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"project_workspaces_project_remote_ref_idx": {
"name": "project_workspaces_project_remote_ref_idx",
@@ -47185,37 +47359,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"project_workspaces_company_id_companies_id_fk": {
"name": "project_workspaces_company_id_companies_id_fk",
"tableFrom": "project_workspaces",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"project_workspaces_project_id_projects_id_fk": {
"name": "project_workspaces_project_id_projects_id_fk",
"tableFrom": "project_workspaces",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -47355,6 +47529,27 @@
}
},
"indexes": {
+ "projects_company_id_uq": {
+ "name": "projects_company_id_uq",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
"projects_company_idx": {
"name": "projects_company_idx",
"columns": [
@@ -47366,9 +47561,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"projects_company_personal_owner_uq": {
"name": "projects_company_personal_owner_uq",
@@ -47387,51 +47582,51 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"projects\".\"personal_owner_user_id\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"projects_company_id_companies_id_fk": {
"name": "projects_company_id_companies_id_fk",
"tableFrom": "projects",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"projects_goal_id_goals_id_fk": {
"name": "projects_goal_id_goals_id_fk",
"tableFrom": "projects",
+ "tableTo": "goals",
"columnsFrom": [
"goal_id"
],
- "tableTo": "goals",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"projects_lead_agent_id_agents_id_fk": {
"name": "projects_lead_agent_id_agents_id_fk",
"tableFrom": "projects",
+ "tableTo": "agents",
"columnsFrom": [
"lead_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -47558,9 +47753,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"provider_trace_records_expiry_idx": {
"name": "provider_trace_records_expiry_idx",
@@ -47579,9 +47774,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"provider_trace_records_company_created_idx": {
"name": "provider_trace_records_company_created_idx",
@@ -47600,37 +47795,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"provider_trace_records_company_id_companies_id_fk": {
"name": "provider_trace_records_company_id_companies_id_fk",
"tableFrom": "provider_trace_records",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"provider_trace_records_run_id_heartbeat_runs_id_fk": {
"name": "provider_trace_records_run_id_heartbeat_runs_id_fk",
"tableFrom": "provider_trace_records",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -47741,9 +47936,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"remote_agent_profiles_company_key_uq": {
"name": "remote_agent_profiles_company_key_uq",
@@ -47762,24 +47957,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"remote_agent_profiles_company_id_companies_id_fk": {
"name": "remote_agent_profiles_company_id_companies_id_fk",
"tableFrom": "remote_agent_profiles",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -47807,15 +48002,15 @@
"primaryKey": true,
"notNull": true,
"identity": {
+ "type": "always",
"name": "resource_lifecycle_events_id_seq",
+ "schema": "public",
"increment": "1",
+ "startWith": "1",
"minValue": "1",
"maxValue": "9223372036854775807",
- "startWith": "1",
"cache": "1",
- "cycle": false,
- "schema": "public",
- "type": "always"
+ "cycle": false
}
},
"company_id": {
@@ -47874,10 +48069,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"resource_lifecycle_events\".\"action\" = 'create'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"resource_lifecycle_events_company_idx": {
"name": "resource_lifecycle_events_company_idx",
@@ -47896,9 +48091,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"resource_lifecycle_events_resource_order_idx": {
"name": "resource_lifecycle_events_resource_order_idx",
@@ -47929,24 +48124,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"resource_lifecycle_events_company_id_companies_id_fk": {
"name": "resource_lifecycle_events_company_id_companies_id_fk",
"tableFrom": "resource_lifecycle_events",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -48038,9 +48233,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routine_documents_document_uq": {
"name": "routine_documents_document_uq",
@@ -48053,9 +48248,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routine_documents_company_routine_updated_idx": {
"name": "routine_documents_company_routine_updated_idx",
@@ -48080,50 +48275,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"routine_documents_company_id_companies_id_fk": {
"name": "routine_documents_company_id_companies_id_fk",
"tableFrom": "routine_documents",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"routine_documents_routine_id_routines_id_fk": {
"name": "routine_documents_routine_id_routines_id_fk",
"tableFrom": "routine_documents",
+ "tableTo": "routines",
"columnsFrom": [
"routine_id"
],
- "tableTo": "routines",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"routine_documents_document_id_documents_id_fk": {
"name": "routine_documents_document_id_documents_id_fk",
"tableFrom": "routine_documents",
+ "tableTo": "documents",
"columnsFrom": [
"document_id"
],
- "tableTo": "documents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -48241,9 +48436,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routine_revisions_company_routine_created_idx": {
"name": "routine_revisions_company_routine_created_idx",
@@ -48268,9 +48463,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routine_revisions_company_responsible_user_idx": {
"name": "routine_revisions_company_responsible_user_idx",
@@ -48295,76 +48490,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"routine_revisions_company_id_companies_id_fk": {
"name": "routine_revisions_company_id_companies_id_fk",
"tableFrom": "routine_revisions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"routine_revisions_routine_id_routines_id_fk": {
"name": "routine_revisions_routine_id_routines_id_fk",
"tableFrom": "routine_revisions",
+ "tableTo": "routines",
"columnsFrom": [
"routine_id"
],
- "tableTo": "routines",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"routine_revisions_restored_from_revision_id_routine_revisions_id_fk": {
"name": "routine_revisions_restored_from_revision_id_routine_revisions_id_fk",
"tableFrom": "routine_revisions",
+ "tableTo": "routine_revisions",
"columnsFrom": [
"restored_from_revision_id"
],
- "tableTo": "routine_revisions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"routine_revisions_created_by_agent_id_agents_id_fk": {
"name": "routine_revisions_created_by_agent_id_agents_id_fk",
"tableFrom": "routine_revisions",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"routine_revisions_created_by_run_id_heartbeat_runs_id_fk": {
"name": "routine_revisions_created_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "routine_revisions",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"created_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -48515,9 +48710,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routine_runs_revision_idx": {
"name": "routine_runs_revision_idx",
@@ -48530,9 +48725,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routine_runs_company_responsible_user_idx": {
"name": "routine_runs_company_responsible_user_idx",
@@ -48557,9 +48752,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routine_runs_trigger_idx": {
"name": "routine_runs_trigger_idx",
@@ -48578,9 +48773,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routine_runs_dispatch_fingerprint_idx": {
"name": "routine_runs_dispatch_fingerprint_idx",
@@ -48599,9 +48794,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routine_runs_linked_issue_idx": {
"name": "routine_runs_linked_issue_idx",
@@ -48614,9 +48809,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routine_runs_trigger_idempotency_idx": {
"name": "routine_runs_trigger_idempotency_idx",
@@ -48635,76 +48830,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"routine_runs_company_id_companies_id_fk": {
"name": "routine_runs_company_id_companies_id_fk",
"tableFrom": "routine_runs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"routine_runs_routine_id_routines_id_fk": {
"name": "routine_runs_routine_id_routines_id_fk",
"tableFrom": "routine_runs",
+ "tableTo": "routines",
"columnsFrom": [
"routine_id"
],
- "tableTo": "routines",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"routine_runs_trigger_id_routine_triggers_id_fk": {
"name": "routine_runs_trigger_id_routine_triggers_id_fk",
"tableFrom": "routine_runs",
+ "tableTo": "routine_triggers",
"columnsFrom": [
"trigger_id"
],
- "tableTo": "routine_triggers",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"routine_runs_routine_revision_id_routine_revisions_id_fk": {
"name": "routine_runs_routine_revision_id_routine_revisions_id_fk",
"tableFrom": "routine_runs",
+ "tableTo": "routine_revisions",
"columnsFrom": [
"routine_revision_id"
],
- "tableTo": "routine_revisions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"routine_runs_linked_issue_id_issues_id_fk": {
"name": "routine_runs_linked_issue_id_issues_id_fk",
"tableFrom": "routine_runs",
+ "tableTo": "issues",
"columnsFrom": [
"linked_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -48892,9 +49087,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routine_triggers_company_kind_idx": {
"name": "routine_triggers_company_kind_idx",
@@ -48913,9 +49108,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routine_triggers_next_run_idx": {
"name": "routine_triggers_next_run_idx",
@@ -48928,9 +49123,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routine_triggers_public_id_idx": {
"name": "routine_triggers_public_id_idx",
@@ -48943,9 +49138,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routine_triggers_public_id_uq": {
"name": "routine_triggers_public_id_uq",
@@ -48958,76 +49153,76 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"routine_triggers_company_id_companies_id_fk": {
"name": "routine_triggers_company_id_companies_id_fk",
"tableFrom": "routine_triggers",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"routine_triggers_routine_id_routines_id_fk": {
"name": "routine_triggers_routine_id_routines_id_fk",
"tableFrom": "routine_triggers",
+ "tableTo": "routines",
"columnsFrom": [
"routine_id"
],
- "tableTo": "routines",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"routine_triggers_secret_id_company_secrets_id_fk": {
"name": "routine_triggers_secret_id_company_secrets_id_fk",
"tableFrom": "routine_triggers",
+ "tableTo": "company_secrets",
"columnsFrom": [
"secret_id"
],
- "tableTo": "company_secrets",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"routine_triggers_created_by_agent_id_agents_id_fk": {
"name": "routine_triggers_created_by_agent_id_agents_id_fk",
"tableFrom": "routine_triggers",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"routine_triggers_updated_by_agent_id_agents_id_fk": {
"name": "routine_triggers_updated_by_agent_id_agents_id_fk",
"tableFrom": "routine_triggers",
+ "tableTo": "agents",
"columnsFrom": [
"updated_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -49091,37 +49286,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"routine_webhook_test_receipts_company_id_companies_id_fk": {
"name": "routine_webhook_test_receipts_company_id_companies_id_fk",
"tableFrom": "routine_webhook_test_receipts",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"routine_webhook_test_receipts_trigger_id_routine_triggers_id_fk": {
"name": "routine_webhook_test_receipts_trigger_id_routine_triggers_id_fk",
"tableFrom": "routine_webhook_test_receipts",
+ "tableTo": "routine_triggers",
"columnsFrom": [
"trigger_id"
],
- "tableTo": "routine_triggers",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -49345,9 +49540,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routines_company_assignee_idx": {
"name": "routines_company_assignee_idx",
@@ -49366,9 +49561,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routines_company_project_idx": {
"name": "routines_company_project_idx",
@@ -49387,9 +49582,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routines_company_folder_idx": {
"name": "routines_company_folder_idx",
@@ -49408,9 +49603,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routines_company_responsible_user_idx": {
"name": "routines_company_responsible_user_idx",
@@ -49429,9 +49624,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routines_company_origin_idx": {
"name": "routines_company_origin_idx",
@@ -49456,115 +49651,115 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"routines_company_id_companies_id_fk": {
"name": "routines_company_id_companies_id_fk",
"tableFrom": "routines",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"routines_project_id_projects_id_fk": {
"name": "routines_project_id_projects_id_fk",
"tableFrom": "routines",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"routines_folder_id_folders_id_fk": {
"name": "routines_folder_id_folders_id_fk",
"tableFrom": "routines",
+ "tableTo": "folders",
"columnsFrom": [
"folder_id"
],
- "tableTo": "folders",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"routines_goal_id_goals_id_fk": {
"name": "routines_goal_id_goals_id_fk",
"tableFrom": "routines",
+ "tableTo": "goals",
"columnsFrom": [
"goal_id"
],
- "tableTo": "goals",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"routines_parent_issue_id_issues_id_fk": {
"name": "routines_parent_issue_id_issues_id_fk",
"tableFrom": "routines",
+ "tableTo": "issues",
"columnsFrom": [
"parent_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"routines_assignee_agent_id_agents_id_fk": {
"name": "routines_assignee_agent_id_agents_id_fk",
"tableFrom": "routines",
+ "tableTo": "agents",
"columnsFrom": [
"assignee_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"routines_created_by_agent_id_agents_id_fk": {
"name": "routines_created_by_agent_id_agents_id_fk",
"tableFrom": "routines",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"routines_updated_by_agent_id_agents_id_fk": {
"name": "routines_updated_by_agent_id_agents_id_fk",
"tableFrom": "routines",
+ "tableTo": "agents",
"columnsFrom": [
"updated_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -49677,9 +49872,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"run_identity_contexts_run_correlation_idx": {
"name": "run_identity_contexts_run_correlation_idx",
@@ -49698,9 +49893,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"run_identity_contexts_company_run_idx": {
"name": "run_identity_contexts_company_run_idx",
@@ -49719,24 +49914,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"run_identity_contexts_company_id_companies_id_fk": {
"name": "run_identity_contexts_company_id_companies_id_fk",
"tableFrom": "run_identity_contexts",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -49800,50 +49995,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"runner_api_response_reservations_company_id_companies_id_fk": {
"name": "runner_api_response_reservations_company_id_companies_id_fk",
"tableFrom": "runner_api_response_reservations",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"runner_api_response_reservations_run_id_heartbeat_runs_id_fk": {
"name": "runner_api_response_reservations_run_id_heartbeat_runs_id_fk",
"tableFrom": "runner_api_response_reservations",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"runner_api_response_reservations_asset_id_assets_id_fk": {
"name": "runner_api_response_reservations_asset_id_assets_id_fk",
"tableFrom": "runner_api_response_reservations",
+ "tableTo": "assets",
"columnsFrom": [
"asset_id"
],
- "tableTo": "assets",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -50010,9 +50205,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"secret_access_events_secret_created_idx": {
"name": "secret_access_events_secret_created_idx",
@@ -50031,9 +50226,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"secret_access_events_user_definition_created_idx": {
"name": "secret_access_events_user_definition_created_idx",
@@ -50052,9 +50247,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"secret_access_events_company_credential_owner_idx": {
"name": "secret_access_events_company_credential_owner_idx",
@@ -50079,9 +50274,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"secret_access_events_consumer_idx": {
"name": "secret_access_events_consumer_idx",
@@ -50106,9 +50301,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"secret_access_events_run_idx": {
"name": "secret_access_events_run_idx",
@@ -50121,89 +50316,89 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"secret_access_events_company_id_companies_id_fk": {
"name": "secret_access_events_company_id_companies_id_fk",
"tableFrom": "secret_access_events",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"secret_access_events_secret_id_company_secrets_id_fk": {
"name": "secret_access_events_secret_id_company_secrets_id_fk",
"tableFrom": "secret_access_events",
+ "tableTo": "company_secrets",
"columnsFrom": [
"secret_id"
],
- "tableTo": "company_secrets",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"secret_access_events_user_secret_definition_id_user_secret_definitions_id_fk": {
"name": "secret_access_events_user_secret_definition_id_user_secret_definitions_id_fk",
"tableFrom": "secret_access_events",
+ "tableTo": "user_secret_definitions",
"columnsFrom": [
"user_secret_definition_id"
],
- "tableTo": "user_secret_definitions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"secret_access_events_issue_id_issues_id_fk": {
"name": "secret_access_events_issue_id_issues_id_fk",
"tableFrom": "secret_access_events",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"secret_access_events_heartbeat_run_id_heartbeat_runs_id_fk": {
"name": "secret_access_events_heartbeat_run_id_heartbeat_runs_id_fk",
"tableFrom": "secret_access_events",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"heartbeat_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"secret_access_events_plugin_id_plugins_id_fk": {
"name": "secret_access_events_plugin_id_plugins_id_fk",
"tableFrom": "secret_access_events",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -50304,9 +50499,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"smoke_run_steps_company_path_idx": {
"name": "smoke_run_steps_company_path_idx",
@@ -50325,37 +50520,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"smoke_run_steps_company_id_companies_id_fk": {
"name": "smoke_run_steps_company_id_companies_id_fk",
"tableFrom": "smoke_run_steps",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"smoke_run_steps_run_id_smoke_runs_id_fk": {
"name": "smoke_run_steps_run_id_smoke_runs_id_fk",
"tableFrom": "smoke_run_steps",
+ "tableTo": "smoke_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "smoke_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -50447,9 +50642,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"smoke_runs_company_status_idx": {
"name": "smoke_runs_company_status_idx",
@@ -50468,24 +50663,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"smoke_runs_company_id_companies_id_fk": {
"name": "smoke_runs_company_id_companies_id_fk",
"tableFrom": "smoke_runs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -50625,9 +50820,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"status_card_updates_generation_issue_idx": {
"name": "status_card_updates_generation_issue_idx",
@@ -50640,50 +50835,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"status_card_updates_card_id_status_cards_id_fk": {
"name": "status_card_updates_card_id_status_cards_id_fk",
"tableFrom": "status_card_updates",
+ "tableTo": "status_cards",
"columnsFrom": [
"card_id"
],
- "tableTo": "status_cards",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"status_card_updates_generation_issue_id_issues_id_fk": {
"name": "status_card_updates_generation_issue_id_issues_id_fk",
"tableFrom": "status_card_updates",
+ "tableTo": "issues",
"columnsFrom": [
"generation_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"status_card_updates_run_id_heartbeat_runs_id_fk": {
"name": "status_card_updates_run_id_heartbeat_runs_id_fk",
"tableFrom": "status_card_updates",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -50916,9 +51111,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"status_cards_company_next_eval_idx": {
"name": "status_cards_company_next_eval_idx",
@@ -50937,102 +51132,102 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"status_cards_company_id_companies_id_fk": {
"name": "status_cards_company_id_companies_id_fk",
"tableFrom": "status_cards",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"status_cards_created_by_agent_id_agents_id_fk": {
"name": "status_cards_created_by_agent_id_agents_id_fk",
"tableFrom": "status_cards",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"status_cards_query_compiled_by_agent_id_agents_id_fk": {
"name": "status_cards_query_compiled_by_agent_id_agents_id_fk",
"tableFrom": "status_cards",
+ "tableTo": "agents",
"columnsFrom": [
"query_compiled_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"status_cards_agent_id_agents_id_fk": {
"name": "status_cards_agent_id_agents_id_fk",
"tableFrom": "status_cards",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"status_cards_document_id_documents_id_fk": {
"name": "status_cards_document_id_documents_id_fk",
"tableFrom": "status_cards",
+ "tableTo": "documents",
"columnsFrom": [
"document_id"
],
- "tableTo": "documents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"status_cards_generating_issue_id_issues_id_fk": {
"name": "status_cards_generating_issue_id_issues_id_fk",
"tableFrom": "status_cards",
+ "tableTo": "issues",
"columnsFrom": [
"generating_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"status_cards_archived_by_agent_id_agents_id_fk": {
"name": "status_cards_archived_by_agent_id_agents_id_fk",
"tableFrom": "status_cards",
+ "tableTo": "agents",
"columnsFrom": [
"archived_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -51171,9 +51366,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"status_decision_effects_company_idempotency_uq": {
"name": "status_decision_effects_company_idempotency_uq",
@@ -51192,56 +51387,56 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"status_decision_effects_company_id_companies_id_fk": {
"name": "status_decision_effects_company_id_companies_id_fk",
"tableFrom": "status_decision_effects",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"status_decision_effects_issue_company_fk": {
"name": "status_decision_effects_issue_company_fk",
"tableFrom": "status_decision_effects",
+ "tableTo": "issues",
"columnsFrom": [
"company_id",
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"status_decision_effects_decision_owner_fk": {
"name": "status_decision_effects_decision_owner_fk",
"tableFrom": "status_decision_effects",
+ "tableTo": "status_decisions",
"columnsFrom": [
"company_id",
"issue_id",
"decision_id"
],
- "tableTo": "status_decisions",
"columnsTo": [
"company_id",
"issue_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -51378,9 +51573,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"status_decisions_company_assessment_uq": {
"name": "status_decisions_company_assessment_uq",
@@ -51399,9 +51594,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"status_decisions_company_issue_digest_uq": {
"name": "status_decisions_company_issue_digest_uq",
@@ -51426,98 +51621,98 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"status_decisions_company_id_companies_id_fk": {
"name": "status_decisions_company_id_companies_id_fk",
"tableFrom": "status_decisions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"status_decisions_issue_company_fk": {
"name": "status_decisions_issue_company_fk",
"tableFrom": "status_decisions",
+ "tableTo": "issues",
"columnsFrom": [
"company_id",
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"status_decisions_assessment_owner_fk": {
"name": "status_decisions_assessment_owner_fk",
"tableFrom": "status_decisions",
+ "tableTo": "work_assessments",
"columnsFrom": [
"company_id",
"issue_id",
"run_id",
"assessment_id"
],
- "tableTo": "work_assessments",
"columnsTo": [
"company_id",
"issue_id",
"run_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"status_decisions_supersedes_owner_fk": {
"name": "status_decisions_supersedes_owner_fk",
"tableFrom": "status_decisions",
+ "tableTo": "status_decisions",
"columnsFrom": [
"company_id",
"issue_id",
"supersedes_decision_id"
],
- "tableTo": "status_decisions",
"columnsTo": [
"company_id",
"issue_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"status_decisions_company_issue_id_uq": {
"name": "status_decisions_company_issue_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"issue_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
},
"status_decisions_company_issue_run_assessment_id_uq": {
"name": "status_decisions_company_issue_run_assessment_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"issue_id",
"run_id",
"assessment_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -51629,9 +51824,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"summary_slots_company_scope_idx": {
"name": "summary_slots_company_scope_idx",
@@ -51656,9 +51851,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"summary_slots_company_generating_issue_idx": {
"name": "summary_slots_company_generating_issue_idx",
@@ -51677,9 +51872,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"summary_slots_company_updated_idx": {
"name": "summary_slots_company_updated_idx",
@@ -51698,76 +51893,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"summary_slots_company_id_companies_id_fk": {
"name": "summary_slots_company_id_companies_id_fk",
"tableFrom": "summary_slots",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"summary_slots_document_id_documents_id_fk": {
"name": "summary_slots_document_id_documents_id_fk",
"tableFrom": "summary_slots",
+ "tableTo": "documents",
"columnsFrom": [
"document_id"
],
- "tableTo": "documents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"summary_slots_generating_issue_id_issues_id_fk": {
"name": "summary_slots_generating_issue_id_issues_id_fk",
"tableFrom": "summary_slots",
+ "tableTo": "issues",
"columnsFrom": [
"generating_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"summary_slots_last_generated_by_agent_id_agents_id_fk": {
"name": "summary_slots_last_generated_by_agent_id_agents_id_fk",
"tableFrom": "summary_slots",
+ "tableTo": "agents",
"columnsFrom": [
"last_generated_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"summary_slots_company_scope_slot_uq": {
"name": "summary_slots_company_scope_slot_uq",
+ "nullsNotDistinct": true,
"columns": [
"company_id",
"scope_kind",
"scope_id",
"slot_key"
- ],
- "nullsNotDistinct": true
+ ]
}
},
"policies": {},
@@ -51897,9 +52092,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_access_audit_connection_idx": {
"name": "tool_access_audit_connection_idx",
@@ -51912,9 +52107,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_access_audit_gateway_idx": {
"name": "tool_access_audit_gateway_idx",
@@ -51933,76 +52128,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_access_audit_events_company_id_companies_id_fk": {
"name": "tool_access_audit_events_company_id_companies_id_fk",
"tableFrom": "tool_access_audit_events",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_access_audit_events_gateway_id_tool_mcp_gateways_id_fk": {
"name": "tool_access_audit_events_gateway_id_tool_mcp_gateways_id_fk",
"tableFrom": "tool_access_audit_events",
+ "tableTo": "tool_mcp_gateways",
"columnsFrom": [
"gateway_id"
],
- "tableTo": "tool_mcp_gateways",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_access_audit_events_gateway_token_id_tool_mcp_gateway_tokens_id_fk": {
"name": "tool_access_audit_events_gateway_token_id_tool_mcp_gateway_tokens_id_fk",
"tableFrom": "tool_access_audit_events",
+ "tableTo": "tool_mcp_gateway_tokens",
"columnsFrom": [
"gateway_token_id"
],
- "tableTo": "tool_mcp_gateway_tokens",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_access_audit_events_connection_id_tool_connections_id_fk": {
"name": "tool_access_audit_events_connection_id_tool_connections_id_fk",
"tableFrom": "tool_access_audit_events",
+ "tableTo": "tool_connections",
"columnsFrom": [
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_access_audit_events_catalog_entry_id_tool_catalog_entries_id_fk": {
"name": "tool_access_audit_events_catalog_entry_id_tool_catalog_entries_id_fk",
"tableFrom": "tool_access_audit_events",
+ "tableTo": "tool_catalog_entries",
"columnsFrom": [
"catalog_entry_id"
],
- "tableTo": "tool_catalog_entries",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -52071,63 +52266,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_action_deliveries_action_request_id_tool_action_requests_id_fk": {
"name": "tool_action_deliveries_action_request_id_tool_action_requests_id_fk",
"tableFrom": "tool_action_deliveries",
+ "tableTo": "tool_action_requests",
"columnsFrom": [
"action_request_id"
],
- "tableTo": "tool_action_requests",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_action_deliveries_company_id_companies_id_fk": {
"name": "tool_action_deliveries_company_id_companies_id_fk",
"tableFrom": "tool_action_deliveries",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_action_deliveries_issue_id_issues_id_fk": {
"name": "tool_action_deliveries_issue_id_issues_id_fk",
"tableFrom": "tool_action_deliveries",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_action_deliveries_interaction_id_issue_thread_interactions_id_fk": {
"name": "tool_action_deliveries_interaction_id_issue_thread_interactions_id_fk",
"tableFrom": "tool_action_deliveries",
+ "tableTo": "issue_thread_interactions",
"columnsFrom": [
"interaction_id"
],
- "tableTo": "issue_thread_interactions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -52295,9 +52490,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_action_requests_invocation_idx": {
"name": "tool_action_requests_invocation_idx",
@@ -52310,9 +52505,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_action_requests_issue_idx": {
"name": "tool_action_requests_issue_idx",
@@ -52331,115 +52526,115 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_action_requests_company_id_companies_id_fk": {
"name": "tool_action_requests_company_id_companies_id_fk",
"tableFrom": "tool_action_requests",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_action_requests_invocation_id_tool_invocations_id_fk": {
"name": "tool_action_requests_invocation_id_tool_invocations_id_fk",
"tableFrom": "tool_action_requests",
+ "tableTo": "tool_invocations",
"columnsFrom": [
"invocation_id"
],
- "tableTo": "tool_invocations",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_action_requests_issue_id_issues_id_fk": {
"name": "tool_action_requests_issue_id_issues_id_fk",
"tableFrom": "tool_action_requests",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_action_requests_interaction_id_issue_thread_interactions_id_fk": {
"name": "tool_action_requests_interaction_id_issue_thread_interactions_id_fk",
"tableFrom": "tool_action_requests",
+ "tableTo": "issue_thread_interactions",
"columnsFrom": [
"interaction_id"
],
- "tableTo": "issue_thread_interactions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_action_requests_approval_id_approvals_id_fk": {
"name": "tool_action_requests_approval_id_approvals_id_fk",
"tableFrom": "tool_action_requests",
+ "tableTo": "approvals",
"columnsFrom": [
"approval_id"
],
- "tableTo": "approvals",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_action_requests_requested_by_agent_id_agents_id_fk": {
"name": "tool_action_requests_requested_by_agent_id_agents_id_fk",
"tableFrom": "tool_action_requests",
+ "tableTo": "agents",
"columnsFrom": [
"requested_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_action_requests_resolved_by_agent_id_agents_id_fk": {
"name": "tool_action_requests_resolved_by_agent_id_agents_id_fk",
"tableFrom": "tool_action_requests",
+ "tableTo": "agents",
"columnsFrom": [
"resolved_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_action_requests_decided_by_agent_id_agents_id_fk": {
"name": "tool_action_requests_decided_by_agent_id_agents_id_fk",
"tableFrom": "tool_action_requests",
+ "tableTo": "agents",
"columnsFrom": [
"decided_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -52554,9 +52749,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_applications_company_status_idx": {
"name": "tool_applications_company_status_idx",
@@ -52575,9 +52770,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_applications_company_name_uq": {
"name": "tool_applications_company_name_uq",
@@ -52596,9 +52791,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_applications_company_key_uq": {
"name": "tool_applications_company_key_uq",
@@ -52617,50 +52812,50 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_applications_company_id_companies_id_fk": {
"name": "tool_applications_company_id_companies_id_fk",
"tableFrom": "tool_applications",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_applications_plugin_id_plugins_id_fk": {
"name": "tool_applications_plugin_id_plugins_id_fk",
"tableFrom": "tool_applications",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_applications_owner_agent_id_agents_id_fk": {
"name": "tool_applications_owner_agent_id_agents_id_fk",
"tableFrom": "tool_applications",
+ "tableTo": "agents",
"columnsFrom": [
"owner_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -52955,9 +53150,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_call_events_run_idx": {
"name": "tool_call_events_run_idx",
@@ -52976,9 +53171,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_call_events_issue_idx": {
"name": "tool_call_events_issue_idx",
@@ -52997,9 +53192,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_call_events_invocation_idx": {
"name": "tool_call_events_invocation_idx",
@@ -53012,9 +53207,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_call_events_gateway_idx": {
"name": "tool_call_events_gateway_idx",
@@ -53033,167 +53228,167 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_call_events_company_id_companies_id_fk": {
"name": "tool_call_events_company_id_companies_id_fk",
"tableFrom": "tool_call_events",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_call_events_agent_id_agents_id_fk": {
"name": "tool_call_events_agent_id_agents_id_fk",
"tableFrom": "tool_call_events",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_call_events_run_id_heartbeat_runs_id_fk": {
"name": "tool_call_events_run_id_heartbeat_runs_id_fk",
"tableFrom": "tool_call_events",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_call_events_issue_id_issues_id_fk": {
"name": "tool_call_events_issue_id_issues_id_fk",
"tableFrom": "tool_call_events",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_call_events_gateway_id_tool_mcp_gateways_id_fk": {
"name": "tool_call_events_gateway_id_tool_mcp_gateways_id_fk",
"tableFrom": "tool_call_events",
+ "tableTo": "tool_mcp_gateways",
"columnsFrom": [
"gateway_id"
],
- "tableTo": "tool_mcp_gateways",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_call_events_gateway_token_id_tool_mcp_gateway_tokens_id_fk": {
"name": "tool_call_events_gateway_token_id_tool_mcp_gateway_tokens_id_fk",
"tableFrom": "tool_call_events",
+ "tableTo": "tool_mcp_gateway_tokens",
"columnsFrom": [
"gateway_token_id"
],
- "tableTo": "tool_mcp_gateway_tokens",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_call_events_application_id_tool_applications_id_fk": {
"name": "tool_call_events_application_id_tool_applications_id_fk",
"tableFrom": "tool_call_events",
+ "tableTo": "tool_applications",
"columnsFrom": [
"application_id"
],
- "tableTo": "tool_applications",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_call_events_connection_id_tool_connections_id_fk": {
"name": "tool_call_events_connection_id_tool_connections_id_fk",
"tableFrom": "tool_call_events",
+ "tableTo": "tool_connections",
"columnsFrom": [
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_call_events_catalog_entry_id_tool_catalog_entries_id_fk": {
"name": "tool_call_events_catalog_entry_id_tool_catalog_entries_id_fk",
"tableFrom": "tool_call_events",
+ "tableTo": "tool_catalog_entries",
"columnsFrom": [
"catalog_entry_id"
],
- "tableTo": "tool_catalog_entries",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_call_events_invocation_id_tool_invocations_id_fk": {
"name": "tool_call_events_invocation_id_tool_invocations_id_fk",
"tableFrom": "tool_call_events",
+ "tableTo": "tool_invocations",
"columnsFrom": [
"invocation_id"
],
- "tableTo": "tool_invocations",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_call_events_action_request_id_tool_action_requests_id_fk": {
"name": "tool_call_events_action_request_id_tool_action_requests_id_fk",
"tableFrom": "tool_call_events",
+ "tableTo": "tool_action_requests",
"columnsFrom": [
"action_request_id"
],
- "tableTo": "tool_action_requests",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_call_events_runtime_slot_id_tool_runtime_slots_id_fk": {
"name": "tool_call_events_runtime_slot_id_tool_runtime_slots_id_fk",
"tableFrom": "tool_call_events",
+ "tableTo": "tool_runtime_slots",
"columnsFrom": [
"runtime_slot_id"
],
- "tableTo": "tool_runtime_slots",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -53406,9 +53601,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_catalog_entries_application_idx": {
"name": "tool_catalog_entries_application_idx",
@@ -53421,9 +53616,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_catalog_entries_connection_idx": {
"name": "tool_catalog_entries_connection_idx",
@@ -53436,9 +53631,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_catalog_entries_company_status_idx": {
"name": "tool_catalog_entries_company_status_idx",
@@ -53457,9 +53652,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_catalog_entries_connection_name_uq": {
"name": "tool_catalog_entries_connection_name_uq",
@@ -53478,63 +53673,63 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_catalog_entries_company_id_companies_id_fk": {
"name": "tool_catalog_entries_company_id_companies_id_fk",
"tableFrom": "tool_catalog_entries",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_catalog_entries_application_id_tool_applications_id_fk": {
"name": "tool_catalog_entries_application_id_tool_applications_id_fk",
"tableFrom": "tool_catalog_entries",
+ "tableTo": "tool_applications",
"columnsFrom": [
"application_id"
],
- "tableTo": "tool_applications",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_catalog_entries_connection_id_tool_connections_id_fk": {
"name": "tool_catalog_entries_connection_id_tool_connections_id_fk",
"tableFrom": "tool_catalog_entries",
+ "tableTo": "tool_connections",
"columnsFrom": [
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_catalog_entries_reviewed_by_agent_id_agents_id_fk": {
"name": "tool_catalog_entries_reviewed_by_agent_id_agents_id_fk",
"tableFrom": "tool_catalog_entries",
+ "tableTo": "agents",
"columnsFrom": [
"reviewed_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -53641,39 +53836,39 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_connection_app_snapshots_company_id_companies_id_fk": {
"name": "tool_connection_app_snapshots_company_id_companies_id_fk",
"tableFrom": "tool_connection_app_snapshots",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_connection_app_snapshots_company_connection_fk": {
"name": "tool_connection_app_snapshots_company_connection_fk",
"tableFrom": "tool_connection_app_snapshots",
+ "tableTo": "tool_connections",
"columnsFrom": [
"company_id",
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -53794,39 +53989,39 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_connection_app_syncs_company_id_companies_id_fk": {
"name": "tool_connection_app_syncs_company_id_companies_id_fk",
"tableFrom": "tool_connection_app_syncs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_connection_app_syncs_company_connection_fk": {
"name": "tool_connection_app_syncs_company_connection_fk",
"tableFrom": "tool_connection_app_syncs",
+ "tableTo": "tool_connections",
"columnsFrom": [
"company_id",
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -53914,9 +54109,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_connection_installs_connection_idx": {
"name": "tool_connection_installs_connection_idx",
@@ -53935,9 +54130,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_connection_installs_target_uq": {
"name": "tool_connection_installs_target_uq",
@@ -53968,50 +54163,50 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_connection_installs_company_id_companies_id_fk": {
"name": "tool_connection_installs_company_id_companies_id_fk",
"tableFrom": "tool_connection_installs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_connection_installs_connection_id_tool_connections_id_fk": {
"name": "tool_connection_installs_connection_id_tool_connections_id_fk",
"tableFrom": "tool_connection_installs",
+ "tableTo": "tool_connections",
"columnsFrom": [
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_connection_installs_created_by_agent_id_agents_id_fk": {
"name": "tool_connection_installs_created_by_agent_id_agents_id_fk",
"tableFrom": "tool_connection_installs",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -54238,9 +54433,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_connections_application_idx": {
"name": "tool_connections_application_idx",
@@ -54253,9 +54448,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_connections_company_enabled_idx": {
"name": "tool_connections_company_enabled_idx",
@@ -54274,9 +54469,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_connections_company_uid_uq": {
"name": "tool_connections_company_uid_uq",
@@ -54295,61 +54490,61 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_connections_company_id_companies_id_fk": {
"name": "tool_connections_company_id_companies_id_fk",
"tableFrom": "tool_connections",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_connections_application_id_tool_applications_id_fk": {
"name": "tool_connections_application_id_tool_applications_id_fk",
"tableFrom": "tool_connections",
+ "tableTo": "tool_applications",
"columnsFrom": [
"application_id"
],
- "tableTo": "tool_applications",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"tool_connections_created_by_agent_id_agents_id_fk": {
"name": "tool_connections_created_by_agent_id_agents_id_fk",
"tableFrom": "tool_connections",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"tool_connections_company_id_uq": {
"name": "tool_connections_company_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -54470,9 +54665,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_gateway_rate_limit_counters_window_uq": {
"name": "tool_gateway_rate_limit_counters_window_uq",
@@ -54497,24 +54692,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_gateway_rate_limit_counters_company_id_companies_id_fk": {
"name": "tool_gateway_rate_limit_counters_company_id_companies_id_fk",
"tableFrom": "tool_gateway_rate_limit_counters",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -54663,9 +54858,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_gateway_sessions_company_agent_idx": {
"name": "tool_gateway_sessions_company_agent_idx",
@@ -54684,9 +54879,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_gateway_sessions_company_expires_idx": {
"name": "tool_gateway_sessions_company_expires_idx",
@@ -54705,9 +54900,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_gateway_sessions_run_idx": {
"name": "tool_gateway_sessions_run_idx",
@@ -54726,9 +54921,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_gateway_sessions_issue_idx": {
"name": "tool_gateway_sessions_issue_idx",
@@ -54747,9 +54942,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_gateway_sessions_gateway_idx": {
"name": "tool_gateway_sessions_gateway_idx",
@@ -54768,102 +54963,102 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_gateway_sessions_company_id_companies_id_fk": {
"name": "tool_gateway_sessions_company_id_companies_id_fk",
"tableFrom": "tool_gateway_sessions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_gateway_sessions_agent_id_agents_id_fk": {
"name": "tool_gateway_sessions_agent_id_agents_id_fk",
"tableFrom": "tool_gateway_sessions",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_gateway_sessions_run_id_heartbeat_runs_id_fk": {
"name": "tool_gateway_sessions_run_id_heartbeat_runs_id_fk",
"tableFrom": "tool_gateway_sessions",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_gateway_sessions_issue_id_issues_id_fk": {
"name": "tool_gateway_sessions_issue_id_issues_id_fk",
"tableFrom": "tool_gateway_sessions",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_gateway_sessions_project_id_projects_id_fk": {
"name": "tool_gateway_sessions_project_id_projects_id_fk",
"tableFrom": "tool_gateway_sessions",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_gateway_sessions_gateway_id_tool_mcp_gateways_id_fk": {
"name": "tool_gateway_sessions_gateway_id_tool_mcp_gateways_id_fk",
"tableFrom": "tool_gateway_sessions",
+ "tableTo": "tool_mcp_gateways",
"columnsFrom": [
"gateway_id"
],
- "tableTo": "tool_mcp_gateways",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_gateway_sessions_gateway_token_id_tool_mcp_gateway_tokens_id_fk": {
"name": "tool_gateway_sessions_gateway_token_id_tool_mcp_gateway_tokens_id_fk",
"tableFrom": "tool_gateway_sessions",
+ "tableTo": "tool_mcp_gateway_tokens",
"columnsFrom": [
"gateway_token_id"
],
- "tableTo": "tool_mcp_gateway_tokens",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -55178,9 +55373,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_invocations_run_idx": {
"name": "tool_invocations_run_idx",
@@ -55199,9 +55394,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_invocations_issue_idx": {
"name": "tool_invocations_issue_idx",
@@ -55220,9 +55415,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_invocations_gateway_idx": {
"name": "tool_invocations_gateway_idx",
@@ -55241,9 +55436,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_invocations_company_idempotency_uq": {
"name": "tool_invocations_company_idempotency_uq",
@@ -55262,128 +55457,128 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_invocations_company_id_companies_id_fk": {
"name": "tool_invocations_company_id_companies_id_fk",
"tableFrom": "tool_invocations",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_invocations_agent_id_agents_id_fk": {
"name": "tool_invocations_agent_id_agents_id_fk",
"tableFrom": "tool_invocations",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_invocations_issue_id_issues_id_fk": {
"name": "tool_invocations_issue_id_issues_id_fk",
"tableFrom": "tool_invocations",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_invocations_run_id_heartbeat_runs_id_fk": {
"name": "tool_invocations_run_id_heartbeat_runs_id_fk",
"tableFrom": "tool_invocations",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_invocations_gateway_id_tool_mcp_gateways_id_fk": {
"name": "tool_invocations_gateway_id_tool_mcp_gateways_id_fk",
"tableFrom": "tool_invocations",
+ "tableTo": "tool_mcp_gateways",
"columnsFrom": [
"gateway_id"
],
- "tableTo": "tool_mcp_gateways",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_invocations_gateway_token_id_tool_mcp_gateway_tokens_id_fk": {
"name": "tool_invocations_gateway_token_id_tool_mcp_gateway_tokens_id_fk",
"tableFrom": "tool_invocations",
+ "tableTo": "tool_mcp_gateway_tokens",
"columnsFrom": [
"gateway_token_id"
],
- "tableTo": "tool_mcp_gateway_tokens",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_invocations_application_id_tool_applications_id_fk": {
"name": "tool_invocations_application_id_tool_applications_id_fk",
"tableFrom": "tool_invocations",
+ "tableTo": "tool_applications",
"columnsFrom": [
"application_id"
],
- "tableTo": "tool_applications",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_invocations_connection_id_tool_connections_id_fk": {
"name": "tool_invocations_connection_id_tool_connections_id_fk",
"tableFrom": "tool_invocations",
+ "tableTo": "tool_connections",
"columnsFrom": [
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_invocations_catalog_entry_id_tool_catalog_entries_id_fk": {
"name": "tool_invocations_catalog_entry_id_tool_catalog_entries_id_fk",
"tableFrom": "tool_invocations",
+ "tableTo": "tool_catalog_entries",
"columnsFrom": [
"catalog_entry_id"
],
- "tableTo": "tool_catalog_entries",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -55549,9 +55744,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_mcp_gateway_tokens_expiry_idx": {
"name": "tool_mcp_gateway_tokens_expiry_idx",
@@ -55570,9 +55765,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_mcp_gateway_tokens_gateway_idx": {
"name": "tool_mcp_gateway_tokens_gateway_idx",
@@ -55591,9 +55786,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_mcp_gateway_tokens_subject_idx": {
"name": "tool_mcp_gateway_tokens_subject_idx",
@@ -55618,9 +55813,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_mcp_gateway_tokens_company_expires_idx": {
"name": "tool_mcp_gateway_tokens_company_expires_idx",
@@ -55639,63 +55834,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_mcp_gateway_tokens_company_id_companies_id_fk": {
"name": "tool_mcp_gateway_tokens_company_id_companies_id_fk",
"tableFrom": "tool_mcp_gateway_tokens",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_mcp_gateway_tokens_gateway_id_tool_mcp_gateways_id_fk": {
"name": "tool_mcp_gateway_tokens_gateway_id_tool_mcp_gateways_id_fk",
"tableFrom": "tool_mcp_gateway_tokens",
+ "tableTo": "tool_mcp_gateways",
"columnsFrom": [
"gateway_id"
],
- "tableTo": "tool_mcp_gateways",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_mcp_gateway_tokens_expiry_override_by_agent_id_agents_id_fk": {
"name": "tool_mcp_gateway_tokens_expiry_override_by_agent_id_agents_id_fk",
"tableFrom": "tool_mcp_gateway_tokens",
+ "tableTo": "agents",
"columnsFrom": [
"expiry_override_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_mcp_gateway_tokens_created_by_agent_id_agents_id_fk": {
"name": "tool_mcp_gateway_tokens_created_by_agent_id_agents_id_fk",
"tableFrom": "tool_mcp_gateway_tokens",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -55890,9 +56085,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_mcp_gateways_company_status_idx": {
"name": "tool_mcp_gateways_company_status_idx",
@@ -55911,9 +56106,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_mcp_gateways_profile_idx": {
"name": "tool_mcp_gateways_profile_idx",
@@ -55932,9 +56127,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_mcp_gateways_public_id_uq": {
"name": "tool_mcp_gateways_public_id_uq",
@@ -55947,9 +56142,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_mcp_gateways_company_slug_uq": {
"name": "tool_mcp_gateways_company_slug_uq",
@@ -55968,9 +56163,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_mcp_gateways_company_name_uq": {
"name": "tool_mcp_gateways_company_name_uq",
@@ -55989,102 +56184,102 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_mcp_gateways_company_id_companies_id_fk": {
"name": "tool_mcp_gateways_company_id_companies_id_fk",
"tableFrom": "tool_mcp_gateways",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_mcp_gateways_profile_id_tool_profiles_id_fk": {
"name": "tool_mcp_gateways_profile_id_tool_profiles_id_fk",
"tableFrom": "tool_mcp_gateways",
+ "tableTo": "tool_profiles",
"columnsFrom": [
"profile_id"
],
- "tableTo": "tool_profiles",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
},
"tool_mcp_gateways_agent_id_agents_id_fk": {
"name": "tool_mcp_gateways_agent_id_agents_id_fk",
"tableFrom": "tool_mcp_gateways",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_mcp_gateways_project_id_projects_id_fk": {
"name": "tool_mcp_gateways_project_id_projects_id_fk",
"tableFrom": "tool_mcp_gateways",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_mcp_gateways_issue_id_issues_id_fk": {
"name": "tool_mcp_gateways_issue_id_issues_id_fk",
"tableFrom": "tool_mcp_gateways",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_mcp_gateways_approval_issue_id_issues_id_fk": {
"name": "tool_mcp_gateways_approval_issue_id_issues_id_fk",
"tableFrom": "tool_mcp_gateways",
+ "tableTo": "issues",
"columnsFrom": [
"approval_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_mcp_gateways_created_by_agent_id_agents_id_fk": {
"name": "tool_mcp_gateways_created_by_agent_id_agents_id_fk",
"tableFrom": "tool_mcp_gateways",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -56201,9 +56396,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_oauth_states_connection_idx": {
"name": "tool_oauth_states_connection_idx",
@@ -56216,9 +56411,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_oauth_states_actor_idx": {
"name": "tool_oauth_states_actor_idx",
@@ -56237,9 +56432,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_oauth_states_subject_agent_idx": {
"name": "tool_oauth_states_subject_agent_idx",
@@ -56258,9 +56453,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_oauth_states_expires_at_idx": {
"name": "tool_oauth_states_expires_at_idx",
@@ -56273,50 +56468,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_oauth_states_company_id_companies_id_fk": {
"name": "tool_oauth_states_company_id_companies_id_fk",
"tableFrom": "tool_oauth_states",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_oauth_states_connection_id_tool_connections_id_fk": {
"name": "tool_oauth_states_connection_id_tool_connections_id_fk",
"tableFrom": "tool_oauth_states",
+ "tableTo": "tool_connections",
"columnsFrom": [
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_oauth_states_subject_agent_id_agents_id_fk": {
"name": "tool_oauth_states_subject_agent_id_agents_id_fk",
"tableFrom": "tool_oauth_states",
+ "tableTo": "agents",
"columnsFrom": [
"subject_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -56438,9 +56633,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_policies_company_type_idx": {
"name": "tool_policies_company_type_idx",
@@ -56459,9 +56654,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_policies_company_name_uq": {
"name": "tool_policies_company_name_uq",
@@ -56480,37 +56675,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_policies_company_id_companies_id_fk": {
"name": "tool_policies_company_id_companies_id_fk",
"tableFrom": "tool_policies",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_policies_created_by_agent_id_agents_id_fk": {
"name": "tool_policies_created_by_agent_id_agents_id_fk",
"tableFrom": "tool_policies",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -56619,9 +56814,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_profile_bindings_target_profile_uq": {
"name": "tool_profile_bindings_target_profile_uq",
@@ -56652,50 +56847,50 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_profile_bindings_company_id_companies_id_fk": {
"name": "tool_profile_bindings_company_id_companies_id_fk",
"tableFrom": "tool_profile_bindings",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_profile_bindings_profile_id_tool_profiles_id_fk": {
"name": "tool_profile_bindings_profile_id_tool_profiles_id_fk",
"tableFrom": "tool_profile_bindings",
+ "tableTo": "tool_profiles",
"columnsFrom": [
"profile_id"
],
- "tableTo": "tool_profiles",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_profile_bindings_created_by_agent_id_agents_id_fk": {
"name": "tool_profile_bindings_created_by_agent_id_agents_id_fk",
"tableFrom": "tool_profile_bindings",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -56809,9 +57004,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_profile_entries_application_idx": {
"name": "tool_profile_entries_application_idx",
@@ -56830,9 +57025,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_profile_entries_connection_idx": {
"name": "tool_profile_entries_connection_idx",
@@ -56851,9 +57046,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_profile_entries_catalog_entry_idx": {
"name": "tool_profile_entries_catalog_entry_idx",
@@ -56872,76 +57067,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_profile_entries_company_id_companies_id_fk": {
"name": "tool_profile_entries_company_id_companies_id_fk",
"tableFrom": "tool_profile_entries",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_profile_entries_profile_id_tool_profiles_id_fk": {
"name": "tool_profile_entries_profile_id_tool_profiles_id_fk",
"tableFrom": "tool_profile_entries",
+ "tableTo": "tool_profiles",
"columnsFrom": [
"profile_id"
],
- "tableTo": "tool_profiles",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_profile_entries_application_id_tool_applications_id_fk": {
"name": "tool_profile_entries_application_id_tool_applications_id_fk",
"tableFrom": "tool_profile_entries",
+ "tableTo": "tool_applications",
"columnsFrom": [
"application_id"
],
- "tableTo": "tool_applications",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_profile_entries_connection_id_tool_connections_id_fk": {
"name": "tool_profile_entries_connection_id_tool_connections_id_fk",
"tableFrom": "tool_profile_entries",
+ "tableTo": "tool_connections",
"columnsFrom": [
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_profile_entries_catalog_entry_id_tool_catalog_entries_id_fk": {
"name": "tool_profile_entries_catalog_entry_id_tool_catalog_entries_id_fk",
"tableFrom": "tool_profile_entries",
+ "tableTo": "tool_catalog_entries",
"columnsFrom": [
"catalog_entry_id"
],
- "tableTo": "tool_catalog_entries",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -57045,9 +57240,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_profiles_company_key_uq": {
"name": "tool_profiles_company_key_uq",
@@ -57066,9 +57261,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_profiles_company_name_uq": {
"name": "tool_profiles_company_name_uq",
@@ -57087,24 +57282,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_profiles_company_id_companies_id_fk": {
"name": "tool_profiles_company_id_companies_id_fk",
"tableFrom": "tool_profiles",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -57211,9 +57406,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_rate_limit_counters_window_uq": {
"name": "tool_rate_limit_counters_window_uq",
@@ -57250,37 +57445,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_rate_limit_counters_company_id_companies_id_fk": {
"name": "tool_rate_limit_counters_company_id_companies_id_fk",
"tableFrom": "tool_rate_limit_counters",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_rate_limit_counters_policy_id_tool_policies_id_fk": {
"name": "tool_rate_limit_counters_policy_id_tool_policies_id_fk",
"tableFrom": "tool_rate_limit_counters",
+ "tableTo": "tool_policies",
"columnsFrom": [
"policy_id"
],
- "tableTo": "tool_policies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -57364,9 +57559,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_runtime_metric_counters_bucket_uq": {
"name": "tool_runtime_metric_counters_bucket_uq",
@@ -57391,24 +57586,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_runtime_metric_counters_company_id_companies_id_fk": {
"name": "tool_runtime_metric_counters_company_id_companies_id_fk",
"tableFrom": "tool_runtime_metric_counters",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -57634,9 +57829,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_runtime_slots_connection_idx": {
"name": "tool_runtime_slots_connection_idx",
@@ -57649,9 +57844,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_runtime_slots_execution_workspace_idx": {
"name": "tool_runtime_slots_execution_workspace_idx",
@@ -57670,9 +57865,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_runtime_slots_slot_key_uq": {
"name": "tool_runtime_slots_slot_key_uq",
@@ -57691,89 +57886,89 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_runtime_slots_company_id_companies_id_fk": {
"name": "tool_runtime_slots_company_id_companies_id_fk",
"tableFrom": "tool_runtime_slots",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_runtime_slots_application_id_tool_applications_id_fk": {
"name": "tool_runtime_slots_application_id_tool_applications_id_fk",
"tableFrom": "tool_runtime_slots",
+ "tableTo": "tool_applications",
"columnsFrom": [
"application_id"
],
- "tableTo": "tool_applications",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_runtime_slots_connection_id_tool_connections_id_fk": {
"name": "tool_runtime_slots_connection_id_tool_connections_id_fk",
"tableFrom": "tool_runtime_slots",
+ "tableTo": "tool_connections",
"columnsFrom": [
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_runtime_slots_project_workspace_id_project_workspaces_id_fk": {
"name": "tool_runtime_slots_project_workspace_id_project_workspaces_id_fk",
"tableFrom": "tool_runtime_slots",
+ "tableTo": "project_workspaces",
"columnsFrom": [
"project_workspace_id"
],
- "tableTo": "project_workspaces",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_runtime_slots_execution_workspace_id_execution_workspaces_id_fk": {
"name": "tool_runtime_slots_execution_workspace_id_execution_workspaces_id_fk",
"tableFrom": "tool_runtime_slots",
+ "tableTo": "execution_workspaces",
"columnsFrom": [
"execution_workspace_id"
],
- "tableTo": "execution_workspaces",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_runtime_slots_issue_id_issues_id_fk": {
"name": "tool_runtime_slots_issue_id_issues_id_fk",
"tableFrom": "tool_runtime_slots",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -57896,9 +58091,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_stdio_command_templates_company_status_idx": {
"name": "tool_stdio_command_templates_company_status_idx",
@@ -57917,9 +58112,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_stdio_command_templates_company_key_uq": {
"name": "tool_stdio_command_templates_company_key_uq",
@@ -57938,37 +58133,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_stdio_command_templates_company_id_companies_id_fk": {
"name": "tool_stdio_command_templates_company_id_companies_id_fk",
"tableFrom": "tool_stdio_command_templates",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_stdio_command_templates_created_by_agent_id_agents_id_fk": {
"name": "tool_stdio_command_templates_created_by_agent_id_agents_id_fk",
"tableFrom": "tool_stdio_command_templates",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -58046,9 +58241,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"user_company_preferences_primary_agent_idx": {
"name": "user_company_preferences_primary_agent_idx",
@@ -58061,37 +58256,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"user_company_preferences_company_id_companies_id_fk": {
"name": "user_company_preferences_company_id_companies_id_fk",
"tableFrom": "user_company_preferences",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"user_company_preferences_primary_agent_id_agents_id_fk": {
"name": "user_company_preferences_primary_agent_id_agents_id_fk",
"tableFrom": "user_company_preferences",
+ "tableTo": "agents",
"columnsFrom": [
"primary_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -58170,9 +58365,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"user_inbox_agent_policies_allowed_agent_ids_idx": {
"name": "user_inbox_agent_policies_allowed_agent_ids_idx",
@@ -58185,24 +58380,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "gin",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"user_inbox_agent_policies_company_id_companies_id_fk": {
"name": "user_inbox_agent_policies_company_id_companies_id_fk",
"tableFrom": "user_inbox_agent_policies",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -58317,9 +58512,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"user_secret_declarations_definition_idx": {
"name": "user_secret_declarations_definition_idx",
@@ -58332,9 +58527,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"user_secret_declarations_target_idx": {
"name": "user_secret_declarations_target_idx",
@@ -58359,9 +58554,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"user_secret_declarations_company_required_idx": {
"name": "user_secret_declarations_company_required_idx",
@@ -58380,9 +58575,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"user_secret_declarations_target_path_uq": {
"name": "user_secret_declarations_target_path_uq",
@@ -58413,9 +58608,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"user_secret_declarations_required_override_idx": {
"name": "user_secret_declarations_required_override_idx",
@@ -58434,38 +58629,38 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"user_secret_declarations\".\"allow_missing_override\" = true",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"user_secret_declarations_company_id_companies_id_fk": {
"name": "user_secret_declarations_company_id_companies_id_fk",
"tableFrom": "user_secret_declarations",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"user_secret_declarations_user_secret_definition_id_user_secret_definitions_id_fk": {
"name": "user_secret_declarations_user_secret_definition_id_user_secret_definitions_id_fk",
"tableFrom": "user_secret_declarations",
+ "tableTo": "user_secret_definitions",
"columnsFrom": [
"user_secret_definition_id"
],
- "tableTo": "user_secret_definitions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -58611,9 +58806,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"user_secret_definitions_company_provider_idx": {
"name": "user_secret_definitions_company_provider_idx",
@@ -58632,9 +58827,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"user_secret_definitions_provider_config_idx": {
"name": "user_secret_definitions_provider_config_idx",
@@ -58647,9 +58842,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"user_secret_definitions_company_key_uq": {
"name": "user_secret_definitions_company_key_uq",
@@ -58668,64 +58863,64 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"user_secret_definitions\".\"deleted_at\" is null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"user_secret_definitions_company_id_companies_id_fk": {
"name": "user_secret_definitions_company_id_companies_id_fk",
"tableFrom": "user_secret_definitions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"user_secret_definitions_provider_config_id_company_secret_provider_configs_id_fk": {
"name": "user_secret_definitions_provider_config_id_company_secret_provider_configs_id_fk",
"tableFrom": "user_secret_definitions",
+ "tableTo": "company_secret_provider_configs",
"columnsFrom": [
"provider_config_id"
],
- "tableTo": "company_secret_provider_configs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"user_secret_definitions_created_by_agent_id_agents_id_fk": {
"name": "user_secret_definitions_created_by_agent_id_agents_id_fk",
"tableFrom": "user_secret_definitions",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"user_secret_definitions_updated_by_agent_id_agents_id_fk": {
"name": "user_secret_definitions_updated_by_agent_id_agents_id_fk",
"tableFrom": "user_secret_definitions",
+ "tableTo": "agents",
"columnsFrom": [
"updated_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -58785,9 +58980,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {},
@@ -58942,137 +59137,137 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"work_assessments_company_id_companies_id_fk": {
"name": "work_assessments_company_id_companies_id_fk",
"tableFrom": "work_assessments",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"work_assessments_trigger_actor_company_id_companies_id_fk": {
"name": "work_assessments_trigger_actor_company_id_companies_id_fk",
"tableFrom": "work_assessments",
+ "tableTo": "companies",
"columnsFrom": [
"trigger_actor_company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"work_assessments_issue_company_fk": {
"name": "work_assessments_issue_company_fk",
"tableFrom": "work_assessments",
+ "tableTo": "issues",
"columnsFrom": [
"company_id",
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"work_assessments_run_owner_fk": {
"name": "work_assessments_run_owner_fk",
"tableFrom": "work_assessments",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"company_id",
"issue_id",
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"company_id",
"native_issue_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"work_assessments_contract_owner_fk": {
"name": "work_assessments_contract_owner_fk",
"tableFrom": "work_assessments",
+ "tableTo": "completion_contracts",
"columnsFrom": [
"company_id",
"issue_id",
"contract_id"
],
- "tableTo": "completion_contracts",
"columnsTo": [
"company_id",
"issue_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"work_assessments_result_owner_fk": {
"name": "work_assessments_result_owner_fk",
"tableFrom": "work_assessments",
+ "tableTo": "native_run_results",
"columnsFrom": [
"company_id",
"issue_id",
"run_id",
"result_id"
],
- "tableTo": "native_run_results",
"columnsTo": [
"company_id",
"issue_id",
"run_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"work_assessments_supersedes_owner_fk": {
"name": "work_assessments_supersedes_owner_fk",
"tableFrom": "work_assessments",
+ "tableTo": "work_assessments",
"columnsFrom": [
"company_id",
"issue_id",
"run_id",
"supersedes_assessment_id"
],
- "tableTo": "work_assessments",
"columnsTo": [
"company_id",
"issue_id",
"run_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"work_assessments_company_issue_run_id_uq": {
"name": "work_assessments_company_issue_run_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"issue_id",
"run_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -59251,9 +59446,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"workspace_operations_company_workspace_started_idx": {
"name": "workspace_operations_company_workspace_started_idx",
@@ -59278,9 +59473,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"workspace_operations_company_workspace_issue_started_idx": {
"name": "workspace_operations_company_workspace_issue_started_idx",
@@ -59311,63 +59506,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"workspace_operations_company_id_companies_id_fk": {
"name": "workspace_operations_company_id_companies_id_fk",
"tableFrom": "workspace_operations",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"workspace_operations_execution_workspace_id_execution_workspaces_id_fk": {
"name": "workspace_operations_execution_workspace_id_execution_workspaces_id_fk",
"tableFrom": "workspace_operations",
+ "tableTo": "execution_workspaces",
"columnsFrom": [
"execution_workspace_id"
],
- "tableTo": "execution_workspaces",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"workspace_operations_heartbeat_run_id_heartbeat_runs_id_fk": {
"name": "workspace_operations_heartbeat_run_id_heartbeat_runs_id_fk",
"tableFrom": "workspace_operations",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"heartbeat_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"workspace_operations_issue_id_issues_id_fk": {
"name": "workspace_operations_issue_id_issues_id_fk",
"tableFrom": "workspace_operations",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -59590,9 +59785,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"workspace_runtime_services_company_execution_workspace_status_idx": {
"name": "workspace_runtime_services_company_execution_workspace_status_idx",
@@ -59617,9 +59812,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"workspace_runtime_services_company_project_status_idx": {
"name": "workspace_runtime_services_company_project_status_idx",
@@ -59644,9 +59839,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"workspace_runtime_services_run_idx": {
"name": "workspace_runtime_services_run_idx",
@@ -59659,9 +59854,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"workspace_runtime_services_company_updated_idx": {
"name": "workspace_runtime_services_company_updated_idx",
@@ -59680,102 +59875,102 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"workspace_runtime_services_company_id_companies_id_fk": {
"name": "workspace_runtime_services_company_id_companies_id_fk",
"tableFrom": "workspace_runtime_services",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"workspace_runtime_services_project_id_projects_id_fk": {
"name": "workspace_runtime_services_project_id_projects_id_fk",
"tableFrom": "workspace_runtime_services",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"workspace_runtime_services_project_workspace_id_project_workspaces_id_fk": {
"name": "workspace_runtime_services_project_workspace_id_project_workspaces_id_fk",
"tableFrom": "workspace_runtime_services",
+ "tableTo": "project_workspaces",
"columnsFrom": [
"project_workspace_id"
],
- "tableTo": "project_workspaces",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"workspace_runtime_services_execution_workspace_id_execution_workspaces_id_fk": {
"name": "workspace_runtime_services_execution_workspace_id_execution_workspaces_id_fk",
"tableFrom": "workspace_runtime_services",
+ "tableTo": "execution_workspaces",
"columnsFrom": [
"execution_workspace_id"
],
- "tableTo": "execution_workspaces",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"workspace_runtime_services_issue_id_issues_id_fk": {
"name": "workspace_runtime_services_issue_id_issues_id_fk",
"tableFrom": "workspace_runtime_services",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"workspace_runtime_services_owner_agent_id_agents_id_fk": {
"name": "workspace_runtime_services_owner_agent_id_agents_id_fk",
"tableFrom": "workspace_runtime_services",
+ "tableTo": "agents",
"columnsFrom": [
"owner_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"workspace_runtime_services_started_by_run_id_heartbeat_runs_id_fk": {
"name": "workspace_runtime_services_started_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "workspace_runtime_services",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"started_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -59923,9 +60118,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"mcp_attachment_upload_expiry_idx": {
"name": "mcp_attachment_upload_expiry_idx",
@@ -59938,50 +60133,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"mcp_attachment_uploads_grant_id_mcp_oauth_grants_id_fk": {
"name": "mcp_attachment_uploads_grant_id_mcp_oauth_grants_id_fk",
"tableFrom": "mcp_attachment_uploads",
+ "tableTo": "mcp_oauth_grants",
"columnsFrom": [
"grant_id"
],
- "tableTo": "mcp_oauth_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"mcp_attachment_uploads_company_id_companies_id_fk": {
"name": "mcp_attachment_uploads_company_id_companies_id_fk",
"tableFrom": "mcp_attachment_uploads",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"mcp_attachment_uploads_user_id_user_id_fk": {
"name": "mcp_attachment_uploads_user_id_user_id_fk",
"tableFrom": "mcp_attachment_uploads",
+ "tableTo": "user",
"columnsFrom": [
"user_id"
],
- "tableTo": "user",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -60057,9 +60252,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"mcp_event_admissions_grant_idx": {
"name": "mcp_event_admissions_grant_idx",
@@ -60072,9 +60267,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"mcp_event_admissions_company_idx": {
"name": "mcp_event_admissions_company_idx",
@@ -60087,37 +60282,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"mcp_event_admissions_company_id_companies_id_fk": {
"name": "mcp_event_admissions_company_id_companies_id_fk",
"tableFrom": "mcp_event_admissions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"mcp_event_admissions_grant_id_mcp_oauth_grants_id_fk": {
"name": "mcp_event_admissions_grant_id_mcp_oauth_grants_id_fk",
"tableFrom": "mcp_event_admissions",
+ "tableTo": "mcp_oauth_grants",
"columnsFrom": [
"grant_id"
],
- "tableTo": "mcp_oauth_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -60206,9 +60401,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"mcp_event_deliveries_activity_uq": {
"name": "mcp_event_deliveries_activity_uq",
@@ -60227,9 +60422,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"mcp_event_deliveries_due_idx": {
"name": "mcp_event_deliveries_due_idx",
@@ -60242,24 +60437,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"mcp_event_deliveries_subscription_id_mcp_event_subscriptions_id_fk": {
"name": "mcp_event_deliveries_subscription_id_mcp_event_subscriptions_id_fk",
"tableFrom": "mcp_event_deliveries",
+ "tableTo": "mcp_event_subscriptions",
"columnsFrom": [
"subscription_id"
],
- "tableTo": "mcp_event_subscriptions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -60370,9 +60565,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"mcp_event_subscriptions_company_idx": {
"name": "mcp_event_subscriptions_company_idx",
@@ -60385,37 +60580,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"mcp_event_subscriptions_company_id_companies_id_fk": {
"name": "mcp_event_subscriptions_company_id_companies_id_fk",
"tableFrom": "mcp_event_subscriptions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"mcp_event_subscriptions_grant_id_mcp_oauth_grants_id_fk": {
"name": "mcp_event_subscriptions_grant_id_mcp_oauth_grants_id_fk",
"tableFrom": "mcp_event_subscriptions",
+ "tableTo": "mcp_oauth_grants",
"columnsFrom": [
"grant_id"
],
- "tableTo": "mcp_oauth_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -60495,9 +60690,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"mcp_file_ticket_grant_idx": {
"name": "mcp_file_ticket_grant_idx",
@@ -60510,50 +60705,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"mcp_file_tickets_company_id_companies_id_fk": {
"name": "mcp_file_tickets_company_id_companies_id_fk",
"tableFrom": "mcp_file_tickets",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"mcp_file_tickets_grant_id_mcp_oauth_grants_id_fk": {
"name": "mcp_file_tickets_grant_id_mcp_oauth_grants_id_fk",
"tableFrom": "mcp_file_tickets",
+ "tableTo": "mcp_oauth_grants",
"columnsFrom": [
"grant_id"
],
- "tableTo": "mcp_oauth_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"mcp_file_tickets_upload_id_mcp_attachment_uploads_id_fk": {
"name": "mcp_file_tickets_upload_id_mcp_attachment_uploads_id_fk",
"tableFrom": "mcp_file_tickets",
+ "tableTo": "mcp_attachment_uploads",
"columnsFrom": [
"upload_id"
],
- "tableTo": "mcp_attachment_uploads",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -60660,9 +60855,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"mcp_mutation_receipts_company_idx": {
"name": "mcp_mutation_receipts_company_idx",
@@ -60675,50 +60870,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"mcp_mutation_receipts_company_id_companies_id_fk": {
"name": "mcp_mutation_receipts_company_id_companies_id_fk",
"tableFrom": "mcp_mutation_receipts",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"mcp_mutation_receipts_user_id_user_id_fk": {
"name": "mcp_mutation_receipts_user_id_user_id_fk",
"tableFrom": "mcp_mutation_receipts",
+ "tableTo": "user",
"columnsFrom": [
"user_id"
],
- "tableTo": "user",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"mcp_mutation_receipts_grant_id_mcp_oauth_grants_id_fk": {
"name": "mcp_mutation_receipts_grant_id_mcp_oauth_grants_id_fk",
"tableFrom": "mcp_mutation_receipts",
+ "tableTo": "mcp_oauth_grants",
"columnsFrom": [
"grant_id"
],
- "tableTo": "mcp_oauth_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -60884,9 +61079,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"mcp_oauth_user_code_uq": {
"name": "mcp_oauth_user_code_uq",
@@ -60899,9 +61094,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"mcp_oauth_device_expiry_idx": {
"name": "mcp_oauth_device_expiry_idx",
@@ -60914,37 +61109,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"mcp_oauth_device_requests_client_id_mcp_oauth_clients_id_fk": {
"name": "mcp_oauth_device_requests_client_id_mcp_oauth_clients_id_fk",
"tableFrom": "mcp_oauth_device_requests",
+ "tableTo": "mcp_oauth_clients",
"columnsFrom": [
"client_id"
],
- "tableTo": "mcp_oauth_clients",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"mcp_oauth_device_requests_grant_id_mcp_oauth_grants_id_fk": {
"name": "mcp_oauth_device_requests_grant_id_mcp_oauth_grants_id_fk",
"tableFrom": "mcp_oauth_device_requests",
+ "tableTo": "mcp_oauth_grants",
"columnsFrom": [
"grant_id"
],
- "tableTo": "mcp_oauth_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -61039,63 +61234,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"mcp_oauth_grants_company_id_companies_id_fk": {
"name": "mcp_oauth_grants_company_id_companies_id_fk",
"tableFrom": "mcp_oauth_grants",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"mcp_oauth_grants_user_id_user_id_fk": {
"name": "mcp_oauth_grants_user_id_user_id_fk",
"tableFrom": "mcp_oauth_grants",
+ "tableTo": "user",
"columnsFrom": [
"user_id"
],
- "tableTo": "user",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"mcp_oauth_grants_client_id_mcp_oauth_clients_id_fk": {
"name": "mcp_oauth_grants_client_id_mcp_oauth_clients_id_fk",
"tableFrom": "mcp_oauth_grants",
+ "tableTo": "mcp_oauth_clients",
"columnsFrom": [
"client_id"
],
- "tableTo": "mcp_oauth_clients",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"mcp_oauth_grants_agent_id_agents_id_fk": {
"name": "mcp_oauth_grants_agent_id_agents_id_fk",
"tableFrom": "mcp_oauth_grants",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -61140,9 +61335,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {},
@@ -61254,9 +61449,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"mcp_oauth_requests_expiry_idx": {
"name": "mcp_oauth_requests_expiry_idx",
@@ -61269,37 +61464,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"mcp_oauth_requests_client_id_mcp_oauth_clients_id_fk": {
"name": "mcp_oauth_requests_client_id_mcp_oauth_clients_id_fk",
"tableFrom": "mcp_oauth_requests",
+ "tableTo": "mcp_oauth_clients",
"columnsFrom": [
"client_id"
],
- "tableTo": "mcp_oauth_clients",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"mcp_oauth_requests_grant_id_mcp_oauth_grants_id_fk": {
"name": "mcp_oauth_requests_grant_id_mcp_oauth_grants_id_fk",
"tableFrom": "mcp_oauth_requests",
+ "tableTo": "mcp_oauth_grants",
"columnsFrom": [
"grant_id"
],
- "tableTo": "mcp_oauth_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -61369,9 +61564,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"mcp_oauth_tokens_grant_idx": {
"name": "mcp_oauth_tokens_grant_idx",
@@ -61384,9 +61579,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"mcp_oauth_tokens_expiry_idx": {
"name": "mcp_oauth_tokens_expiry_idx",
@@ -61399,24 +61594,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"mcp_oauth_tokens_grant_id_mcp_oauth_grants_id_fk": {
"name": "mcp_oauth_tokens_grant_id_mcp_oauth_grants_id_fk",
"tableFrom": "mcp_oauth_tokens",
+ "tableTo": "mcp_oauth_grants",
"columnsFrom": [
"grant_id"
],
- "tableTo": "mcp_oauth_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -61549,9 +61744,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"external_holds_agent_idx": {
"name": "external_holds_agent_idx",
@@ -61570,37 +61765,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"external_agent_holds_company_id_companies_id_fk": {
"name": "external_agent_holds_company_id_companies_id_fk",
"tableFrom": "external_agent_holds",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"external_agent_holds_agent_id_agents_id_fk": {
"name": "external_agent_holds_agent_id_agents_id_fk",
"tableFrom": "external_agent_holds",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -61813,10 +62008,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"muse_agent_bindings\".\"revoked_at\" IS NULL",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"muse_bindings_ticket_uq": {
"name": "muse_bindings_ticket_uq",
@@ -61829,9 +62024,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"muse_bindings_active_grant_uq": {
"name": "muse_bindings_active_grant_uq",
@@ -61844,51 +62039,51 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"muse_agent_bindings\".\"revoked_at\" IS NULL AND \"muse_agent_bindings\".\"grant_id\" IS NOT NULL",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"muse_agent_bindings_company_id_companies_id_fk": {
"name": "muse_agent_bindings_company_id_companies_id_fk",
"tableFrom": "muse_agent_bindings",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"muse_agent_bindings_agent_id_agents_id_fk": {
"name": "muse_agent_bindings_agent_id_agents_id_fk",
"tableFrom": "muse_agent_bindings",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"muse_agent_bindings_grant_id_mcp_oauth_grants_id_fk": {
"name": "muse_agent_bindings_grant_id_mcp_oauth_grants_id_fk",
"tableFrom": "muse_agent_bindings",
+ "tableTo": "mcp_oauth_grants",
"columnsFrom": [
"grant_id"
],
- "tableTo": "mcp_oauth_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -61982,9 +62177,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"muse_credentials_binding_idx": {
"name": "muse_credentials_binding_idx",
@@ -62003,37 +62198,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"muse_credentials_company_id_companies_id_fk": {
"name": "muse_credentials_company_id_companies_id_fk",
"tableFrom": "muse_credentials",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"muse_credentials_binding_id_muse_agent_bindings_id_fk": {
"name": "muse_credentials_binding_id_muse_agent_bindings_id_fk",
"tableFrom": "muse_credentials",
+ "tableTo": "muse_agent_bindings",
"columnsFrom": [
"binding_id"
],
- "tableTo": "muse_agent_bindings",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -62121,37 +62316,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"muse_idle_receipts_company_id_companies_id_fk": {
"name": "muse_idle_receipts_company_id_companies_id_fk",
"tableFrom": "muse_idle_receipts",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"muse_idle_receipts_binding_id_muse_agent_bindings_id_fk": {
"name": "muse_idle_receipts_binding_id_muse_agent_bindings_id_fk",
"tableFrom": "muse_idle_receipts",
+ "tableTo": "muse_agent_bindings",
"columnsFrom": [
"binding_id"
],
- "tableTo": "muse_agent_bindings",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -62251,9 +62446,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"muse_input_source_uq": {
"name": "muse_input_source_uq",
@@ -62272,37 +62467,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"muse_input_deliveries_company_id_companies_id_fk": {
"name": "muse_input_deliveries_company_id_companies_id_fk",
"tableFrom": "muse_input_deliveries",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"muse_input_deliveries_assignment_id_muse_runner_assignments_id_fk": {
"name": "muse_input_deliveries_assignment_id_muse_runner_assignments_id_fk",
"tableFrom": "muse_input_deliveries",
+ "tableTo": "muse_runner_assignments",
"columnsFrom": [
"assignment_id"
],
- "tableTo": "muse_runner_assignments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -62408,9 +62603,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"muse_mailbox_cursor_idx": {
"name": "muse_mailbox_cursor_idx",
@@ -62435,50 +62630,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"muse_mailbox_items_company_id_companies_id_fk": {
"name": "muse_mailbox_items_company_id_companies_id_fk",
"tableFrom": "muse_mailbox_items",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"muse_mailbox_items_binding_id_muse_agent_bindings_id_fk": {
"name": "muse_mailbox_items_binding_id_muse_agent_bindings_id_fk",
"tableFrom": "muse_mailbox_items",
+ "tableTo": "muse_agent_bindings",
"columnsFrom": [
"binding_id"
],
- "tableTo": "muse_agent_bindings",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"muse_mailbox_items_assignment_id_muse_runner_assignments_id_fk": {
"name": "muse_mailbox_items_assignment_id_muse_runner_assignments_id_fk",
"tableFrom": "muse_mailbox_items",
+ "tableTo": "muse_runner_assignments",
"columnsFrom": [
"assignment_id"
],
- "tableTo": "muse_runner_assignments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -62610,37 +62805,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"muse_receiver_contact_buckets_company_id_companies_id_fk": {
"name": "muse_receiver_contact_buckets_company_id_companies_id_fk",
"tableFrom": "muse_receiver_contact_buckets",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"muse_receiver_contact_buckets_binding_id_muse_agent_bindings_id_fk": {
"name": "muse_receiver_contact_buckets_binding_id_muse_agent_bindings_id_fk",
"tableFrom": "muse_receiver_contact_buckets",
+ "tableTo": "muse_agent_bindings",
"columnsFrom": [
"binding_id"
],
- "tableTo": "muse_agent_bindings",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -62809,9 +63004,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"muse_assignments_live_binding_uq": {
"name": "muse_assignments_live_binding_uq",
@@ -62824,10 +63019,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"muse_runner_assignments\".\"status\" IN ('offered','claimed','accepted')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"muse_assignments_company_idx": {
"name": "muse_assignments_company_idx",
@@ -62840,63 +63035,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"muse_runner_assignments_company_id_companies_id_fk": {
"name": "muse_runner_assignments_company_id_companies_id_fk",
"tableFrom": "muse_runner_assignments",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"muse_runner_assignments_binding_id_muse_agent_bindings_id_fk": {
"name": "muse_runner_assignments_binding_id_muse_agent_bindings_id_fk",
"tableFrom": "muse_runner_assignments",
+ "tableTo": "muse_agent_bindings",
"columnsFrom": [
"binding_id"
],
- "tableTo": "muse_agent_bindings",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"muse_runner_assignments_run_id_heartbeat_runs_id_fk": {
"name": "muse_runner_assignments_run_id_heartbeat_runs_id_fk",
"tableFrom": "muse_runner_assignments",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"muse_runner_assignments_agent_id_agents_id_fk": {
"name": "muse_runner_assignments_agent_id_agents_id_fk",
"tableFrom": "muse_runner_assignments",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -63004,37 +63199,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"muse_runner_operations_company_id_companies_id_fk": {
"name": "muse_runner_operations_company_id_companies_id_fk",
"tableFrom": "muse_runner_operations",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"muse_runner_operations_assignment_id_muse_runner_assignments_id_fk": {
"name": "muse_runner_operations_assignment_id_muse_runner_assignments_id_fk",
"tableFrom": "muse_runner_operations",
+ "tableTo": "muse_runner_assignments",
"columnsFrom": [
"assignment_id"
],
- "tableTo": "muse_runner_assignments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -63092,15 +63287,15 @@
"company_prompt_injection_prevention_company_id_companies_id_fk": {
"name": "company_prompt_injection_prevention_company_id_companies_id_fk",
"tableFrom": "company_prompt_injection_prevention",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -63314,9 +63509,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"prompt_injection_invocations_pending_idx": {
"name": "prompt_injection_invocations_pending_idx",
@@ -63329,10 +63524,10 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"prompt_injection_invocations\".\"status\" = 'running'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"prompt_injection_invocations_cost_idx": {
"name": "prompt_injection_invocations_cost_idx",
@@ -63345,37 +63540,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"prompt_injection_invocations_company_id_companies_id_fk": {
"name": "prompt_injection_invocations_company_id_companies_id_fk",
"tableFrom": "prompt_injection_invocations",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"prompt_injection_invocations_cost_event_id_cost_events_id_fk": {
"name": "prompt_injection_invocations_cost_event_id_cost_events_id_fk",
"tableFrom": "prompt_injection_invocations",
+ "tableTo": "cost_events",
"columnsFrom": [
"cost_event_id"
],
- "tableTo": "cost_events",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -63396,21 +63591,21 @@
},
"enums": {},
"schemas": {},
- "views": {},
"sequences": {
"public.chat_telegram_draft_ids": {
"name": "chat_telegram_draft_ids",
+ "schema": "public",
"increment": "1",
+ "startWith": "1",
"minValue": "1",
"maxValue": "2147483647",
- "startWith": "1",
"cache": "1",
- "cycle": false,
- "schema": "public"
+ "cycle": false
}
},
"roles": {},
"policies": {},
+ "views": {},
"_meta": {
"columns": {},
"schemas": {},
diff --git a/packages/db/src/migrations/meta/_journal.json b/packages/db/src/migrations/meta/_journal.json
index 235a6f765c..b602e0bf3e 100644
--- a/packages/db/src/migrations/meta/_journal.json
+++ b/packages/db/src/migrations/meta/_journal.json
@@ -2577,6 +2577,13 @@
"when": 1792541385924,
"tag": "0369_late_logan",
"breakpoints": true
+ },
+ {
+ "idx": 370,
+ "version": "7",
+ "when": 1792544911793,
+ "tag": "0370_flimsy_lord_tyger",
+ "breakpoints": true
}
]
}
\ No newline at end of file
diff --git a/packages/db/src/schema/company_secrets.ts b/packages/db/src/schema/company_secrets.ts
index ac6da0af2f..c5792bd467 100644
--- a/packages/db/src/schema/company_secrets.ts
+++ b/packages/db/src/schema/company_secrets.ts
@@ -1,6 +1,7 @@
import { sql } from "drizzle-orm";
import { check, pgTable, uuid, text, timestamp, integer, jsonb, index, uniqueIndex, foreignKey } from "drizzle-orm/pg-core";
import { companies } from "./companies.js";
+import { projects } from "./projects.js";
import { agents } from "./agents.js";
import { companySecretProviderConfigs } from "./company_secret_provider_configs.js";
import { userSecretDefinitions } from "./user_secret_definitions.js";
@@ -14,6 +15,7 @@ export const companySecrets = pgTable(
scope: text("scope").notNull().default("company"),
ownerUserId: text("owner_user_id"),
ownerAgentId: uuid("owner_agent_id"),
+ ownerProjectId: uuid("owner_project_id"),
ownerPluginId: uuid("owner_plugin_id").references(() => plugins.id, { onDelete: "cascade" }),
userSecretDefinitionId: uuid("user_secret_definition_id").references(() => userSecretDefinitions.id, { onDelete: "set null" }),
key: text("key").notNull(),
@@ -46,6 +48,9 @@ export const companySecrets = pgTable(
),
companyProviderIdx: index("company_secrets_company_provider_idx").on(table.companyId, table.provider),
agentOwner: foreignKey({ columns: [table.companyId, table.ownerAgentId], foreignColumns: [agents.companyId, agents.id] }).onDelete("cascade"),
+ projectOwner: foreignKey({ columns: [table.companyId, table.ownerProjectId], foreignColumns: [projects.companyId, projects.id] }).onDelete("cascade"),
+ projectInstanceOwnerKeyUq: uniqueIndex("company_secrets_project_instance_owner_key_uq").on(table.companyId, table.ownerProjectId, table.ownerPluginId, table.key)
+ .where(sql`${table.scope} = 'instance' and ${table.deletedAt} is null`),
instanceOwnerKeyUq: uniqueIndex("company_secrets_instance_owner_key_uq").on(table.companyId, table.ownerAgentId, table.ownerPluginId, table.key)
.where(sql`${table.scope} = 'instance' and ${table.deletedAt} is null`),
providerConfigIdx: index("company_secrets_provider_config_idx").on(table.providerConfigId),
@@ -64,16 +69,17 @@ export const companySecrets = pgTable(
${table.scope} = 'company'
and ${table.ownerUserId} is null
and ${table.userSecretDefinitionId} is null
- and ${table.ownerAgentId} is null and ${table.ownerPluginId} is null
+ and ${table.ownerAgentId} is null and ${table.ownerProjectId} is null and ${table.ownerPluginId} is null
) or (
${table.scope} = 'user'
and ${table.ownerUserId} is not null
and ${table.userSecretDefinitionId} is not null
- and ${table.ownerAgentId} is null and ${table.ownerPluginId} is null
+ and ${table.ownerAgentId} is null and ${table.ownerProjectId} is null and ${table.ownerPluginId} is null
) or (
${table.scope} = 'instance'
and ${table.ownerUserId} is null and ${table.userSecretDefinitionId} is null
- and ${table.ownerAgentId} is not null and ${table.ownerPluginId} is not null
+ and (${table.ownerAgentId} is not null) <> (${table.ownerProjectId} is not null)
+ and ${table.ownerPluginId} is not null
)`,
),
}),
diff --git a/packages/db/src/schema/projects.ts b/packages/db/src/schema/projects.ts
index 8cd7174625..74cfdb6c3f 100644
--- a/packages/db/src/schema/projects.ts
+++ b/packages/db/src/schema/projects.ts
@@ -30,6 +30,7 @@ export const projects = pgTable(
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
},
(table) => ({
+ companyIdUq: uniqueIndex("projects_company_id_uq").on(table.companyId, table.id),
companyIdx: index("projects_company_idx").on(table.companyId),
visibilityCheck: check("projects_visibility_check", sql`${table.visibility} in ('open', 'private')`),
personalOwnerUq: uniqueIndex("projects_company_personal_owner_uq")
diff --git a/packages/plugins/sdk/README.md b/packages/plugins/sdk/README.md
index 5448ba6af9..03907ed52f 100644
--- a/packages/plugins/sdk/README.md
+++ b/packages/plugins/sdk/README.md
@@ -1373,3 +1373,29 @@ other Core-host filesystem operations are unavailable for managed storage.
Use `createWorkspaceProviderHarness` from `@paperclipai/plugin-sdk/testing` to
validate hook inputs and outputs without allocating an execution environment.
+
+
+### Private project instance credentials
+
+Project lifecycle plugins can opt into `projects.instance-secrets` alongside
+`events.subscribe` and `resourceLifecycle: ["project"]`. Automatic project
+callbacks receive `event.instanceSecrets`; return an `instanceSecrets` patch
+with an acknowledged result. Core stores the patch in the existing native
+instance-secret system and acknowledges the event in one transaction. A null
+value removes a key. Retry and deferred results do not store patches.
+
+Each company/project/installed-plugin owns its credentials. Up to 16 lowercase
+snake_case keys may change per result; nonempty string values are limited to
+128 KiB each. Core rejects replies if configuration, project sources, lifecycle
+state, or secret versions changed during the callback. A duplicate response to
+an acknowledged event cannot overwrite credentials. Deleted projects allow
+removal only; their secrets are also deleted by the native owner foreign key.
+
+Trusted worker code can use
+`ctx.projects.getInstanceSecrets(projectId, companyId)` during a company-scoped
+invocation to read its credentials without an external service call. Archived
+or missing projects cannot be read this way. Values never appear in ordinary
+lifecycle inbox listings or the company secret catalog. Do not expose values
+through plugin entities, state, data handlers, UI, or logs. Agent instance
+secrets retain their existing lifecycle contract. Back up the tenant's existing
+local secrets master key together with its database.
diff --git a/packages/plugins/sdk/src/host-client-factory.ts b/packages/plugins/sdk/src/host-client-factory.ts
index 6c34d6c5b9..35ed9bd499 100644
--- a/packages/plugins/sdk/src/host-client-factory.ts
+++ b/packages/plugins/sdk/src/host-client-factory.ts
@@ -202,6 +202,7 @@ export interface HostServices {
projects: {
list(params: WorkerToHostMethods["projects.list"][0]): Promise<WorkerToHostMethods["projects.list"][1]>;
get(params: WorkerToHostMethods["projects.get"][0]): Promise<WorkerToHostMethods["projects.get"][1]>;
+ getInstanceSecrets(params: WorkerToHostMethods["projects.getInstanceSecrets"][0]): Promise<WorkerToHostMethods["projects.getInstanceSecrets"][1]>;
listWorkspaces(params: WorkerToHostMethods["projects.listWorkspaces"][0]): Promise<WorkerToHostMethods["projects.listWorkspaces"][1]>;
getPrimaryWorkspace(params: WorkerToHostMethods["projects.getPrimaryWorkspace"][0]): Promise<WorkerToHostMethods["projects.getPrimaryWorkspace"][1]>;
getWorkspaceForIssue(params: WorkerToHostMethods["projects.getWorkspaceForIssue"][0]): Promise<WorkerToHostMethods["projects.getWorkspaceForIssue"][1]>;
@@ -440,6 +441,7 @@ const METHOD_CAPABILITY_MAP: Record<WorkerToHostMethodName, PluginCapability | n
// Projects
"projects.list": "projects.read",
"projects.get": "projects.read",
+ "projects.getInstanceSecrets": "projects.instance-secrets",
"projects.listWorkspaces": "project.workspaces.read",
"projects.getPrimaryWorkspace": "project.workspaces.read",
"projects.getWorkspaceForIssue": "project.workspaces.read",
@@ -830,6 +832,10 @@ export function createHostClientHandlers(
"projects.list": gated("projects.list", async (params) => {
return services.projects.list(params);
}),
+ "projects.getInstanceSecrets": gated("projects.getInstanceSecrets", async (params, context) => {
+ const companyId = resolveRequiredCompanyId("projects.getInstanceSecrets", params, context);
+ return services.projects.getInstanceSecrets({ ...params, companyId });
+ }),
"projects.get": gated("projects.get", async (params) => {
return services.projects.get(params);
}),
diff --git a/packages/plugins/sdk/src/protocol.ts b/packages/plugins/sdk/src/protocol.ts
index c8770fde64..a6d8d0b526 100644
--- a/packages/plugins/sdk/src/protocol.ts
+++ b/packages/plugins/sdk/src/protocol.ts
@@ -1794,6 +1794,10 @@ export interface WorkerToHostMethods {
params: { companyId: string; limit?: number; offset?: number },
result: Project[],
];
+ "projects.getInstanceSecrets": [
+ params: { projectId: string; companyId: string },
+ result: Record<string, string>,
+ ];
"projects.get": [
params: { projectId: string; companyId: string },
result: Project | null,
diff --git a/packages/plugins/sdk/src/testing.ts b/packages/plugins/sdk/src/testing.ts
index 58f2bcf85c..1f268522cf 100644
--- a/packages/plugins/sdk/src/testing.ts
+++ b/packages/plugins/sdk/src/testing.ts
@@ -112,6 +112,7 @@ export interface TestHarness {
seed(input: {
companies?: Company[];
lifecycleEvents?: ResourceLifecycleEvent[];
+ projectInstanceSecrets?: Array<{ companyId: string; projectId: string; values: Record<string, string> }>;
projects?: Project[];
issues?: Issue[];
issueComments?: IssueComment[];
@@ -506,6 +507,7 @@ export function createTestHarness(options: TestHarnessOptions): TestHarness {
const lifecycleEvents = new Map<string, ResourceLifecycleEvent>();
const lifecycleAcknowledgments = new Set<string>();
const projects = new Map<string, Project>();
+ const projectInstanceSecrets = new Map<string, Record<string, string>>();
const routines = new Map<string, Routine>();
const routineRuns = new Map<string, RoutineRun>();
const issues = new Map<string, Issue>();
@@ -1030,6 +1032,14 @@ export function createTestHarness(options: TestHarnessOptions): TestHarness {
},
},
projects: {
+ async getInstanceSecrets(projectId, companyId) {
+ requireCapability(manifest, capabilitySet, "projects.instance-secrets");
+ requireCapability(manifest, capabilitySet, "events.subscribe");
+ if (!manifest.resourceLifecycle?.includes("project")) throw new Error("Project instance secrets outside plugin scope");
+ const project = projects.get(projectId);
+ if (!isInCompany(project, companyId) || project.archivedAt) throw new Error("Project instance secrets unavailable");
+ return structuredClone(projectInstanceSecrets.get(JSON.stringify([companyId, projectId])) ?? {});
+ },
async list(input) {
requireCapability(manifest, capabilitySet, "projects.read");
const companyId = requireCompanyId(input?.companyId);
@@ -2586,6 +2596,7 @@ export function createTestHarness(options: TestHarnessOptions): TestHarness {
for (const row of input.lifecycleEvents ?? []) lifecycleEvents.set(row.id, row);
for (const row of input.companies ?? []) companies.set(row.id, row);
for (const row of input.projects ?? []) projects.set(row.id, row);
+ for (const row of input.projectInstanceSecrets ?? []) projectInstanceSecrets.set(JSON.stringify([row.companyId, row.projectId]), structuredClone(row.values));
for (const row of input.issues ?? []) {
issues.set(row.id, row);
if (row.blockedBy) {
diff --git a/packages/plugins/sdk/src/types.ts b/packages/plugins/sdk/src/types.ts
index 8414142463..a81b7b56d9 100644
--- a/packages/plugins/sdk/src/types.ts
+++ b/packages/plugins/sdk/src/types.ts
@@ -592,6 +592,9 @@ export interface PluginEventsClient {
}
export type ResourceLifecycleEvent = {
+ /** Native private credentials for this plugin/project. Only supplied to automatic
+ * project lifecycle callbacks with projects.instance-secrets. Never expose to UI. */
+ instanceSecrets?: Record<string, string>;
id: string;
companyId: string;
resourceId: string;
@@ -609,6 +612,9 @@ export type ResourceLifecycleEvent = {
export interface ResourceLifecycleResult {
eventId: string;
status: "acknowledged" | "retry" | "deferred";
+ /** Project-only patch, saved atomically with acknowledgment. Null removes a key.
+ * Up to 16 lowercase snake_case keys, each value at most 128 KiB. */
+ instanceSecrets?: Record<string, string | null>;
}
/**
@@ -869,6 +875,10 @@ export interface PluginEntitiesClient {
* @see PLUGIN_SPEC.md §7 — Project Workspaces
*/
export interface PluginProjectsClient {
+ /** Trusted worker access to this plugin’s native project credentials.
+ * Requires projects.instance-secrets; never expose via UI/data handlers. */
+ getInstanceSecrets(projectId: string, companyId: string): Promise<Record<string, string>>;
+
/**
* List projects visible to the plugin.
*
diff --git a/packages/plugins/sdk/src/worker-rpc-host.ts b/packages/plugins/sdk/src/worker-rpc-host.ts
index 0dbaad6e88..8a96d57db9 100644
--- a/packages/plugins/sdk/src/worker-rpc-host.ts
+++ b/packages/plugins/sdk/src/worker-rpc-host.ts
@@ -730,6 +730,9 @@ export function startWorkerRpcHost(options: WorkerRpcHostOptions): WorkerRpcHost
async get(projectId: string, companyId: string) {
return callHost("projects.get", { projectId, companyId });
},
+ async getInstanceSecrets(projectId, companyId) {
+ return callHost("projects.getInstanceSecrets", { projectId, companyId });
+ },
async listWorkspaces(projectId: string, companyId: string) {
return callHost("projects.listWorkspaces", { projectId, companyId });
diff --git a/packages/plugins/sdk/tests/host-client-factory.test.ts b/packages/plugins/sdk/tests/host-client-factory.test.ts
index 31655d3682..cb42df7327 100644
--- a/packages/plugins/sdk/tests/host-client-factory.test.ts
+++ b/packages/plugins/sdk/tests/host-client-factory.test.ts
@@ -435,3 +435,20 @@ describe("agent runtime reader", () => {
expect(getRuntime).toHaveBeenCalledOnce();
});
});
+
+describe("project instance secrets", () => {
+ it("requires the capability and host-authorized company scope", async () => {
+ const getInstanceSecrets = vi.fn(async () => ({ mount_grants: "fixture" }));
+ const services = { projects: { getInstanceSecrets } } as unknown as HostServices;
+ const params = { companyId: "company-a", projectId: "project-a" };
+ const context = { invocationScope: { companyId: "company-a" } };
+ const denied = createHostClientHandlers({ pluginId: "fixture", capabilities: [], services });
+ await expect(denied["projects.getInstanceSecrets"](params, context)).rejects.toBeInstanceOf(CapabilityDeniedError);
+ const allowed = createHostClientHandlers({ pluginId: "fixture", capabilities: ["projects.instance-secrets"], services });
+ await expect(allowed["projects.getInstanceSecrets"](params)).rejects.toBeInstanceOf(InvocationScopeDeniedError);
+ await expect(allowed["projects.getInstanceSecrets"](params, { invocationScope: { companyId: "other" } })).rejects.toBeInstanceOf(InvocationScopeDeniedError);
+ expect(getInstanceSecrets).not.toHaveBeenCalled();
+ await expect(allowed["projects.getInstanceSecrets"](params, context)).resolves.toEqual({ mount_grants: "fixture" });
+ expect(getInstanceSecrets).toHaveBeenCalledWith(params);
+ });
+});
diff --git a/packages/plugins/sdk/tests/project-instance-secrets.test.ts b/packages/plugins/sdk/tests/project-instance-secrets.test.ts
new file mode 100644
index 0000000000..26df249581
--- /dev/null
+++ b/packages/plugins/sdk/tests/project-instance-secrets.test.ts
@@ -0,0 +1,51 @@
+import { describe, expect, it } from "vitest";
+import { createTestHarness } from "../src/testing.js";
+import type { PaperclipPluginManifestV1 } from "../src/types.js";
+const manifest = {
+ id: "fixture",
+ apiVersion: 1,
+ resourceLifecycle: ["project"],
+ capabilities: ["projects.instance-secrets", "events.subscribe"],
+} as PaperclipPluginManifestV1;
+describe("project instance secret harness", () => {
+ it("returns only seeded company/project credentials and isolates returned copies", async () => {
+ const h = createTestHarness({ manifest });
+ h.seed({
+ projects: [{ id: "project", companyId: "company" }] as never,
+ projectInstanceSecrets: [
+ {
+ companyId: "company",
+ projectId: "project",
+ values: { mount_grants: "fixture" },
+ },
+ ],
+ });
+ const values = await h.ctx.projects.getInstanceSecrets(
+ "project",
+ "company",
+ );
+ expect(values).toEqual({ mount_grants: "fixture" });
+ values.mount_grants = "changed";
+ expect(
+ await h.ctx.projects.getInstanceSecrets("project", "company"),
+ ).toEqual({ mount_grants: "fixture" });
+ await expect(
+ h.ctx.projects.getInstanceSecrets("project", "other"),
+ ).rejects.toThrow();
+ await expect(
+ h.ctx.projects.getInstanceSecrets("missing", "company"),
+ ).rejects.toThrow();
+ h.seed({
+ projects: [
+ { id: "project", companyId: "company", archivedAt: "2020-01-01" },
+ ] as never,
+ });
+ await expect(
+ h.ctx.projects.getInstanceSecrets("project", "company"),
+ ).rejects.toThrow();
+ const denied = createTestHarness({ manifest, capabilities: [] });
+ await expect(
+ denied.ctx.projects.getInstanceSecrets("project", "company"),
+ ).rejects.toThrow();
+ });
+});
diff --git a/packages/shared/src/constants.ts b/packages/shared/src/constants.ts
index a9711dcfc7..675c8cede3 100644
--- a/packages/shared/src/constants.ts
+++ b/packages/shared/src/constants.ts
@@ -1323,6 +1323,7 @@ export const PLUGIN_CAPABILITIES = [
// Data Read
"companies.read",
"projects.read",
+ "projects.instance-secrets",
"project.workspaces.read",
"execution.workspaces.read",
"workspaces.manage",
diff --git a/server/src/__tests__/plugin-lifecycle-delivery.test.ts b/server/src/__tests__/plugin-lifecycle-delivery.test.ts
index 95eee6ca0c..f32f82b79c 100644
--- a/server/src/__tests__/plugin-lifecycle-delivery.test.ts
+++ b/server/src/__tests__/plugin-lifecycle-delivery.test.ts
@@ -1,7 +1,7 @@
-import { randomUUID } from "node:crypto";
+import { randomBytes, randomUUID } from "node:crypto";
import { EventEmitter } from "node:events";
import { eq } from "drizzle-orm";
-import { companies, createDb, pluginConfig, plugins, resourceLifecycleEvents, type Db } from "@paperclipai/db";
+import { companies, createDb, companySecrets, projects, pluginConfig, plugins, resourceLifecycleEvents, type Db } from "@paperclipai/db";
import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { getEmbeddedPostgresTestSupport, startEmbeddedPostgresTestDatabase } from "./helpers/embedded-postgres.js";
import { logger } from "../middleware/logger.js";
@@ -54,6 +54,40 @@ describePostgres("durable plugin lifecycle delivery", () => {
const worker = registerPluginLifecycleDelivery(coordinator as never, db, { call, isRunning: running, onConfigApplied } as unknown as PluginWorkerManager, lifecycle as unknown as PluginLifecycleManager);
return { call, running, wake, lifecycle, worker, applied: () => { for (const listener of configApplied) listener(); }, run: () => task.run(new AbortController().signal), pending: () => task.hasPending(), nextRunAt: () => task.nextRunAt?.(), settled: () => task.onSettled?.() };
}
+ it("supplies project native credentials only to opted-in callbacks and saves returned patches before acknowledgment", async () => {
+ vi.stubEnv("PAPERCLIP_SECRETS_MASTER_KEY", randomBytes(32).toString("base64"));
+ await db.update(plugins).set({ manifestJson: { resourceLifecycle: ["project"], capabilities: ["events.subscribe", "projects.instance-secrets"] } as never }).where(eq(plugins.id, pluginId));
+ const [project] = await db.insert(projects).values({ companyId, name: "Native credentials owner" }).returning();
+ await event(project.id);
+ const d = delivery();
+ d.call.mockImplementationOnce(async (_p, _m, input) => {
+ expect(input.instanceSecrets).toEqual({});
+ return { eventId: input.id, status: "acknowledged", instanceSecrets: { mount_grants: "fixture-private-grants" } };
+ });
+ try {
+ await d.run();
+ expect(await pluginLifecycleInbox(db, pluginId).list(companyId)).toEqual([]);
+ expect(await db.select().from(companySecrets).where(eq(companySecrets.ownerProjectId, project.id))).toHaveLength(1);
+ await event(project.id, "update");
+ d.call.mockImplementationOnce(async (_p, _m, input) => {
+ expect(input.instanceSecrets).toEqual({ mount_grants: "fixture-private-grants" });
+ return { eventId: input.id, status: "retry", instanceSecrets: { mount_grants: "must-not-save" } };
+ });
+ await d.run();
+ const [stored] = await db.select().from(companySecrets).where(eq(companySecrets.ownerProjectId, project.id));
+ expect(stored.latestVersion).toBe(1);
+ expect(JSON.stringify(await pluginLifecycleInbox(db, pluginId).list(companyId))).not.toContain("fixture-private-grants");
+ } finally { d.worker.dispose(); vi.unstubAllEnvs(); }
+ });
+ it("rejects credential patches from plugins without project instance secret scope", async () => {
+ await event(); const d = delivery();
+ d.call.mockImplementationOnce(async (_p, _m, input) => {
+ expect(input.instanceSecrets).toBeUndefined();
+ return { eventId: input.id, status: "acknowledged", instanceSecrets: { mount_grants: "private" } };
+ });
+ try { await d.run(); expect(await pluginLifecycleInbox(db, pluginId).list(companyId)).toHaveLength(1); }
+ finally { d.worker.dispose(); }
+ });
it.each([false, true])("does not wait for queued plugin callbacks during startup (runtime subscriber: %s)", async runtime => {
if (runtime) await db.update(plugins).set({ manifestJson: { resourceLifecycle: ["project", "agent_runtime"], capabilities: ["events.subscribe"] } as never }).where(eq(plugins.id, pluginId));
await event();
diff --git a/server/src/__tests__/project-instance-secrets.test.ts b/server/src/__tests__/project-instance-secrets.test.ts
new file mode 100644
index 0000000000..23457832d0
--- /dev/null
+++ b/server/src/__tests__/project-instance-secrets.test.ts
@@ -0,0 +1,477 @@
+import { randomBytes, randomUUID } from "node:crypto";
+import { afterAll, beforeAll, describe, expect, it, vi } from "vitest";
+import { and, eq } from "drizzle-orm";
+import {
+ activityLog,
+ companies,
+ companySecrets,
+ companySecretVersions,
+ pluginCompanySettings,
+ pluginConfig,
+ pluginLifecycleAcknowledgments,
+ plugins,
+ projects,
+ projectWorkspaces,
+ createDb,
+ type Db,
+} from "@paperclipai/db";
+import {
+ getEmbeddedPostgresTestSupport,
+ startEmbeddedPostgresTestDatabase,
+} from "./helpers/embedded-postgres.js";
+import {
+ projectInstanceSecretService,
+ validateProjectInstanceSecretChanges,
+} from "../services/project-instance-secrets.js";
+import { pluginLifecycleInbox } from "../services/plugin-lifecycle-inbox.js";
+import { recordResourceCreationEvent } from "../services/resource-lifecycle-events.js";
+import { secretService } from "../services/secrets.js";
+import { localEncryptedProvider } from "../secrets/local-encrypted-provider.js";
+import * as activity from "../services/activity-log.js";
+
+const support = await getEmbeddedPostgresTestSupport();
+(support.supported ? describe : describe.skip)(
+ "project instance secrets reuse native tenant storage",
+ () => {
+ let database: Awaited<ReturnType<typeof startEmbeddedPostgresTestDatabase>>,
+ db: Db;
+ const companyId = randomUUID(),
+ pluginId = randomUUID();
+ const value = "fixture-private-mount-grant";
+ beforeAll(async () => {
+ vi.stubEnv(
+ "PAPERCLIP_SECRETS_MASTER_KEY",
+ randomBytes(32).toString("base64"),
+ );
+ database = await startEmbeddedPostgresTestDatabase(
+ "paperclip-project-instance-secrets-",
+ );
+ db = createDb(database.connectionString);
+ await db.insert(companies).values({
+ id: companyId,
+ name: "Project credentials fixture",
+ issuePrefix: "PCI",
+ });
+ await db.insert(plugins).values({
+ id: pluginId,
+ pluginKey: pluginId,
+ packageName: "project-instance-fixture",
+ version: "1.0.0",
+ status: "ready",
+ manifestJson: {
+ resourceLifecycle: ["project"],
+ capabilities: ["events.subscribe", "projects.instance-secrets"],
+ } as never,
+ });
+ await db
+ .insert(pluginConfig)
+ .values({ pluginId, companyId, configJson: {} });
+ }, 90_000);
+ afterAll(async () => {
+ await database?.cleanup();
+ vi.unstubAllEnvs();
+ });
+ async function fixture() {
+ const [project] = await db
+ .insert(projects)
+ .values({ companyId, name: "Credential owner" })
+ .returning();
+ await db.transaction((tx) =>
+ recordResourceCreationEvent(
+ tx as unknown as Db,
+ companyId,
+ "project",
+ project.id,
+ ),
+ );
+ const inbox = pluginLifecycleInbox(db, pluginId);
+ const event = (await inbox.list(companyId, 100)).find(
+ (e) => e.resourceId === project.id,
+ )!;
+ const service = projectInstanceSecretService(db, pluginId);
+ return {
+ project,
+ event,
+ inbox,
+ service,
+ prepare: () => service.prepare(event),
+ async commit(changes: unknown) {
+ const { snapshot } = await service.prepare(event);
+ await inbox.acknowledge(companyId, event.id, { snapshot, changes });
+ },
+ };
+ }
+ it("encrypts native versions, survives restart, isolates owners, and hides values from catalogs and events", async () => {
+ const f = await fixture();
+ expect((await f.prepare()).instanceSecrets).toEqual({});
+ await f.commit({ mount_grants: value });
+ const [row] = await db
+ .select()
+ .from(companySecrets)
+ .where(eq(companySecrets.ownerProjectId, f.project.id));
+ expect(row).toMatchObject({
+ scope: "instance",
+ ownerAgentId: null,
+ ownerPluginId: pluginId,
+ latestVersion: 1,
+ provider: "local_encrypted",
+ });
+ const versions = await db
+ .select()
+ .from(companySecretVersions)
+ .where(eq(companySecretVersions.secretId, row.id));
+ expect(versions).toHaveLength(1);
+ expect(JSON.stringify(versions)).not.toContain(value);
+ expect(
+ await projectInstanceSecretService(
+ createDb(database.connectionString),
+ pluginId,
+ ).read(companyId, f.project.id),
+ ).toEqual({ mount_grants: value });
+ const native = secretService(db);
+ expect(
+ await native.projectInstance.read({
+ companyId: randomUUID(),
+ projectId: f.project.id,
+ pluginId,
+ }),
+ ).toEqual({});
+ expect(
+ await native.projectInstance.read({
+ companyId,
+ projectId: randomUUID(),
+ pluginId,
+ }),
+ ).toEqual({});
+ expect(
+ await native.projectInstance.read({
+ companyId,
+ projectId: f.project.id,
+ pluginId: randomUUID(),
+ }),
+ ).toEqual({});
+ expect(
+ await native.agentInstance.read({
+ companyId,
+ agentId: f.project.id,
+ pluginId,
+ }),
+ ).toEqual({});
+ expect(JSON.stringify(await native.list(companyId))).not.toContain(
+ row.id,
+ );
+ const logs = await db
+ .select()
+ .from(activityLog)
+ .where(eq(activityLog.entityId, f.project.id));
+ expect(logs).toHaveLength(1);
+ expect(logs[0].details).toEqual({ key: "mount_grants" });
+ expect(JSON.stringify(logs)).not.toContain(value);
+ expect(JSON.stringify(await f.inbox.list(companyId, 100))).not.toContain(
+ value,
+ );
+ await expect(
+ native.resolveSecretValue(companyId, row.id, "latest"),
+ ).rejects.toThrow();
+ });
+ it("commits credentials before publication and acknowledgment; duplicate late replies cannot overwrite them", async () => {
+ const f = await fixture();
+ const before = await f.prepare();
+ const published = vi
+ .spyOn(activity, "publishActivity")
+ .mockImplementation(() => {});
+ try {
+ await f.inbox.acknowledge(companyId, f.event.id, {
+ snapshot: before.snapshot,
+ changes: { mount_grants: value },
+ });
+ expect(published).toHaveBeenCalledTimes(1);
+ expect(await f.service.read(companyId, f.project.id)).toEqual({
+ mount_grants: value,
+ });
+ await f.inbox.acknowledge(companyId, f.event.id, {
+ snapshot: before.snapshot,
+ changes: { mount_grants: "late" },
+ });
+ expect(await f.service.read(companyId, f.project.id)).toEqual({
+ mount_grants: value,
+ });
+ expect(published).toHaveBeenCalledTimes(1);
+ } finally {
+ published.mockRestore();
+ }
+ });
+ it("rolls back partial native writes and acknowledgment on provider failure, then safely retries", async () => {
+ const f = await fixture(),
+ before = await f.prepare();
+ const prepare = localEncryptedProvider.createSecret.bind(
+ localEncryptedProvider,
+ );
+ const spy = vi
+ .spyOn(localEncryptedProvider, "createSecret")
+ .mockImplementationOnce(prepare)
+ .mockRejectedValueOnce(new Error(value));
+ try {
+ await expect(
+ f.inbox.acknowledge(companyId, f.event.id, {
+ snapshot: before.snapshot,
+ changes: { first: value, second: value },
+ }),
+ ).rejects.toThrow("Project instance secret storage unavailable");
+ } finally {
+ spy.mockRestore();
+ }
+ expect(await f.service.read(companyId, f.project.id)).toEqual({});
+ expect(
+ (await f.inbox.list(companyId, 100)).some((e) => e.id === f.event.id),
+ ).toBe(true);
+ expect(
+ await db
+ .select()
+ .from(activityLog)
+ .where(eq(activityLog.entityId, f.project.id)),
+ ).toEqual([]);
+ await f.commit({ mount_grants: value });
+ expect(await f.service.read(companyId, f.project.id)).toEqual({
+ mount_grants: value,
+ });
+ });
+ for (const change of [
+ "project",
+ "workspace",
+ "configuration",
+ "disabled",
+ "secret-version",
+ ] as const)
+ it(`rejects stale callback after ${change} changes`, async () => {
+ const f = await fixture(),
+ before = await f.prepare();
+ try {
+ if (change === "project")
+ await db
+ .update(projects)
+ .set({ name: "Changed" })
+ .where(eq(projects.id, f.project.id));
+ if (change === "workspace")
+ await db.insert(projectWorkspaces).values({
+ companyId,
+ projectId: f.project.id,
+ name: "Source",
+ repoUrl: "https://github.com/fixture/project",
+ });
+ if (change === "configuration")
+ await db
+ .update(pluginConfig)
+ .set({ configJson: { changed: true } })
+ .where(eq(pluginConfig.pluginId, pluginId));
+ if (change === "disabled")
+ await db
+ .insert(pluginCompanySettings)
+ .values({ pluginId, companyId, enabled: false });
+ if (change === "secret-version")
+ await secretService(db).projectInstance.set(
+ { companyId, projectId: f.project.id, pluginId },
+ "mount_grants",
+ "newer",
+ );
+ await expect(
+ f.inbox.acknowledge(companyId, f.event.id, {
+ snapshot: before.snapshot,
+ changes: { mount_grants: value },
+ }),
+ ).rejects.toThrow();
+ expect(
+ await db
+ .select()
+ .from(pluginLifecycleAcknowledgments)
+ .where(
+ and(
+ eq(pluginLifecycleAcknowledgments.pluginId, pluginId),
+ eq(
+ pluginLifecycleAcknowledgments.eventId,
+ Number(f.event.id),
+ ),
+ ),
+ ),
+ ).toEqual([]);
+ } finally {
+ if (change === "disabled")
+ await db
+ .delete(pluginCompanySettings)
+ .where(eq(pluginCompanySettings.pluginId, pluginId));
+ if (change === "configuration")
+ await db
+ .update(pluginConfig)
+ .set({ configJson: {} })
+ .where(eq(pluginConfig.pluginId, pluginId));
+ }
+ });
+ it("rotates native versions, removes credentials without an encryption key, and cascades project deletion", async () => {
+ const f = await fixture();
+ const native = secretService(db);
+ const scope = { companyId, projectId: f.project.id, pluginId };
+ await native.projectInstance.set(scope, "mount_grants", value);
+ await native.projectInstance.set(scope, "mount_grants", "replacement");
+ const [row] = await db
+ .select()
+ .from(companySecrets)
+ .where(eq(companySecrets.ownerProjectId, f.project.id));
+ expect(row.latestVersion).toBe(2);
+ const key = process.env.PAPERCLIP_SECRETS_MASTER_KEY!;
+ vi.stubEnv("PAPERCLIP_SECRETS_MASTER_KEY", "invalid");
+ try {
+ await native.projectInstance.set(scope, "mount_grants", null);
+ } finally {
+ vi.stubEnv("PAPERCLIP_SECRETS_MASTER_KEY", key);
+ }
+ expect(await native.projectInstance.read(scope)).toEqual({});
+ await native.projectInstance.set(scope, "mount_grants", value);
+ await db.delete(projects).where(eq(projects.id, f.project.id));
+ expect(await native.projectInstance.read(scope)).toEqual({});
+ expect(
+ await db
+ .select()
+ .from(companySecretVersions)
+ .where(eq(companySecretVersions.secretId, row.id)),
+ ).toEqual([]);
+ const deleted = await f.prepare();
+ await expect(
+ f.inbox.acknowledge(companyId, f.event.id, {
+ snapshot: deleted.snapshot,
+ changes: { mount_grants: value },
+ }),
+ ).rejects.toThrow("active project");
+ await f.inbox.acknowledge(companyId, f.event.id, {
+ snapshot: deleted.snapshot,
+ changes: { mount_grants: null },
+ });
+ });
+ it("can acknowledge archival removal when the encryption key is unavailable", async () => {
+ const f = await fixture();
+ await secretService(db).projectInstance.set(
+ { companyId, projectId: f.project.id, pluginId },
+ "mount_grants",
+ value,
+ );
+ await db
+ .update(projects)
+ .set({ archivedAt: new Date("2020-01-01") })
+ .where(eq(projects.id, f.project.id));
+ const key = process.env.PAPERCLIP_SECRETS_MASTER_KEY!;
+ vi.stubEnv("PAPERCLIP_SECRETS_MASTER_KEY", "invalid");
+ try {
+ const prepared = await f.prepare();
+ expect(prepared.instanceSecrets).toEqual({});
+ await f.inbox.acknowledge(companyId, f.event.id, {
+ snapshot: prepared.snapshot,
+ changes: { mount_grants: null },
+ });
+ expect(
+ await db
+ .select()
+ .from(companySecrets)
+ .where(eq(companySecrets.ownerProjectId, f.project.id)),
+ ).toEqual([]);
+ } finally {
+ vi.stubEnv("PAPERCLIP_SECRETS_MASTER_KEY", key);
+ }
+ });
+ it("enforces project ownership in the database and rejects archived reads and new credentials", async () => {
+ const f = await fixture();
+ const otherCompany = randomUUID();
+ await db
+ .insert(companies)
+ .values({
+ id: otherCompany,
+ name: "Other fixture",
+ issuePrefix: "PCO",
+ });
+ await expect(
+ db
+ .insert(companySecrets)
+ .values({
+ companyId: otherCompany,
+ scope: "instance",
+ ownerProjectId: f.project.id,
+ ownerPluginId: pluginId,
+ key: "CREDENTIAL",
+ name: "credential",
+ }),
+ ).rejects.toThrow();
+ await expect(
+ db
+ .insert(companySecrets)
+ .values({
+ companyId,
+ scope: "company",
+ ownerProjectId: f.project.id,
+ key: "INVALID",
+ name: "invalid",
+ }),
+ ).rejects.toThrow();
+ await db
+ .update(projects)
+ .set({ archivedAt: new Date("2020-01-01") })
+ .where(eq(projects.id, f.project.id));
+ await expect(f.service.read(companyId, f.project.id)).rejects.toThrow(
+ "unavailable",
+ );
+ const { snapshot } = await f.prepare();
+ await expect(
+ f.inbox.acknowledge(companyId, f.event.id, {
+ snapshot,
+ changes: { mount_grants: value },
+ }),
+ ).rejects.toThrow("active project");
+ await f.inbox.acknowledge(companyId, f.event.id, {
+ snapshot,
+ changes: { mount_grants: null },
+ });
+ });
+ it("preserves account-home protection for project-owned credentials", async () => {
+ const f = await fixture(),
+ native = secretService(db),
+ accountHome = "/fixture/account-home";
+ await native.projectInstance.set(
+ { companyId, projectId: f.project.id, pluginId },
+ "home",
+ accountHome,
+ );
+ expect(
+ await native.hasInstanceAccountHomeClaim(companyId, accountHome),
+ ).toBe(true);
+ expect(
+ await native.hasInstanceAccountHomeClaim(
+ companyId,
+ accountHome + "-other",
+ ),
+ ).toBe(false);
+ });
+ },
+);
+describe("project instance secret patches", () => {
+ it("accepts bounded bundles and removal and rejects malformed patches without leaking values", () => {
+ expect(() =>
+ validateProjectInstanceSecretChanges({
+ mount_grants: "x".repeat(131_072),
+ old: null,
+ }),
+ ).not.toThrow();
+ for (const changes of [
+ null,
+ [],
+ { "bad/key": "private" },
+ { mount_grants: "" },
+ { mount_grants: " " },
+ { mount_grants: 1 },
+ { mount_grants: "x".repeat(131_073) },
+ Object.fromEntries(
+ Array.from({ length: 17 }, (_, i) => [`key_${i}`, "private"]),
+ ),
+ ]) {
+ expect(() => validateProjectInstanceSecretChanges(changes)).toThrow(
+ "Invalid project instance secret changes",
+ );
+ }
+ });
+});
diff --git a/server/src/__tests__/projects-list-archived-routes.test.ts b/server/src/__tests__/projects-list-archived-routes.test.ts
index e36f8ca614..9e6db4608d 100644
--- a/server/src/__tests__/projects-list-archived-routes.test.ts
+++ b/server/src/__tests__/projects-list-archived-routes.test.ts
@@ -106,7 +106,7 @@ describeEmbeddedPostgres("project list archived route defaults", () => {
const res = await request(app).get(`/api/companies/${companyId}/projects?includeArchived=true`);
expect(res.status).toBe(200);
- expect(res.body.map((project: { id: string }) => project.id)).toEqual([activeProjectId, archivedProjectId]);
+ expect(res.body.map((project: { id: string }) => project.id).sort()).toEqual([activeProjectId, archivedProjectId].sort());
});
});
diff --git a/server/src/services/plugin-capability-validator.ts b/server/src/services/plugin-capability-validator.ts
index 2fb9a5d4ec..d2053fbd32 100644
--- a/server/src/services/plugin-capability-validator.ts
+++ b/server/src/services/plugin-capability-validator.ts
@@ -47,6 +47,7 @@ const OPERATION_CAPABILITIES: Record<string, readonly PluginCapability[]> = {
"companies.get": ["companies.read"],
"projects.list": ["projects.read"],
"projects.get": ["projects.read"],
+ "projects.getInstanceSecrets": ["projects.instance-secrets"],
"projects.managed.get": ["projects.managed"],
"projects.managed.reconcile": ["projects.managed"],
"projects.managed.reset": ["projects.managed"],
diff --git a/server/src/services/plugin-host-services.ts b/server/src/services/plugin-host-services.ts
index 87788bed6c..b3d7065ac5 100644
--- a/server/src/services/plugin-host-services.ts
+++ b/server/src/services/plugin-host-services.ts
@@ -1,3 +1,4 @@
+import { projectInstanceSecretService } from "./project-instance-secrets.js";
import { pluginAgentRuntimeState } from "./plugin-agent-runtime-state.js";
import { createAgentLifecycle } from "./agent-lifecycle.js";
import type { Db } from "@paperclipai/db";
@@ -1862,6 +1863,11 @@ export function buildHostServices(
},
projects: {
+ async getInstanceSecrets(params) {
+ const companyId = ensureCompanyId(params.companyId);
+ await ensurePluginAvailableForCompany(companyId);
+ return projectInstanceSecretService(db, pluginId).read(companyId, params.projectId);
+ },
async list(params) {
const companyId = ensureCompanyId(params.companyId);
await ensurePluginAvailableForCompany(companyId);
diff --git a/server/src/services/plugin-lifecycle-delivery.ts b/server/src/services/plugin-lifecycle-delivery.ts
index 6b67741b0d..f11032a52c 100644
--- a/server/src/services/plugin-lifecycle-delivery.ts
+++ b/server/src/services/plugin-lifecycle-delivery.ts
@@ -1,3 +1,4 @@
+import { projectInstanceSecretService } from "./project-instance-secrets.js";
import { and, asc, eq, isNull, or, sql } from "drizzle-orm";
import { pluginCompanySettings, pluginConfig, plugins, type Db } from "@paperclipai/db";
import { logger } from "../middleware/logger.js";
@@ -74,8 +75,11 @@ export function registerPluginLifecycleDelivery(
.where(and(eq(plugins.id, plugin.id), eq(plugins.status, "ready"),
or(isNull(pluginCompanySettings.enabled), eq(pluginCompanySettings.enabled, true))));
if (!enabled?.manifest.resourceLifecycle?.includes(event.resourceType) || !enabled.manifest.capabilities.includes("events.subscribe")) break;
+ stage = "credentials";
+ const credentials = event.resourceType === "project" && enabled.manifest.capabilities.includes("projects.instance-secrets")
+ ? await projectInstanceSecretService(db, plugin.id).prepare(event) : undefined;
stage = "callback";
- const result = await manager.call(plugin.id, "resourceLifecycle", event, 30_000);
+ const result = await manager.call(plugin.id, "resourceLifecycle", credentials ? { ...event, instanceSecrets: credentials.instanceSecrets } : event, 30_000);
stage = "result";
if (result?.eventId !== event.id || !["acknowledged", "retry", "deferred"].includes(result.status)) {
throw new Error("Invalid resource lifecycle result");
@@ -83,7 +87,8 @@ export function registerPluginLifecycleDelivery(
if (signal.aborted) return;
if (result.status === "acknowledged") {
stage = "acknowledgment";
- await inbox.acknowledge(companyId, event.id);
+ if (result.instanceSecrets !== undefined && !credentials) throw new Error("Project instance secrets outside callback scope");
+ await inbox.acknowledge(companyId, event.id, credentials ? { snapshot: credentials.snapshot, changes: result.instanceSecrets ?? {} } : undefined);
// An acknowledgment exposes the next event for this resource. Drain immediately.
wake();
} else if (result.status === "retry") {
diff --git a/server/src/services/plugin-lifecycle-inbox.ts b/server/src/services/plugin-lifecycle-inbox.ts
index 8f9d9ea285..44bc8c290e 100644
--- a/server/src/services/plugin-lifecycle-inbox.ts
+++ b/server/src/services/plugin-lifecycle-inbox.ts
@@ -1,3 +1,6 @@
+import { withAccountHomeSecretMutationLock } from "@paperclipai/adapter-codex-local/server";
+import { projectInstanceSecretService, type ProjectSecretSnapshot } from "./project-instance-secrets.js";
+import { publishActivity, type ActivityPublication } from "./activity-log.js";
import { pluginCompanySettings, pluginLifecycleAcknowledgments, plugins, resourceLifecycleEvents, type Db } from "@paperclipai/db";
import type { ResourceLifecycleEvent } from "@paperclipai/plugin-sdk";
import { z } from "zod";
@@ -40,19 +43,29 @@ export function pluginLifecycleInbox(db: Db, pluginId: string) {
.orderBy(asc(resourceLifecycleEvents.id)).limit(limit);
return rows.map(row => ({ ...row, id: String(row.id), createdAt: row.createdAt.toISOString() })) as ResourceLifecycleEvent[];
},
- async acknowledge(companyId: string, eventId: string): Promise<void> {
+ async acknowledge(companyId: string, eventId: string, credentials?: { snapshot: ProjectSecretSnapshot; changes: unknown }): Promise<void> {
if (typeof eventId !== "string" || !/^[1-9]\d*$/.test(eventId) || !Number.isSafeInteger(Number(eventId))) throw badRequest("Invalid lifecycle event id");
- await db.transaction(async tx => {
+ const commit = () => db.transaction(async tx => {
+ const publications: ActivityPublication[] = [];
const txDb = tx as unknown as Db;
await assertAvailable(txDb, companyId);
const [event] = await tx.select().from(resourceLifecycleEvents)
.where(and(eq(resourceLifecycleEvents.companyId, companyId), eq(resourceLifecycleEvents.id, Number(eventId)))).for("update");
if (!event) throw notFound("Lifecycle event not found");
+ const [acked] = await tx.select().from(pluginLifecycleAcknowledgments).where(and(eq(pluginLifecycleAcknowledgments.pluginId, pluginId), eq(pluginLifecycleAcknowledgments.eventId, event.id)));
+ if (acked) return publications;
const [eligible] = await tx.select({ id: resourceLifecycleEvents.id }).from(resourceLifecycleEvents)
.where(and(eq(resourceLifecycleEvents.id, event.id), firstForResource));
if (!eligible) throw conflict("Acknowledge earlier lifecycle events for this resource first");
+ if (credentials) {
+ if (event.resourceType !== "project") throw forbidden("Project instance secret event required");
+ publications.push(...await projectInstanceSecretService(txDb, pluginId).apply({ ...event, id: String(event.id), createdAt: event.createdAt.toISOString() } as ResourceLifecycleEvent, credentials.snapshot, credentials.changes));
+ }
await tx.insert(pluginLifecycleAcknowledgments).values({ pluginId, eventId: event.id }).onConflictDoNothing();
+ return publications;
});
+ const publications = credentials ? await withAccountHomeSecretMutationLock(undefined, companyId, commit) : await commit();
+ for (const publication of publications) publishActivity(publication);
},
};
}
diff --git a/server/src/services/project-instance-secrets.ts b/server/src/services/project-instance-secrets.ts
new file mode 100644
index 0000000000..e8b7a70c1d
--- /dev/null
+++ b/server/src/services/project-instance-secrets.ts
@@ -0,0 +1,229 @@
+import { createHash } from "node:crypto";
+import { and, asc, desc, eq, ne } from "drizzle-orm";
+import {
+ companySecrets,
+ pluginCompanySettings,
+ pluginConfig,
+ plugins,
+ projects,
+ projectWorkspaces,
+ resourceLifecycleEvents,
+ type Db,
+} from "@paperclipai/db";
+import type { ResourceLifecycleEvent } from "@paperclipai/plugin-sdk";
+import { z } from "zod";
+import { secretService } from "./secrets.js";
+import { persistActivity, type ActivityPublication } from "./activity-log.js";
+
+export type ProjectSecretSnapshot = { revision: string };
+export function validateProjectInstanceSecretChanges(
+ changes: unknown,
+): asserts changes is Record<string, string | null> {
+ if (!changes || typeof changes !== "object" || Array.isArray(changes))
+ throw new Error("Invalid project instance secret changes");
+ const entries = Object.entries(changes);
+ if (
+ entries.length > 16 ||
+ entries.some(
+ ([key, value]) =>
+ !/^[a-z][a-z0-9_]{0,63}$/.test(key) ||
+ (value !== null &&
+ (typeof value !== "string" ||
+ !value.trim() ||
+ Buffer.byteLength(value) > 131_072)),
+ )
+ ) {
+ throw new Error("Invalid project instance secret changes");
+ }
+}
+
+/** Reuses native instance credentials; values never enter the lifecycle journal or plugin entities. */
+export function projectInstanceSecretService(db: Db, pluginId: string) {
+ async function state(companyId: string, projectId: string, lock = false) {
+ if (
+ ![companyId, projectId].every(
+ (id) => z.string().uuid().safeParse(id).success,
+ )
+ )
+ throw new Error("Invalid project instance secret scope");
+ const pluginQuery = db
+ .select()
+ .from(plugins)
+ .where(eq(plugins.id, pluginId));
+ const [plugin] = await (lock ? pluginQuery.for("share") : pluginQuery);
+ const settingsQuery = db
+ .select()
+ .from(pluginCompanySettings)
+ .where(
+ and(
+ eq(pluginCompanySettings.pluginId, pluginId),
+ eq(pluginCompanySettings.companyId, companyId),
+ ),
+ );
+ const [settings] = await (lock
+ ? settingsQuery.for("share")
+ : settingsQuery);
+ if (
+ plugin?.status !== "ready" ||
+ settings?.enabled === false ||
+ !plugin.manifestJson.capabilities.includes("projects.instance-secrets") ||
+ !plugin.manifestJson.capabilities.includes("events.subscribe") ||
+ !plugin.manifestJson.resourceLifecycle?.includes("project")
+ ) {
+ throw new Error("Project instance secrets outside plugin scope");
+ }
+ const configQuery = db
+ .select()
+ .from(pluginConfig)
+ .where(
+ and(
+ eq(pluginConfig.pluginId, pluginId),
+ eq(pluginConfig.companyId, companyId),
+ ),
+ );
+ const [config] = await (lock ? configQuery.for("share") : configQuery);
+ if (!config)
+ throw new Error("Project instance secrets require plugin configuration");
+ const projectQuery = db
+ .select()
+ .from(projects)
+ .where(
+ and(eq(projects.companyId, companyId), eq(projects.id, projectId)),
+ );
+ const [project] = await (lock ? projectQuery.for("update") : projectQuery);
+ const workspaces = await db
+ .select()
+ .from(projectWorkspaces)
+ .where(
+ and(
+ eq(projectWorkspaces.companyId, companyId),
+ eq(projectWorkspaces.projectId, projectId),
+ ),
+ )
+ .orderBy(asc(projectWorkspaces.id));
+ const [latestEvent] = await db
+ .select({ id: resourceLifecycleEvents.id })
+ .from(resourceLifecycleEvents)
+ .where(
+ and(
+ eq(resourceLifecycleEvents.companyId, companyId),
+ eq(resourceLifecycleEvents.resourceType, "project"),
+ eq(resourceLifecycleEvents.resourceId, projectId),
+ ),
+ )
+ .orderBy(desc(resourceLifecycleEvents.id))
+ .limit(1);
+ const secrets = await db
+ .select({
+ id: companySecrets.id,
+ version: companySecrets.latestVersion,
+ status: companySecrets.status,
+ })
+ .from(companySecrets)
+ .where(
+ and(
+ eq(companySecrets.companyId, companyId),
+ eq(companySecrets.scope, "instance"),
+ eq(companySecrets.ownerProjectId, projectId),
+ eq(companySecrets.ownerPluginId, pluginId),
+ ne(companySecrets.status, "deleted"),
+ ),
+ )
+ .orderBy(asc(companySecrets.id));
+ return {
+ project,
+ revision: createHash("sha256")
+ .update(
+ JSON.stringify([
+ plugin.updatedAt,
+ plugin.manifestJson,
+ settings,
+ config,
+ project,
+ workspaces,
+ latestEvent,
+ secrets,
+ ]),
+ )
+ .digest("hex"),
+ };
+ }
+ async function read(companyId: string, projectId: string) {
+ try {
+ return await secretService(db).projectInstance.read({
+ companyId,
+ projectId,
+ pluginId,
+ });
+ } catch {
+ throw new Error("Project instance secret unavailable");
+ }
+ }
+ return {
+ async read(companyId: string, projectId: string) {
+ const current = await state(companyId, projectId);
+ if (!current.project || current.project.archivedAt)
+ throw new Error("Project instance secrets unavailable");
+ return read(companyId, projectId);
+ },
+ async prepare(event: ResourceLifecycleEvent) {
+ if (event.resourceType !== "project")
+ throw new Error("Project instance secret event required");
+ const snapshot = await state(event.companyId, event.resourceId);
+ return {
+ snapshot: { revision: snapshot.revision },
+ instanceSecrets:
+ snapshot.project && !snapshot.project.archivedAt
+ ? await read(event.companyId, event.resourceId)
+ : {},
+ };
+ },
+ /** Caller holds the event row and account-home mutation lock, in the acknowledgment transaction. */
+ async apply(
+ event: ResourceLifecycleEvent,
+ snapshot: ProjectSecretSnapshot,
+ changes: unknown,
+ ): Promise<ActivityPublication[]> {
+ validateProjectInstanceSecretChanges(changes);
+ const current = await state(event.companyId, event.resourceId, true);
+ if (snapshot.revision !== current.revision)
+ throw new Error("Project instance secret operation is stale");
+ if (
+ (!current.project || current.project.archivedAt) &&
+ Object.values(changes).some((value) => value !== null)
+ ) {
+ throw new Error("Project instance secrets require an active project");
+ }
+ const publications: ActivityPublication[] = [];
+ for (const [key, value] of Object.entries(changes)) {
+ try {
+ await secretService(db).projectInstance.set(
+ {
+ companyId: event.companyId,
+ projectId: event.resourceId,
+ pluginId,
+ },
+ key,
+ value,
+ );
+ } catch {
+ throw new Error("Project instance secret storage unavailable");
+ }
+ const { publication } = await persistActivity(db, {
+ companyId: event.companyId,
+ actorType: "plugin",
+ actorId: pluginId,
+ action:
+ value === null
+ ? "project.instance_secret.removed"
+ : "project.instance_secret.saved",
+ entityType: "project",
+ entityId: event.resourceId,
+ details: { key },
+ });
+ publications.push(publication);
+ }
+ return publications;
+ },
+ };
+}
diff --git a/server/src/services/secrets.ts b/server/src/services/secrets.ts
index 6ce96c1973..800c0e2fbd 100644
--- a/server/src/services/secrets.ts
+++ b/server/src/services/secrets.ts
@@ -644,11 +644,14 @@ type SecretBindingContext = Omit<SecretConsumerContext, "consumerType"> & {
consumerType: SecretBindingTargetType;
};
+type InstanceSecretOwner = { pluginId: string } & ({ agentId: string; projectId?: never } | { projectId: string; agentId?: never });
+type InstanceSecretScope = InstanceSecretOwner & { companyId: string };
+
type SecretResolutionOptions = {
bindingContext?: SecretBindingContext;
accessContext?: SecretConsumerContext;
allowUserSecretScope?: boolean;
- instanceOwner?: { agentId: string; pluginId: string };
+ instanceOwner?: InstanceSecretOwner;
};
export type AgentSecretReadContext = {
@@ -1362,7 +1365,8 @@ export function secretService(db: Db | DbTransaction) {
if (!secret) throw notFound("Secret not found");
if (secret.companyId !== companyId) throw unprocessable("Secret must belong to same company");
const instanceOwned = secret.scope === "instance" && options?.instanceOwner &&
- secret.ownerAgentId === options.instanceOwner.agentId && secret.ownerPluginId === options.instanceOwner.pluginId;
+ secret.ownerAgentId === (options.instanceOwner.agentId ?? null) &&
+ secret.ownerProjectId === (options.instanceOwner.projectId ?? null) && secret.ownerPluginId === options.instanceOwner.pluginId;
if (secret.scope !== "company" && !(secret.scope === "user" && options?.allowUserSecretScope) && !instanceOwned) {
throw unprocessable("User-scoped secrets must be resolved through user secret declarations", {
code: "secret_scope_invalid",
@@ -2188,7 +2192,7 @@ export function secretService(db: Db | DbTransaction) {
providerMetadata?: Record<string, unknown> | null;
},
actor?: { userId?: string | null; agentId?: string | null },
- instanceOwner?: { agentId: string; pluginId: string },
+ instanceOwner?: InstanceSecretOwner,
) {
const existing = instanceOwner ? null : await getByName(companyId, input.name);
if (existing) throw conflict(`Secret already exists: ${input.name}`);
@@ -2234,6 +2238,7 @@ export function secretService(db: Db | DbTransaction) {
companyId,
scope: instanceOwner ? "instance" : "company",
ownerAgentId: instanceOwner?.agentId ?? null,
+ ownerProjectId: instanceOwner?.projectId ?? null,
ownerPluginId: instanceOwner?.pluginId ?? null,
key,
name: input.name,
@@ -3488,6 +3493,39 @@ export function secretService(db: Db | DbTransaction) {
.then((rows) => rows[0] ?? null);
}
+ const instanceSecrets = {
+ async read(scope: InstanceSecretScope): Promise<Record<string, string>> {
+ const rows = await db.select().from(companySecrets).where(and(eq(companySecrets.companyId, scope.companyId),
+ eq(companySecrets.scope, "instance"), scope.agentId !== undefined ? eq(companySecrets.ownerAgentId, scope.agentId) : eq(companySecrets.ownerProjectId, scope.projectId),
+ eq(companySecrets.ownerPluginId, scope.pluginId), ne(companySecrets.status, "deleted")));
+ const values: Record<string, string> = Object.create(null);
+ for (const row of rows) {
+ const resolved = await resolveSecretValueInternal(scope.companyId, row.id, "latest", {
+ instanceOwner: scope, accessContext: { consumerType: "plugin_worker", consumerId: scope.pluginId,
+ actorType: "plugin", actorId: scope.pluginId, pluginId: scope.pluginId },
+ });
+ values[row.name] = resolved.value;
+ }
+ return values;
+ },
+ async set(scope: InstanceSecretScope, key: string, value: string | null) {
+ return withAccountHomeSecretMutationLock(undefined, scope.companyId, async () => {
+ if (value) await assertAccountHomeCacheDirStillValid(undefined, scope.companyId, value);
+ const normalizedKey = normalizeSecretKey(key);
+ const [existing] = await db.select().from(companySecrets).where(and(eq(companySecrets.companyId, scope.companyId),
+ eq(companySecrets.scope, "instance"), scope.agentId !== undefined ? eq(companySecrets.ownerAgentId, scope.agentId) : eq(companySecrets.ownerProjectId, scope.projectId),
+ eq(companySecrets.ownerPluginId, scope.pluginId), eq(companySecrets.key, normalizedKey), ne(companySecrets.status, "deleted")));
+ if (value === null) {
+ if (existing) await removeSecretUnlocked(existing.id);
+ } else if (existing) {
+ await rotateUnlocked(existing.id, { value, expectedLatestVersion: existing.latestVersion });
+ } else {
+ await createSecretUnlocked(scope.companyId, { name: key, key, provider: "local_encrypted", value }, undefined, scope);
+ }
+ });
+ },
+ };
+
return {
listProviders: () => listSecretProviders(),
@@ -3496,9 +3534,9 @@ export function secretService(db: Db | DbTransaction) {
const rows = await db.select().from(companySecrets).where(and(eq(companySecrets.companyId, companyId),
eq(companySecrets.scope, "instance"), ne(companySecrets.status, "deleted")));
for (const row of rows) {
- if (!row.ownerAgentId || !row.ownerPluginId) return true;
+ if ((!row.ownerAgentId && !row.ownerProjectId) || !row.ownerPluginId) return true;
const resolved = await resolveSecretValueInternal(companyId, row.id, "latest", {
- instanceOwner: { agentId: row.ownerAgentId, pluginId: row.ownerPluginId },
+ instanceOwner: row.ownerAgentId ? { agentId: row.ownerAgentId, pluginId: row.ownerPluginId } : { projectId: row.ownerProjectId!, pluginId: row.ownerPluginId },
accessContext: { consumerType: "system", consumerId: DEVICE_LOGIN_SECRET_CHECK_CONSUMER_ID,
actorType: "system", actorId: null },
});
@@ -3508,38 +3546,8 @@ export function secretService(db: Db | DbTransaction) {
} catch { return true; }
},
- agentInstance: {
- async read(scope: { companyId: string; agentId: string; pluginId: string }): Promise<Record<string, string>> {
- const rows = await db.select().from(companySecrets).where(and(eq(companySecrets.companyId, scope.companyId),
- eq(companySecrets.scope, "instance"), eq(companySecrets.ownerAgentId, scope.agentId),
- eq(companySecrets.ownerPluginId, scope.pluginId), ne(companySecrets.status, "deleted")));
- const values: Record<string, string> = Object.create(null);
- for (const row of rows) {
- const resolved = await resolveSecretValueInternal(scope.companyId, row.id, "latest", {
- instanceOwner: scope, accessContext: { consumerType: "plugin_worker", consumerId: scope.pluginId,
- actorType: "plugin", actorId: scope.pluginId, pluginId: scope.pluginId },
- });
- values[row.name] = resolved.value;
- }
- return values;
- },
- async set(scope: { companyId: string; agentId: string; pluginId: string }, key: string, value: string | null) {
- return withAccountHomeSecretMutationLock(undefined, scope.companyId, async () => {
- if (value) await assertAccountHomeCacheDirStillValid(undefined, scope.companyId, value);
- const normalizedKey = normalizeSecretKey(key);
- const [existing] = await db.select().from(companySecrets).where(and(eq(companySecrets.companyId, scope.companyId),
- eq(companySecrets.scope, "instance"), eq(companySecrets.ownerAgentId, scope.agentId),
- eq(companySecrets.ownerPluginId, scope.pluginId), eq(companySecrets.key, normalizedKey), ne(companySecrets.status, "deleted")));
- if (value === null) {
- if (existing) await removeSecretUnlocked(existing.id);
- } else if (existing) {
- await rotateUnlocked(existing.id, { value, expectedLatestVersion: existing.latestVersion });
- } else {
- await createSecretUnlocked(scope.companyId, { name: key, key, provider: "local_encrypted", value }, undefined, scope);
- }
- });
- },
- },
+ agentInstance: instanceSecrets,
+ projectInstance: instanceSecrets,
checkProviders: () => checkSecretProviders(),