Skip to content

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

feat(plugins): synchronize standing connection assignments (#16603)

Nicky Leach5f5602bba700
diff --git a/doc/DATABASE.md b/doc/DATABASE.md
index 207e6a20a5..4a25ef7cdb 100644
--- a/doc/DATABASE.md
+++ b/doc/DATABASE.md
@@ -980,3 +980,10 @@ session-compatible database connection; do not enable it through a transaction
pooler. Reconnection scans the durable journal. Existing process-local work
signals continue to serve other delivery queues. See
[the plugin contract](plugins/AGENT_RUNTIME_SYNC.md).
+
+Migration 0354 extends this stream to standing connection assignments. Statement
+triggers compare the fields returned by the assignment snapshot and coalesce
+company invalidation within the mutation transaction. Agent runtime journaling
+uses ordered `FOR NO KEY UPDATE` locks, which remain compatible with foreign-key
+references while excluding runtime readers' `FOR SHARE` locks. Connector feature
+switches use the same journal; process-start overlays receive a delivery baseline.
diff --git a/doc/plugins/AGENT_RUNTIME_SYNC.md b/doc/plugins/AGENT_RUNTIME_SYNC.md
index f0532f5c21..2c75a9f9f1 100644
--- a/doc/plugins/AGENT_RUNTIME_SYNC.md
+++ b/doc/plugins/AGENT_RUNTIME_SYNC.md
@@ -94,3 +94,42 @@ Pinned assignments receive conservative content invalidations too. Their resolve
version and bytes stay pinned when pin support is enabled. Consumers can compare
versions or destination hashes and avoid rewriting unchanged trees. Task-only
skill mentions and a running task's saved version selection remain task-owned.
+
+## Standing connection assignments
+
+`getRuntime` also returns `connectionAssignments`: effective `publicMcp` and
+`chatConnectors` feature switches, installed connections with `id`, `name`,
+`transport`, `enabled`, and `status`, and active profile IDs. It includes both
+company assignments and assignments for the requested agent. It excludes other
+agents' assignments and has no credential values, grant details, or tool schemas.
+The owning-plugin checks for the runtime reader apply to this field too.
+
+Migration 0354 records committed changes to every stored field used by this
+snapshot. Agent-targeted installation and profile binding edits invalidate only
+their old and new target agents. Company-targeted assignments invalidate company
+agent runtimes. Project, routine, issue, and gateway bindings are outside this
+snapshot and do not invalidate it. Connection metadata, profile activation or
+removal, and connector feature switches still use conservative company-wide
+invalidation. Empty writes and changes to health bookkeeping do not. Multiple
+assignment statements in one transaction coalesce to one update per agent.
+Journal writes and their triggering changes commit or roll back together.
+Company-wide invalidation remains synchronous: it locks eligible company agents
+in order and journals one update per agent. Its work grows with company size;
+there is no fanout ceiling or cross-transaction mutation quota.
+
+The reader orders and deduplicates assignments. It rejects more than 512
+connections or 128 active profiles with status 422 instead of returning a partial
+snapshot. It rechecks the revision after reading assignments and skills, with the
+same three-attempt conflict behavior described above.
+
+Each delivery-service startup records one company baseline when an enabled
+runtime subscriber becomes active. This covers feature overlays supplied at
+process startup. It does not add a recurring scan. Plugins must compare desired
+state and destination hashes before rewriting external files.
+
+This assignment contract does not yet emit connector-specific invalidations for
+tool catalog contents, profile entries, policies, connection configuration,
+grants, credentials, or endpoint configuration. Those inputs need their own
+mutation coverage before a consumer can rely on their immediate synchronization.
+Existing agent and skill invalidations still apply independently. Standing
+assignments express desired state; they do not prove task-specific authorization.
diff --git a/maps/agent-access-map/app-permissions.md b/maps/agent-access-map/app-permissions.md
index 1b9e3ebdfc..a160f78b33 100644
--- a/maps/agent-access-map/app-permissions.md
+++ b/maps/agent-access-map/app-permissions.md
@@ -34,6 +34,13 @@ own policy and access review.
Gaps: Granting access is distinct from using access. No equivalent agent management path
exists in these routes.
+The owning lifecycle plugin can read bounded standing connection and active
+profile assignments with `ctx.agents.getRuntime`. It requires the existing
+`agents.lifecycle.manage` capability and agent ownership checks. Committed
+assignment changes use the opt-in `agent_runtime` stream. These inputs contain
+no grant credentials and do not authorize a task's tool calls. See the
+[runtime contract](../../doc/plugins/AGENT_RUNTIME_SYNC.md#standing-connection-assignments).
+
## `action-policy`
Review: `baseline`.
diff --git a/maps/feature-map/app-permissions.md b/maps/feature-map/app-permissions.md
index 291d2b0bcb..27f73af1c0 100644
--- a/maps/feature-map/app-permissions.md
+++ b/maps/feature-map/app-permissions.md
@@ -36,6 +36,12 @@ Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Prep
Automated: [app detail](../../ui/src/pages/apps/AppDetail.test.tsx) covers agent/action controls, quarantined actions, and navigation using mocked requests.
+[Runtime assignment tests](../../server/src/__tests__/agent-runtime-assignments.test.ts)
+use PostgreSQL to verify committed assignment notifications, bounded snapshots,
+rollback, and concurrent AI adoption. The owning lifecycle plugin can read
+standing assignments through `ctx.agents.getRuntime`; this does not grant tool
+execution access or replace task-specific authorization.
+
Manual: Grant one agent access, leave another excluded, and exercise off, ask, and allowed states for a harmless action. Reload between changes. Verify actual denied calls stay denied and ask-first creates a decision rather than executing early.
### `test-and-maintain`
diff --git a/packages/db/src/migrations/0354_agent_connection_assignment_hooks.sql b/packages/db/src/migrations/0354_agent_connection_assignment_hooks.sql
new file mode 100644
index 0000000000..48324a781b
--- /dev/null
+++ b/packages/db/src/migrations/0354_agent_connection_assignment_hooks.sql
@@ -0,0 +1,184 @@
+CREATE OR REPLACE FUNCTION paperclip_record_agent_runtime(p_company uuid, p_agent uuid) RETURNS bigint
+LANGUAGE plpgsql SET search_path = public, pg_temp AS $$
+DECLARE revision bigint;
+BEGIN
+ PERFORM 1 FROM agents WHERE company_id = p_company AND id = p_agent
+ AND status NOT IN ('pending_approval', 'terminated') FOR NO KEY UPDATE;
+ IF FOUND THEN
+ INSERT INTO resource_lifecycle_events(company_id, resource_type, resource_id, action)
+ VALUES (p_company, 'agent_runtime', p_agent, 'update') RETURNING id INTO revision;
+ END IF;
+ RETURN revision;
+END;
+$$;
+--> statement-breakpoint
+CREATE OR REPLACE FUNCTION paperclip_invalidate_company_agent_runtimes(p_company uuid) RETURNS void
+LANGUAGE plpgsql SET search_path = public, pg_temp AS $$
+DECLARE candidate uuid;
+BEGIN
+ FOR candidate IN SELECT id FROM agents WHERE company_id = p_company
+ AND status NOT IN ('pending_approval', 'terminated') ORDER BY id FOR NO KEY UPDATE LOOP
+ PERFORM paperclip_record_agent_runtime(p_company, candidate);
+ END LOOP;
+END;
+$$;
+--> statement-breakpoint
+CREATE OR REPLACE FUNCTION paperclip_invalidate_skill_source_runtimes(p_company uuid, sources uuid[]) RETURNS void
+LANGUAGE plpgsql SET search_path = public, pg_temp AS $$
+DECLARE candidate uuid;
+BEGIN
+ FOR candidate IN SELECT a.id FROM agents a WHERE a.company_id = p_company
+ AND a.status NOT IN ('pending_approval', 'terminated') AND EXISTS (
+ SELECT 1 FROM company_skills s WHERE s.company_id = p_company AND s.access_source_id = ANY(sources)
+ AND paperclip_agent_selects_runtime_skill(a.adapter_config, a.adapter_type, s.key, s.slug))
+ ORDER BY a.id FOR NO KEY UPDATE LOOP
+ PERFORM paperclip_record_agent_runtime(p_company, candidate);
+ END LOOP;
+END;
+$$;
+--> statement-breakpoint
+CREATE OR REPLACE FUNCTION paperclip_skill_runtime_changed() RETURNS trigger
+LANGUAGE plpgsql SET search_path = public, pg_temp AS $$
+DECLARE previous jsonb; current jsonb; keys text[]; company uuid; candidate uuid;
+BEGIN
+ IF TG_OP <> 'INSERT' THEN previous := to_jsonb(OLD); END IF;
+ IF TG_OP <> 'DELETE' THEN current := to_jsonb(NEW); END IF;
+ IF TG_OP = 'UPDATE' AND
+ jsonb_build_array(OLD.key, OLD.slug, OLD.markdown, OLD.source_type, OLD.source_locator, OLD.source_ref,
+ OLD.file_inventory, OLD.current_version_id, OLD.access_source_id, OLD.compatibility, OLD.trust_level, OLD.metadata)
+ IS NOT DISTINCT FROM
+ jsonb_build_array(NEW.key, NEW.slug, NEW.markdown, NEW.source_type, NEW.source_locator, NEW.source_ref,
+ NEW.file_inventory, NEW.current_version_id, NEW.access_source_id, NEW.compatibility, NEW.trust_level, NEW.metadata)
+ THEN RETURN NEW; END IF;
+ company := coalesce((current->>'company_id')::uuid, (previous->>'company_id')::uuid);
+ SELECT array_agg(DISTINCT lower(reference)) INTO keys FROM (
+ SELECT row->>'key' AS reference FROM unnest(ARRAY[previous, current]) row
+ UNION ALL SELECT regexp_replace(row->>'key', '.*/', '') FROM unnest(ARRAY[previous, current]) row
+ UNION ALL SELECT CASE WHEN row->>'key' LIKE 'paperclipai/paperclip/%' THEN row->>'slug'
+ ELSE (row->>'slug') || '--' || left(encode(sha256(convert_to(row->>'key', 'UTF8')), 'hex'), 10) END
+ FROM unnest(ARRAY[previous, current]) row
+ ) refs WHERE reference IS NOT NULL;
+ FOR candidate IN SELECT a.id FROM agents a WHERE a.company_id = company
+ AND a.status NOT IN ('pending_approval', 'terminated') AND (
+ (a.adapter_type <> 'paperclip_runner' AND keys && ARRAY['paperclipai/paperclip/paperclip', 'paperclipai/paperclip/complain', 'paperclipai/paperclip/suggestion-box']) OR
+ EXISTS (SELECT 1 FROM jsonb_array_elements(CASE WHEN jsonb_typeof(a.adapter_config#>'{paperclipSkillSync,desiredSkills}') = 'array'
+ THEN a.adapter_config#>'{paperclipSkillSync,desiredSkills}' ELSE '[]'::jsonb END) choice
+ WHERE lower(trim(CASE WHEN jsonb_typeof(choice) = 'string' THEN choice#>>'{}' ELSE choice->>'key' END)) = ANY(keys)))
+ ORDER BY a.id FOR NO KEY UPDATE LOOP
+ PERFORM paperclip_record_agent_runtime(company, candidate);
+ END LOOP;
+ IF TG_OP = 'DELETE' THEN RETURN OLD; END IF;
+ RETURN NEW;
+END;
+$$;
+--> statement-breakpoint
+CREATE OR REPLACE FUNCTION paperclip_invalidate_connector_agent(p_company uuid, p_agent uuid) RETURNS void
+LANGUAGE plpgsql SET search_path = public, pg_temp AS $$
+DECLARE setting text := 'paperclip.runtime_agent_' || replace(p_agent::text, '-', '_'); xid text := pg_current_xact_id()::text;
+BEGIN
+ IF current_setting('paperclip.runtime_' || replace(p_company::text, '-', '_'), true) IS NOT DISTINCT FROM xid
+ OR current_setting(setting, true) IS NOT DISTINCT FROM xid THEN RETURN; END IF;
+ PERFORM paperclip_record_agent_runtime(p_company, p_agent);
+ PERFORM set_config(setting, xid, true);
+END;
+$$;
+--> statement-breakpoint
+CREATE OR REPLACE FUNCTION paperclip_invalidate_connector_company(p_company uuid) RETURNS void
+LANGUAGE plpgsql SET search_path = public, pg_temp AS $$
+DECLARE setting text := 'paperclip.runtime_' || replace(p_company::text, '-', '_'); xid text := pg_current_xact_id()::text; candidate uuid;
+BEGIN
+ IF current_setting(setting, true) IS NOT DISTINCT FROM xid THEN RETURN; END IF;
+ FOR candidate IN SELECT id FROM agents WHERE company_id = p_company
+ AND status NOT IN ('pending_approval', 'terminated') ORDER BY id FOR NO KEY UPDATE LOOP
+ PERFORM paperclip_invalidate_connector_agent(p_company, candidate);
+ END LOOP;
+ PERFORM set_config(setting, xid, true);
+END;
+$$;
+--> statement-breakpoint
+CREATE OR REPLACE FUNCTION paperclip_connector_runtime_changed() RETURNS trigger
+LANGUAGE plpgsql SET search_path = public, pg_temp AS $$
+DECLARE company uuid; query text; old_projection text; new_projection text; target record; candidate uuid;
+BEGIN
+ IF TG_TABLE_NAME = 'tool_profiles' AND TG_OP = 'INSERT' THEN RETURN NULL; END IF;
+ IF TG_OP = 'UPDATE' THEN
+ SELECT 'jsonb_build_array(' || string_agg(format('to_jsonb(o)->%L', field), ',') || ')',
+ 'jsonb_build_array(' || string_agg(format('to_jsonb(n)->%L', field), ',') || ')'
+ INTO old_projection, new_projection FROM unnest(TG_ARGV[1:TG_NARGS - 1]) field;
+ END IF;
+ IF TG_TABLE_NAME IN ('tool_profile_bindings', 'tool_connection_installs') THEN
+ IF TG_OP = 'INSERT' THEN query := 'SELECT company_id, target_type, target_id FROM new_rows';
+ ELSIF TG_OP = 'DELETE' THEN query := 'SELECT company_id, target_type, target_id FROM old_rows';
+ ELSE query := format('WITH changed AS (
+ SELECT o.company_id AS old_company, o.target_type AS old_type, o.target_id AS old_target,
+ n.company_id AS new_company, n.target_type AS new_type, n.target_id AS new_target
+ FROM old_rows o FULL JOIN new_rows n ON o.%I = n.%I WHERE %s IS DISTINCT FROM %s)
+ SELECT old_company AS company_id, old_type AS target_type, old_target AS target_id FROM changed WHERE old_company IS NOT NULL UNION
+ SELECT new_company AS company_id, new_type AS target_type, new_target AS target_id FROM changed WHERE new_company IS NOT NULL',
+ TG_ARGV[0], TG_ARGV[0], old_projection, new_projection);
+ END IF;
+ FOR target IN EXECUTE 'SELECT DISTINCT company_id, target_type, target_id FROM (' || query || ') targets
+ WHERE target_type IN (''agent'', ''company'')
+ ORDER BY company_id, target_type DESC, target_id' LOOP
+ IF target.target_type = 'company' AND target.target_id = target.company_id::text THEN
+ PERFORM paperclip_invalidate_connector_company(target.company_id);
+ ELSIF target.target_type = 'agent' AND target.target_id ~ '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$' THEN
+ SELECT id INTO candidate FROM agents WHERE company_id = target.company_id AND id = target.target_id::uuid;
+ IF FOUND THEN PERFORM paperclip_invalidate_connector_agent(target.company_id, candidate); END IF;
+ END IF;
+ END LOOP;
+ RETURN NULL;
+ END IF;
+ IF TG_OP = 'INSERT' THEN query := 'SELECT DISTINCT company_id FROM new_rows ORDER BY company_id';
+ ELSIF TG_OP = 'DELETE' THEN query := 'SELECT DISTINCT company_id FROM old_rows ORDER BY company_id';
+ ELSE
+ query := format('WITH changed AS (
+ SELECT o.company_id AS old_company, n.company_id AS new_company FROM old_rows o FULL JOIN new_rows n ON o.%I = n.%I
+ WHERE %s IS DISTINCT FROM %s)
+ SELECT old_company AS company_id FROM changed WHERE old_company IS NOT NULL UNION
+ SELECT new_company AS company_id FROM changed WHERE new_company IS NOT NULL ORDER BY company_id', TG_ARGV[0], TG_ARGV[0], old_projection, new_projection);
+ END IF;
+ FOR company IN EXECUTE query LOOP
+ PERFORM paperclip_invalidate_connector_company(company);
+ END LOOP;
+ RETURN NULL;
+END;
+$$;
+--> statement-breakpoint
+DO $$
+DECLARE relation text; arguments text;
+BEGIN
+ FOREACH relation IN ARRAY ARRAY['tool_connections', 'tool_connection_installs', 'tool_profiles', 'tool_profile_bindings'] LOOP
+ arguments := CASE relation
+ WHEN 'tool_connections' THEN '''id'', ''company_id'', ''name'', ''transport'', ''enabled'', ''status'''
+ WHEN 'tool_connection_installs' THEN '''id'', ''company_id'', ''connection_id'', ''target_type'', ''target_id'''
+ WHEN 'tool_profiles' THEN '''id'', ''company_id'', ''status'''
+ ELSE '''id'', ''company_id'', ''profile_id'', ''target_type'', ''target_id''' END;
+ EXECUTE format('DROP TRIGGER IF EXISTS paperclip_connector_runtime_insert ON %I', relation);
+ EXECUTE format('DROP TRIGGER IF EXISTS paperclip_connector_runtime_update ON %I', relation);
+ EXECUTE format('DROP TRIGGER IF EXISTS paperclip_connector_runtime_delete ON %I', relation);
+ EXECUTE format('CREATE TRIGGER paperclip_connector_runtime_insert AFTER INSERT ON %I REFERENCING NEW TABLE AS new_rows FOR EACH STATEMENT EXECUTE FUNCTION paperclip_connector_runtime_changed(%s)', relation, arguments);
+ EXECUTE format('CREATE TRIGGER paperclip_connector_runtime_update AFTER UPDATE ON %I REFERENCING OLD TABLE AS old_rows NEW TABLE AS new_rows FOR EACH STATEMENT EXECUTE FUNCTION paperclip_connector_runtime_changed(%s)', relation, arguments);
+ EXECUTE format('CREATE TRIGGER paperclip_connector_runtime_delete AFTER DELETE ON %I REFERENCING OLD TABLE AS old_rows FOR EACH STATEMENT EXECUTE FUNCTION paperclip_connector_runtime_changed(%s)', relation, arguments);
+ END LOOP;
+END;
+$$;
+--> statement-breakpoint
+CREATE OR REPLACE FUNCTION paperclip_connector_flags_runtime_changed() RETURNS trigger
+LANGUAGE plpgsql SET search_path = public, pg_temp AS $$
+DECLARE company uuid; previous jsonb := coalesce(to_jsonb(OLD)->'experimental', '{}'::jsonb);
+ current jsonb := coalesce(to_jsonb(NEW)->'experimental', '{}'::jsonb);
+BEGIN
+ IF jsonb_build_array(coalesce(previous->'enablePublicMcp', 'false'::jsonb), coalesce(previous->'enableChatConnectors', 'false'::jsonb))
+ IS DISTINCT FROM jsonb_build_array(coalesce(current->'enablePublicMcp', 'false'::jsonb), coalesce(current->'enableChatConnectors', 'false'::jsonb)) THEN
+ FOR company IN SELECT DISTINCT company_id FROM agents ORDER BY company_id LOOP
+ PERFORM paperclip_invalidate_connector_company(company);
+ END LOOP;
+ END IF;
+ RETURN NULL;
+END;
+$$;
+--> statement-breakpoint
+DROP TRIGGER IF EXISTS paperclip_connector_flags_runtime_changed ON instance_settings;
+CREATE TRIGGER paperclip_connector_flags_runtime_changed AFTER INSERT OR UPDATE OR DELETE ON instance_settings
+ FOR EACH ROW EXECUTE FUNCTION paperclip_connector_flags_runtime_changed();
diff --git a/packages/db/src/migrations/meta/0349_snapshot.json b/packages/db/src/migrations/meta/0354_snapshot.json
similarity index 93%
rename from packages/db/src/migrations/meta/0349_snapshot.json
rename to packages/db/src/migrations/meta/0354_snapshot.json
index 7667f613b9..dc932d2c6b 100644
--- a/packages/db/src/migrations/meta/0349_snapshot.json
+++ b/packages/db/src/migrations/meta/0354_snapshot.json
@@ -1,6 +1,6 @@
{
- "id": "cbf5e62c-5703-41fb-ac18-2df56eefc951",
- "prevId": "72f92f9d-5e5f-4127-ae11-b995dda16188",
+ "id": "ab82fb6d-abee-4334-9723-8d9684319aaf",
+ "prevId": "c2924a97-9a78-4207-8e5b-dd3c2ef4560b",
"version": "7",
"dialect": "postgresql",
"tables": {
@@ -64,37 +64,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -200,9 +200,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"billing_invoice_lines_company_idx": {
"name": "billing_invoice_lines_company_idx",
@@ -221,50 +221,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -361,24 +361,24 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -485,9 +485,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"budget_reservations_decision_idx": {
"name": "budget_reservations_decision_idx",
@@ -506,9 +506,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"budget_reservations_run_idx": {
"name": "budget_reservations_run_idx",
@@ -527,9 +527,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"budget_reservations_active_idx": {
"name": "budget_reservations_active_idx",
@@ -554,51 +554,51 @@
}
],
"isUnique": false,
- "where": "\"budget_reservations\".\"state\" = 'held'",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"budget_reservations\".\"state\" = 'held'",
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -731,9 +731,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"cost_adjustments_event_idx": {
"name": "cost_adjustments_event_idx",
@@ -758,9 +758,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"cost_adjustments_invoice_line_idx": {
"name": "cost_adjustments_invoice_line_idx",
@@ -779,50 +779,50 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -934,24 +934,24 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -1061,9 +1061,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"run_usage_receipts_run_latest_idx": {
"name": "run_usage_receipts_run_latest_idx",
@@ -1088,37 +1088,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -1230,9 +1230,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"activity_log_company_agent_created_idx": {
"name": "activity_log_company_agent_created_idx",
@@ -1257,9 +1257,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"activity_log_company_responsible_user_created_idx": {
"name": "activity_log_company_responsible_user_created_idx",
@@ -1284,9 +1284,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"activity_log_run_id_idx": {
"name": "activity_log_run_id_idx",
@@ -1299,9 +1299,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"activity_log_entity_type_id_idx": {
"name": "activity_log_entity_type_id_idx",
@@ -1320,50 +1320,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -1519,9 +1519,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"adapter_auth_sessions_company_owner_adapter_active_uq": {
"name": "adapter_auth_sessions_company_owner_adapter_active_uq",
@@ -1546,10 +1546,10 @@
}
],
"isUnique": true,
- "where": "\"adapter_auth_sessions\".\"status\" IN ('starting', 'waiting_for_user', 'promoting', 'awaiting_code', 'submitting')",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"adapter_auth_sessions\".\"status\" IN ('starting', 'waiting_for_user', 'promoting', 'awaiting_code', 'submitting')",
+ "concurrently": false
},
"adapter_auth_sessions_public_session_id_uq": {
"name": "adapter_auth_sessions_public_session_id_uq",
@@ -1562,9 +1562,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"adapter_auth_sessions_environment_idx": {
"name": "adapter_auth_sessions_environment_idx",
@@ -1577,9 +1577,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"adapter_auth_sessions_expires_idx": {
"name": "adapter_auth_sessions_expires_idx",
@@ -1592,9 +1592,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"adapter_auth_sessions_provider_lease_idx": {
"name": "adapter_auth_sessions_provider_lease_idx",
@@ -1607,37 +1607,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -1725,9 +1725,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"agent_api_keys_company_agent_idx": {
"name": "agent_api_keys_company_agent_idx",
@@ -1746,37 +1746,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -1876,9 +1876,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"agent_commentary_company_kind_created_idx": {
"name": "agent_commentary_company_kind_created_idx",
@@ -1903,63 +1903,63 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -2072,9 +2072,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"agent_config_revisions_agent_created_idx": {
"name": "agent_config_revisions_agent_created_idx",
@@ -2093,50 +2093,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -2198,17 +2198,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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -2263,33 +2263,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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"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": {},
@@ -2435,39 +2435,39 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"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": {},
@@ -2627,9 +2627,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"agent_instruction_copies_agent_idx": {
"name": "agent_instruction_copies_agent_idx",
@@ -2654,39 +2654,39 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -2770,9 +2770,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"agent_memberships_company_user_starred_idx": {
"name": "agent_memberships_company_user_starred_idx",
@@ -2797,9 +2797,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"agent_memberships_agent_idx": {
"name": "agent_memberships_agent_idx",
@@ -2812,9 +2812,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"agent_memberships_company_user_agent_uq": {
"name": "agent_memberships_company_user_agent_uq",
@@ -2839,37 +2839,37 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -2992,9 +2992,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"agent_runtime_state_company_updated_idx": {
"name": "agent_runtime_state_company_updated_idx",
@@ -3013,37 +3013,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -3157,9 +3157,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"agent_session_goal_actions_company_status_created_idx": {
"name": "agent_session_goal_actions_company_status_created_idx",
@@ -3184,9 +3184,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"agent_session_goal_actions_session_created_idx": {
"name": "agent_session_goal_actions_session_created_idx",
@@ -3205,37 +3205,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -3397,9 +3397,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"agent_task_sessions_company_agent_updated_idx": {
"name": "agent_task_sessions_company_agent_updated_idx",
@@ -3424,9 +3424,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"agent_task_sessions_company_task_updated_idx": {
"name": "agent_task_sessions_company_task_updated_idx",
@@ -3451,50 +3451,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -3652,9 +3652,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"agent_wakeup_requests_company_requested_idx": {
"name": "agent_wakeup_requests_company_requested_idx",
@@ -3673,9 +3673,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"agent_wakeup_requests_agent_requested_idx": {
"name": "agent_wakeup_requests_agent_requested_idx",
@@ -3694,9 +3694,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"agent_wakeup_requests_review_path_recovery_idempotency_uq": {
"name": "agent_wakeup_requests_review_path_recovery_idempotency_uq",
@@ -3715,10 +3715,10 @@
}
],
"isUnique": true,
- "where": "\"agent_wakeup_requests\".\"idempotency_key\" LIKE 'issue_review_path_lost:%' AND \"agent_wakeup_requests\".\"status\" <> 'skipped'",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"agent_wakeup_requests\".\"idempotency_key\" LIKE 'issue_review_path_lost:%' AND \"agent_wakeup_requests\".\"status\" <> 'skipped'",
+ "concurrently": false
},
"agent_wakeup_requests_disposition_repair_idempotency_uq": {
"name": "agent_wakeup_requests_disposition_repair_idempotency_uq",
@@ -3737,10 +3737,10 @@
}
],
"isUnique": true,
- "where": "\"agent_wakeup_requests\".\"idempotency_key\" LIKE 'issue_disposition_repair:%' AND \"agent_wakeup_requests\".\"status\" <> 'skipped'",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"agent_wakeup_requests\".\"idempotency_key\" LIKE 'issue_disposition_repair:%' AND \"agent_wakeup_requests\".\"status\" <> 'skipped'",
+ "concurrently": false
},
"agent_wakeup_requests_question_response_delivery_idempotency_uq": {
"name": "agent_wakeup_requests_question_response_delivery_idempotency_uq",
@@ -3759,10 +3759,10 @@
}
],
"isUnique": true,
- "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,
+ "with": {},
"method": "btree",
- "with": {}
+ "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
},
"agent_wakeup_requests_question_response_history_idx": {
"name": "agent_wakeup_requests_question_response_history_idx",
@@ -3781,10 +3781,10 @@
}
],
"isUnique": false,
- "where": "\"agent_wakeup_requests\".\"idempotency_key\" LIKE 'question-response:%'",
- "concurrently": true,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"agent_wakeup_requests\".\"idempotency_key\" LIKE 'question-response:%'",
+ "concurrently": true
},
"agent_wakeup_requests_connection_intent_delivery_idempotency_uq": {
"name": "agent_wakeup_requests_connection_intent_delivery_idempotency_uq",
@@ -3803,10 +3803,10 @@
}
],
"isUnique": true,
- "where": "\"agent_wakeup_requests\".\"idempotency_key\" LIKE 'connection-intent:%' AND \"agent_wakeup_requests\".\"status\" NOT IN ('skipped', 'failed', 'cancelled')",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"agent_wakeup_requests\".\"idempotency_key\" LIKE 'connection-intent:%' AND \"agent_wakeup_requests\".\"status\" NOT IN ('skipped', 'failed', 'cancelled')",
+ "concurrently": false
},
"agent_wakeup_requests_tool_action_delivery_uq": {
"name": "agent_wakeup_requests_tool_action_delivery_uq",
@@ -3825,10 +3825,10 @@
}
],
"isUnique": true,
- "where": "\"agent_wakeup_requests\".\"idempotency_key\" LIKE 'tool-action-response:%' AND \"agent_wakeup_requests\".\"status\" NOT IN ('skipped', 'failed', 'cancelled')",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"agent_wakeup_requests\".\"idempotency_key\" LIKE 'tool-action-response:%' AND \"agent_wakeup_requests\".\"status\" NOT IN ('skipped', 'failed', 'cancelled')",
+ "concurrently": false
},
"agent_wakeup_requests_chat_completion_uq": {
"name": "agent_wakeup_requests_chat_completion_uq",
@@ -3847,10 +3847,10 @@
}
],
"isUnique": true,
- "where": "\"agent_wakeup_requests\".\"idempotency_key\" LIKE 'chat-completion:%'",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"agent_wakeup_requests\".\"idempotency_key\" LIKE 'chat-completion:%'",
+ "concurrently": false
},
"agent_wakeup_requests_company_payload_issue_idx": {
"name": "agent_wakeup_requests_company_payload_issue_idx",
@@ -3863,43 +3863,43 @@
},
{
"expression": "(\"payload\" ->> 'issueId')",
- "asc": true,
"isExpression": true,
+ "asc": true,
"nulls": "last"
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -4143,9 +4143,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"agents_company_status_idx": {
"name": "agents_company_status_idx",
@@ -4164,9 +4164,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"agents_company_reports_to_idx": {
"name": "agents_company_reports_to_idx",
@@ -4185,9 +4185,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"agents_company_default_environment_idx": {
"name": "agents_company_default_environment_idx",
@@ -4206,61 +4206,61 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"agents_company_id_uq": {
"name": "agents_company_id_uq",
- "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ]
+ ],
+ "nullsNotDistinct": false
}
},
"policies": {},
@@ -4346,39 +4346,39 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -4451,54 +4451,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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"ai_connection_pools_company_id_uq": {
"name": "ai_connection_pools_company_id_uq",
- "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ]
+ ],
+ "nullsNotDistinct": false
}
},
"policies": {},
@@ -4540,43 +4540,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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -4670,80 +4670,80 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -4819,39 +4819,39 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -4925,9 +4925,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"ai_subscription_connections_credential_idx": {
"name": "ai_subscription_connections_credential_idx",
@@ -4946,9 +4946,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"ai_subscription_connections_account_idx": {
"name": "ai_subscription_connections_account_idx",
@@ -4967,63 +4967,63 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -5132,9 +5132,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"ai_subscription_prices_company_idx": {
"name": "ai_subscription_prices_company_idx",
@@ -5147,37 +5147,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -5316,9 +5316,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"ai_subscriptions_company_idx": {
"name": "ai_subscriptions_company_idx",
@@ -5331,37 +5331,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -5502,9 +5502,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"approval_comments_approval_idx": {
"name": "approval_comments_approval_idx",
@@ -5517,9 +5517,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"approval_comments_approval_created_idx": {
"name": "approval_comments_approval_created_idx",
@@ -5538,50 +5538,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -5695,37 +5695,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -5832,9 +5832,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"assets_company_provider_idx": {
"name": "assets_company_provider_idx",
@@ -5853,9 +5853,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"assets_company_object_key_uq": {
"name": "assets_company_object_key_uq",
@@ -5874,37 +5874,37 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -6020,24 +6020,24 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -6104,15 +6104,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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -6293,9 +6293,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"board_api_keys_user_idx": {
"name": "board_api_keys_user_idx",
@@ -6308,24 +6308,24 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -6396,9 +6396,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"browser_use_browsers_session_idx": {
"name": "browser_use_browsers_session_idx",
@@ -6411,37 +6411,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -6563,9 +6563,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"browser_use_runs_provider_uq": {
"name": "browser_use_runs_provider_uq",
@@ -6578,9 +6578,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"browser_use_runs_session_idx": {
"name": "browser_use_runs_session_idx",
@@ -6593,50 +6593,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -6769,9 +6769,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"browser_use_sessions_provider_uq": {
"name": "browser_use_sessions_provider_uq",
@@ -6784,76 +6784,76 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -6897,28 +6897,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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -7056,9 +7056,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"budget_incidents_company_scope_idx": {
"name": "budget_incidents_company_scope_idx",
@@ -7089,9 +7089,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"budget_incidents_policy_window_threshold_idx": {
"name": "budget_incidents_policy_window_threshold_idx",
@@ -7116,51 +7116,51 @@
}
],
"isUnique": true,
- "where": "\"budget_incidents\".\"status\" = 'open'",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"budget_incidents\".\"status\" = 'open'",
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -7331,9 +7331,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"budget_policies_company_window_idx": {
"name": "budget_policies_company_window_idx",
@@ -7358,9 +7358,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"budget_policies_company_scope_metric_unique_idx": {
"name": "budget_policies_company_scope_metric_unique_idx",
@@ -7397,24 +7397,24 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -7515,9 +7515,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"built_in_managed_resources_resource_idx": {
"name": "built_in_managed_resources_resource_idx",
@@ -7536,9 +7536,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"built_in_managed_resources_company_bundle_resource_uq": {
"name": "built_in_managed_resources_company_bundle_resource_uq",
@@ -7569,24 +7569,24 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -7657,9 +7657,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"case_attachments_asset_uq": {
"name": "case_attachments_asset_uq",
@@ -7672,50 +7672,50 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -7798,9 +7798,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"case_documents_document_uq": {
"name": "case_documents_document_uq",
@@ -7813,9 +7813,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"case_documents_company_case_updated_idx": {
"name": "case_documents_company_case_updated_idx",
@@ -7840,50 +7840,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -7985,9 +7985,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"case_events_company_case_idx": {
"name": "case_events_company_case_idx",
@@ -8006,50 +8006,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -8141,9 +8141,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"case_issue_links_company_case_idx": {
"name": "case_issue_links_company_case_idx",
@@ -8162,9 +8162,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"case_issue_links_issue_idx": {
"name": "case_issue_links_issue_idx",
@@ -8177,50 +8177,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -8296,9 +8296,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"case_labels_company_case_idx": {
"name": "case_labels_company_case_idx",
@@ -8317,9 +8317,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"case_labels_label_idx": {
"name": "case_labels_label_idx",
@@ -8332,50 +8332,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -8514,9 +8514,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"cases_identifier_uq": {
"name": "cases_identifier_uq",
@@ -8529,9 +8529,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"cases_company_type_key_uq": {
"name": "cases_company_type_key_uq",
@@ -8556,9 +8556,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"cases_company_status_idx": {
"name": "cases_company_status_idx",
@@ -8577,9 +8577,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"cases_company_type_idx": {
"name": "cases_company_type_idx",
@@ -8598,9 +8598,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"cases_company_project_idx": {
"name": "cases_company_project_idx",
@@ -8619,9 +8619,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"cases_parent_idx": {
"name": "cases_parent_idx",
@@ -8634,9 +8634,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"cases_title_search_idx": {
"name": "cases_title_search_idx",
@@ -8650,9 +8650,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "gin",
- "with": {}
+ "concurrently": false
},
"cases_identifier_search_idx": {
"name": "cases_identifier_search_idx",
@@ -8666,9 +8666,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "gin",
- "with": {}
+ "concurrently": false
},
"cases_summary_search_idx": {
"name": "cases_summary_search_idx",
@@ -8682,63 +8682,63 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "gin",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"cases_project_id_projects_id_fk": {
"name": "cases_project_id_projects_id_fk",
"tableFrom": "cases",
- "tableTo": "projects",
"columnsFrom": [
"project_id"
],
+ "tableTo": "projects",
"columnsTo": [
"id"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -8858,97 +8858,97 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -9046,54 +9046,54 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -9233,9 +9233,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"chat_conversations_thread_uq": {
"name": "chat_conversations_thread_uq",
@@ -9266,106 +9266,106 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "restrict",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "restrict"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"chat_conversations_company_id_uq": {
"name": "chat_conversations_company_id_uq",
- "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ]
+ ],
+ "nullsNotDistinct": false
}
},
"policies": {},
@@ -9508,9 +9508,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"chat_deliveries_event_uq": {
"name": "chat_deliveries_event_uq",
@@ -9529,9 +9529,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"chat_deliveries_dedupe_uq": {
"name": "chat_deliveries_dedupe_uq",
@@ -9550,106 +9550,106 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"chat_deliveries_company_id_uq": {
"name": "chat_deliveries_company_id_uq",
- "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ]
+ ],
+ "nullsNotDistinct": false
}
},
"policies": {},
@@ -9735,9 +9735,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"chat_endpoint_leases_expiry_idx": {
"name": "chat_endpoint_leases_expiry_idx",
@@ -9750,39 +9750,39 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -9910,9 +9910,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"chat_endpoint_resources_external_uq": {
"name": "chat_endpoint_resources_external_uq",
@@ -9937,50 +9937,50 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"chat_endpoint_resources_company_id_uq": {
"name": "chat_endpoint_resources_company_id_uq",
- "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ]
+ ],
+ "nullsNotDistinct": false
}
},
"policies": {},
@@ -10228,9 +10228,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"chat_endpoints_agent_idx": {
"name": "chat_endpoints_agent_idx",
@@ -10249,9 +10249,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"chat_endpoints_status_idx": {
"name": "chat_endpoints_status_idx",
@@ -10270,9 +10270,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"chat_endpoints_public_id_uq": {
"name": "chat_endpoints_public_id_uq",
@@ -10285,9 +10285,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"chat_endpoints_agentmail_inbox_uq": {
"name": "chat_endpoints_agentmail_inbox_uq",
@@ -10300,10 +10300,10 @@
}
],
"isUnique": true,
- "where": "\"chat_endpoints\".\"provider\" = 'agentmail' and \"chat_endpoints\".\"status\" != 'archived' and \"chat_endpoints\".\"bot_external_id\" is not null",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"chat_endpoints\".\"provider\" = 'agentmail' and \"chat_endpoints\".\"status\" != 'archived' and \"chat_endpoints\".\"bot_external_id\" is not null",
+ "concurrently": false
},
"chat_endpoints_connection_uq": {
"name": "chat_endpoints_connection_uq",
@@ -10316,9 +10316,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"chat_endpoints_live_bot_external_uq": {
"name": "chat_endpoints_live_bot_external_uq",
@@ -10343,10 +10343,10 @@
}
],
"isUnique": true,
- "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,
+ "with": {},
"method": "btree",
- "with": {}
+ "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
},
"chat_endpoints_photon_number_uq": {
"name": "chat_endpoints_photon_number_uq",
@@ -10359,10 +10359,10 @@
}
],
"isUnique": true,
- "where": "\"chat_endpoints\".\"provider\" = 'imessage-photon' and \"chat_endpoints\".\"status\" <> 'archived' and \"chat_endpoints\".\"bot_external_id\" is not null",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"chat_endpoints\".\"provider\" = 'imessage-photon' and \"chat_endpoints\".\"status\" <> 'archived' and \"chat_endpoints\".\"bot_external_id\" is not null",
+ "concurrently": false
},
"chat_endpoints_live_discord_bot_external_uq": {
"name": "chat_endpoints_live_discord_bot_external_uq",
@@ -10381,10 +10381,10 @@
}
],
"isUnique": true,
- "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,
+ "with": {},
"method": "btree",
- "with": {}
+ "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
},
"chat_endpoints_live_global_app_bot_external_uq": {
"name": "chat_endpoints_live_global_app_bot_external_uq",
@@ -10403,10 +10403,10 @@
}
],
"isUnique": true,
- "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,
+ "with": {},
"method": "btree",
- "with": {}
+ "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
},
"chat_endpoints_live_bot_username_uq": {
"name": "chat_endpoints_live_bot_username_uq",
@@ -10431,79 +10431,79 @@
}
],
"isUnique": true,
- "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,
+ "with": {},
"method": "btree",
- "with": {}
+ "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
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "restrict",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "restrict"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"chat_endpoints_company_id_uq": {
"name": "chat_endpoints_company_id_uq",
- "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ]
+ ],
+ "nullsNotDistinct": false
}
},
"policies": {},
@@ -10639,9 +10639,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"chat_external_principals_external_uq": {
"name": "chat_external_principals_external_uq",
@@ -10672,35 +10672,35 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"chat_external_principals_company_id_uq": {
"name": "chat_external_principals_company_id_uq",
- "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ]
+ ],
+ "nullsNotDistinct": false
}
},
"policies": {},
@@ -10815,9 +10815,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"chat_identity_links_endpoint_principal_uq": {
"name": "chat_identity_links_endpoint_principal_uq",
@@ -10836,54 +10836,54 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -10988,138 +10988,138 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -11263,9 +11263,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"chat_publications_work_idx": {
"name": "chat_publications_work_idx",
@@ -11284,9 +11284,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"chat_publications_idempotency_uq": {
"name": "chat_publications_idempotency_uq",
@@ -11305,110 +11305,110 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "restrict",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "restrict"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -11503,9 +11503,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"chat_sdk_state_expiry_idx": {
"name": "chat_sdk_state_expiry_idx",
@@ -11518,39 +11518,39 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -11653,9 +11653,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"chat_completion_deliveries_pending_idx": {
"name": "chat_completion_deliveries_pending_idx",
@@ -11674,63 +11674,63 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -11799,63 +11799,63 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -11968,17 +11968,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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -12097,9 +12097,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"chat_github_registration_endpoint_idx": {
"name": "chat_github_registration_endpoint_idx",
@@ -12118,26 +12118,26 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -12317,9 +12317,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"chat_github_reviews_pull_idx": {
"name": "chat_github_reviews_pull_idx",
@@ -12350,9 +12350,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"chat_github_reviews_task_idx": {
"name": "chat_github_reviews_task_idx",
@@ -12377,65 +12377,65 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "restrict",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "restrict"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"chat_github_reviews_company_id_uq": {
"name": "chat_github_reviews_company_id_uq",
- "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ]
+ ],
+ "nullsNotDistinct": false
}
},
"policies": {},
@@ -12570,9 +12570,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"chat_slack_manager_grants_owner_idx": {
"name": "chat_slack_manager_grants_owner_idx",
@@ -12603,24 +12603,24 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -12749,32 +12749,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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -13038,9 +13038,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"chat_teams_file_transfers_token_uq": {
"name": "chat_teams_file_transfers_token_uq",
@@ -13059,9 +13059,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"chat_teams_file_transfers_work_idx": {
"name": "chat_teams_file_transfers_work_idx",
@@ -13086,97 +13086,97 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "restrict",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "restrict"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -13276,26 +13276,26 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -13444,81 +13444,81 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"chat_voice_inbound_provider_uq": {
"name": "chat_voice_inbound_provider_uq",
- "nullsNotDistinct": false,
"columns": [
"provider_session_id"
- ]
+ ],
+ "nullsNotDistinct": false
}
},
"policies": {},
@@ -13603,40 +13603,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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"chat_voice_phone_lines_number_uq": {
"name": "chat_voice_phone_lines_number_uq",
- "nullsNotDistinct": false,
"columns": [
"provider_number_id"
- ]
+ ],
+ "nullsNotDistinct": false
}
},
"policies": {},
@@ -13736,26 +13736,26 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -13854,9 +13854,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"chat_voice_replies_cursor_uq": {
"name": "chat_voice_replies_cursor_uq",
@@ -13875,54 +13875,54 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -14100,9 +14100,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"chat_voice_sessions_request_uq": {
"name": "chat_voice_sessions_request_uq",
@@ -14127,9 +14127,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"chat_voice_sessions_live_caller_task_uq": {
"name": "chat_voice_sessions_live_caller_task_uq",
@@ -14154,10 +14154,10 @@
}
],
"isUnique": true,
- "where": "\"chat_voice_sessions\".\"state\" not in ('ended', 'failed', 'expired')",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"chat_voice_sessions\".\"state\" not in ('ended', 'failed', 'expired')",
+ "concurrently": false
},
"chat_voice_sessions_expiry_idx": {
"name": "chat_voice_sessions_expiry_idx",
@@ -14176,95 +14176,95 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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": {},
@@ -14381,9 +14381,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"chat_voice_tool_calls_webhook_uq": {
"name": "chat_voice_tool_calls_webhook_uq",
@@ -14402,54 +14402,54 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -14574,9 +14574,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"cli_auth_challenges_approved_by_idx": {
"name": "cli_auth_challenges_approved_by_idx",
@@ -14589,9 +14589,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"cli_auth_challenges_requested_company_idx": {
"name": "cli_auth_challenges_requested_company_idx",
@@ -14604,50 +14604,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -14804,9 +14804,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"foreignKeys": {},
@@ -14866,9 +14866,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_logos_asset_uq": {
"name": "company_logos_asset_uq",
@@ -14881,37 +14881,37 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -15001,9 +15001,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_memberships_principal_status_idx": {
"name": "company_memberships_principal_status_idx",
@@ -15028,9 +15028,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_memberships_company_status_idx": {
"name": "company_memberships_company_status_idx",
@@ -15049,24 +15049,24 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -15180,63 +15180,63 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -15346,9 +15346,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_secret_bindings_secret_idx": {
"name": "company_secret_bindings_secret_idx",
@@ -15361,9 +15361,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_secret_bindings_target_idx": {
"name": "company_secret_bindings_target_idx",
@@ -15388,9 +15388,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_secret_bindings_target_path_uq": {
"name": "company_secret_bindings_target_path_uq",
@@ -15421,37 +15421,37 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -15686,9 +15686,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_secret_proposals_proposer_status_idx": {
"name": "company_secret_proposals_proposer_status_idx",
@@ -15707,9 +15707,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_secret_proposals_expiry_idx": {
"name": "company_secret_proposals_expiry_idx",
@@ -15728,9 +15728,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_secret_proposals_secret_proposal_idx": {
"name": "company_secret_proposals_secret_proposal_idx",
@@ -15743,9 +15743,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_secret_proposals_interaction_idx": {
"name": "company_secret_proposals_interaction_idx",
@@ -15758,128 +15758,128 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -16024,9 +16024,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_secret_provider_configs_company_provider_idx": {
"name": "company_secret_provider_configs_company_provider_idx",
@@ -16045,9 +16045,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_secret_provider_configs_default_uq": {
"name": "company_secret_provider_configs_default_uq",
@@ -16066,38 +16066,38 @@
}
],
"isUnique": true,
- "where": "\"company_secret_provider_configs\".\"is_default\" = true",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"company_secret_provider_configs\".\"is_default\" = true",
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -16210,9 +16210,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_secret_versions_value_sha256_idx": {
"name": "company_secret_versions_value_sha256_idx",
@@ -16225,9 +16225,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_secret_versions_fingerprint_idx": {
"name": "company_secret_versions_fingerprint_idx",
@@ -16240,9 +16240,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_secret_versions_secret_version_uq": {
"name": "company_secret_versions_secret_version_uq",
@@ -16261,37 +16261,37 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -16476,9 +16476,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_secrets_company_scope_idx": {
"name": "company_secrets_company_scope_idx",
@@ -16497,9 +16497,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_secrets_company_owner_idx": {
"name": "company_secrets_company_owner_idx",
@@ -16518,9 +16518,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_secrets_user_definition_owner_idx": {
"name": "company_secrets_user_definition_owner_idx",
@@ -16545,9 +16545,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_secrets_company_provider_idx": {
"name": "company_secrets_company_provider_idx",
@@ -16566,9 +16566,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_secrets_instance_owner_key_uq": {
"name": "company_secrets_instance_owner_key_uq",
@@ -16599,10 +16599,10 @@
}
],
"isUnique": true,
- "where": "\"company_secrets\".\"scope\" = 'instance' and \"company_secrets\".\"deleted_at\" is null",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"company_secrets\".\"scope\" = 'instance' and \"company_secrets\".\"deleted_at\" is null",
+ "concurrently": false
},
"company_secrets_provider_config_idx": {
"name": "company_secrets_provider_config_idx",
@@ -16615,9 +16615,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_secrets_company_name_uq": {
"name": "company_secrets_company_name_uq",
@@ -16636,10 +16636,10 @@
}
],
"isUnique": true,
- "where": "\"company_secrets\".\"scope\" = 'company' and \"company_secrets\".\"deleted_at\" is null",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"company_secrets\".\"scope\" = 'company' and \"company_secrets\".\"deleted_at\" is null",
+ "concurrently": false
},
"company_secrets_company_key_uq": {
"name": "company_secrets_company_key_uq",
@@ -16658,10 +16658,10 @@
}
],
"isUnique": true,
- "where": "\"company_secrets\".\"scope\" = 'company' and \"company_secrets\".\"deleted_at\" is null",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"company_secrets\".\"scope\" = 'company' and \"company_secrets\".\"deleted_at\" is null",
+ "concurrently": false
},
"company_secrets_user_definition_owner_uq": {
"name": "company_secrets_user_definition_owner_uq",
@@ -16686,92 +16686,92 @@
}
],
"isUnique": true,
- "where": "\"company_secrets\".\"scope\" = 'user' and \"company_secrets\".\"deleted_at\" is null",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"company_secrets\".\"scope\" = 'user' and \"company_secrets\".\"deleted_at\" is null",
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -16841,15 +16841,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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -16888,15 +16888,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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -16997,9 +16997,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_skill_source_entries_company_skill_idx": {
"name": "company_skill_source_entries_company_skill_idx",
@@ -17018,50 +17018,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -17305,10 +17305,10 @@
}
],
"isUnique": true,
- "where": "\"company_skill_sources\".\"removed_at\" is null",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"company_skill_sources\".\"removed_at\" is null",
+ "concurrently": false
},
"company_skill_sources_identity_ref_idx": {
"name": "company_skill_sources_identity_ref_idx",
@@ -17333,25 +17333,25 @@
}
],
"isUnique": true,
- "where": "\"company_skill_sources\".\"removed_at\" is null",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"company_skill_sources\".\"removed_at\" is null",
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -17516,9 +17516,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"project_skill_sources_source_project_idx": {
"name": "project_skill_sources_source_project_idx",
@@ -17543,9 +17543,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"project_skill_sources_sync_idx": {
"name": "project_skill_sources_sync_idx",
@@ -17570,63 +17570,63 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -17727,9 +17727,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_skill_comments_parent_idx": {
"name": "company_skill_comments_parent_idx",
@@ -17742,63 +17742,63 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -17862,24 +17862,24 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -17949,9 +17949,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_skill_stars_skill_user_idx": {
"name": "company_skill_stars_skill_user_idx",
@@ -17970,9 +17970,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_skill_stars_company_skill_created_idx": {
"name": "company_skill_stars_company_skill_created_idx",
@@ -17997,50 +17997,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -18135,9 +18135,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_skill_test_inputs_company_skill_active_idx": {
"name": "company_skill_test_inputs_company_skill_active_idx",
@@ -18162,37 +18162,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -18305,50 +18305,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -18538,9 +18538,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_skill_test_runs_company_issue_idx": {
"name": "company_skill_test_runs_company_issue_idx",
@@ -18559,9 +18559,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_skill_test_runs_company_input_created_idx": {
"name": "company_skill_test_runs_company_input_created_idx",
@@ -18586,9 +18586,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_skill_test_runs_company_status_idx": {
"name": "company_skill_test_runs_company_status_idx",
@@ -18607,9 +18607,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_skill_test_runs_company_harness_expires_idx": {
"name": "company_skill_test_runs_company_harness_expires_idx",
@@ -18628,89 +18628,89 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "restrict",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "restrict"
},
"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"
],
- "onDelete": "restrict",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "restrict"
},
"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"
],
- "onDelete": "restrict",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "restrict"
}
},
"compositePrimaryKeys": {},
@@ -18829,9 +18829,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_skill_versions_skill_release_idx": {
"name": "company_skill_versions_skill_release_idx",
@@ -18850,10 +18850,10 @@
}
],
"isUnique": true,
- "where": "\"company_skill_versions\".\"release_id\" is not null",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"company_skill_versions\".\"release_id\" is not null",
+ "concurrently": false
},
"company_skill_versions_company_skill_created_idx": {
"name": "company_skill_versions_company_skill_created_idx",
@@ -18878,63 +18878,63 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "restrict",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "restrict"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -19170,9 +19170,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_skills_company_name_idx": {
"name": "company_skills_company_name_idx",
@@ -19191,9 +19191,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_skills_company_folder_idx": {
"name": "company_skills_company_folder_idx",
@@ -19212,9 +19212,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_skills_company_categories_idx": {
"name": "company_skills_company_categories_idx",
@@ -19227,9 +19227,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "gin",
- "with": {}
+ "concurrently": false
},
"company_skills_company_sharing_scope_idx": {
"name": "company_skills_company_sharing_scope_idx",
@@ -19248,9 +19248,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_skills_company_current_version_idx": {
"name": "company_skills_company_current_version_idx",
@@ -19269,9 +19269,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_skills_company_forked_from_idx": {
"name": "company_skills_company_forked_from_idx",
@@ -19290,76 +19290,76 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -19494,9 +19494,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_transfer_runs_idempotency_direction_idx": {
"name": "company_transfer_runs_idempotency_direction_idx",
@@ -19515,9 +19515,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_transfer_runs_actor_status_idx": {
"name": "company_transfer_runs_actor_status_idx",
@@ -19536,24 +19536,24 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -19619,9 +19619,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_user_sidebar_preferences_user_idx": {
"name": "company_user_sidebar_preferences_user_idx",
@@ -19634,9 +19634,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"company_user_sidebar_preferences_company_user_uq": {
"name": "company_user_sidebar_preferences_company_user_uq",
@@ -19655,24 +19655,24 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -19796,9 +19796,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"completion_contracts_issue_hash_uq": {
"name": "completion_contracts_issue_hash_uq",
@@ -19817,68 +19817,68 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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": {},
@@ -20016,9 +20016,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"connection_event_deliveries_company_status_idx": {
"name": "connection_event_deliveries_company_status_idx",
@@ -20043,24 +20043,24 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -20124,37 +20124,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -20357,9 +20357,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"cost_events_provider_request_idx": {
"name": "cost_events_provider_request_idx",
@@ -20384,9 +20384,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"cost_events_company_project_occurred_idx": {
"name": "cost_events_company_project_occurred_idx",
@@ -20411,9 +20411,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"cost_events_unpriced_idx": {
"name": "cost_events_unpriced_idx",
@@ -20438,10 +20438,10 @@
}
],
"isUnique": false,
- "where": "\"cost_events\".\"cost_status\" = 'unpriced' and \"cost_events\".\"billing_type\" <> 'subscription_included'",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"cost_events\".\"cost_status\" = 'unpriced' and \"cost_events\".\"billing_type\" <> 'subscription_included'",
+ "concurrently": false
},
"cost_events_data_quality_idx": {
"name": "cost_events_data_quality_idx",
@@ -20466,10 +20466,10 @@
}
],
"isUnique": false,
- "where": "\"cost_events\".\"billing_type\" = 'unknown' or (\"cost_events\".\"cost_status\" = 'unpriced' and \"cost_events\".\"billing_type\" <> 'subscription_included')",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"cost_events\".\"billing_type\" = 'unknown' or (\"cost_events\".\"cost_status\" = 'unpriced' and \"cost_events\".\"billing_type\" <> 'subscription_included')",
+ "concurrently": false
},
"cost_events_company_occurred_idx": {
"name": "cost_events_company_occurred_idx",
@@ -20488,9 +20488,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"cost_events_company_subscription_occurred_idx": {
"name": "cost_events_company_subscription_occurred_idx",
@@ -20515,9 +20515,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"cost_events_company_agent_occurred_idx": {
"name": "cost_events_company_agent_occurred_idx",
@@ -20542,9 +20542,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"cost_events_company_provider_occurred_idx": {
"name": "cost_events_company_provider_occurred_idx",
@@ -20569,9 +20569,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"cost_events_company_biller_occurred_idx": {
"name": "cost_events_company_biller_occurred_idx",
@@ -20596,9 +20596,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"cost_events_company_heartbeat_run_idx": {
"name": "cost_events_company_heartbeat_run_idx",
@@ -20617,102 +20617,102 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -20791,15 +20791,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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -20995,9 +20995,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"decision_invocations_pending_idx": {
"name": "decision_invocations_pending_idx",
@@ -21010,10 +21010,10 @@
}
],
"isUnique": false,
- "where": "\"decision_invocations\".\"status\" = 'running'",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"decision_invocations\".\"status\" = 'running'",
+ "concurrently": false
},
"decision_invocations_cost_idx": {
"name": "decision_invocations_cost_idx",
@@ -21026,37 +21026,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -21194,9 +21194,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"decision_archive_notification_outbox_pending_idx": {
"name": "decision_archive_notification_outbox_pending_idx",
@@ -21215,37 +21215,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -21362,9 +21362,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"decision_queue_items_company_source_idx": {
"name": "decision_queue_items_company_source_idx",
@@ -21389,78 +21389,78 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -21592,9 +21592,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"decision_queues_company_updated_idx": {
"name": "decision_queues_company_updated_idx",
@@ -21613,74 +21613,74 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"decision_queues_id_company_uq": {
"name": "decision_queues_id_company_uq",
- "nullsNotDistinct": false,
"columns": [
"id",
"company_id"
- ]
+ ],
+ "nullsNotDistinct": false
}
},
"policies": {},
@@ -21827,9 +21827,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"decision_retention_company_archived_idx": {
"name": "decision_retention_company_archived_idx",
@@ -21848,50 +21848,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -22034,9 +22034,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"decision_triage_company_decide_by_idx": {
"name": "decision_triage_company_decide_by_idx",
@@ -22055,63 +22055,63 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -22251,9 +22251,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"decision_triage_events_queue_created_idx": {
"name": "decision_triage_events_queue_created_idx",
@@ -22272,76 +22272,76 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -22468,9 +22468,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"decision_training_examples_issue_idx": {
"name": "decision_training_examples_issue_idx",
@@ -22483,9 +22483,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"decision_training_examples_source_author_uq": {
"name": "decision_training_examples_source_author_uq",
@@ -22510,37 +22510,37 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -22622,63 +22622,63 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -22772,9 +22772,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"decision_effect_executions_target_issue_idx": {
"name": "decision_effect_executions_target_issue_idx",
@@ -22787,50 +22787,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -22874,9 +22874,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"decision_target_issues_issue_idx": {
"name": "decision_target_issues_issue_idx",
@@ -22889,50 +22889,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {
@@ -23134,9 +23134,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"decisions_bundle_idx": {
"name": "decisions_bundle_idx",
@@ -23149,9 +23149,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"decisions_origin_issue_idx": {
"name": "decisions_origin_issue_idx",
@@ -23164,9 +23164,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"decisions_company_idempotency_uq": {
"name": "decisions_company_idempotency_uq",
@@ -23185,77 +23185,77 @@
}
],
"isUnique": true,
- "where": "\"decisions\".\"idempotency_key\" IS NOT NULL",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"decisions\".\"idempotency_key\" IS NOT NULL",
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -23379,9 +23379,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"document_annotation_anchor_snapshots_company_document_revision_idx": {
"name": "document_annotation_anchor_snapshots_company_document_revision_idx",
@@ -23406,76 +23406,76 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -23612,9 +23612,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"document_annotation_comments_company_issue_created_at_idx": {
"name": "document_annotation_comments_company_issue_created_at_idx",
@@ -23639,9 +23639,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"document_annotation_comments_company_routine_created_at_idx": {
"name": "document_annotation_comments_company_routine_created_at_idx",
@@ -23666,9 +23666,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"document_annotation_comments_company_case_created_at_idx": {
"name": "document_annotation_comments_company_case_created_at_idx",
@@ -23693,9 +23693,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"document_annotation_comments_company_document_created_at_idx": {
"name": "document_annotation_comments_company_document_created_at_idx",
@@ -23720,9 +23720,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"document_annotation_comments_issue_comment_idx": {
"name": "document_annotation_comments_issue_comment_idx",
@@ -23735,9 +23735,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"document_annotation_comments_body_search_idx": {
"name": "document_annotation_comments_body_search_idx",
@@ -23751,128 +23751,128 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "gin",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -24097,9 +24097,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"document_annotation_threads_company_issue_status_idx": {
"name": "document_annotation_threads_company_issue_status_idx",
@@ -24124,9 +24124,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"document_annotation_threads_company_routine_status_idx": {
"name": "document_annotation_threads_company_routine_status_idx",
@@ -24151,9 +24151,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"document_annotation_threads_company_case_status_idx": {
"name": "document_annotation_threads_company_case_status_idx",
@@ -24178,9 +24178,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"document_annotation_threads_company_current_revision_open_idx": {
"name": "document_annotation_threads_company_current_revision_open_idx",
@@ -24211,9 +24211,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"document_annotation_threads_company_anchor_state_idx": {
"name": "document_annotation_threads_company_anchor_state_idx",
@@ -24232,128 +24232,128 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -24441,9 +24441,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"document_memberships_company_user_document_uq": {
"name": "document_memberships_company_user_document_uq",
@@ -24468,37 +24468,37 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -24605,9 +24605,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"document_revisions_company_document_created_idx": {
"name": "document_revisions_company_document_created_idx",
@@ -24632,63 +24632,63 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -24827,9 +24827,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"documents_company_created_idx": {
"name": "documents_company_created_idx",
@@ -24848,9 +24848,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"documents_title_search_idx": {
"name": "documents_title_search_idx",
@@ -24864,9 +24864,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "gin",
- "with": {}
+ "concurrently": false
},
"documents_latest_body_search_idx": {
"name": "documents_latest_body_search_idx",
@@ -24880,63 +24880,63 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "gin",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -25076,10 +25076,10 @@
}
],
"isUnique": true,
- "where": "\"dot_agent_bindings\".\"revoked_at\" IS NULL",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"dot_agent_bindings\".\"revoked_at\" IS NULL",
+ "concurrently": false
},
"dot_bindings_active_grant_uq": {
"name": "dot_bindings_active_grant_uq",
@@ -25092,10 +25092,10 @@
}
],
"isUnique": true,
- "where": "\"dot_agent_bindings\".\"revoked_at\" IS NULL AND \"dot_agent_bindings\".\"grant_id\" IS NOT NULL",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"dot_agent_bindings\".\"revoked_at\" IS NULL AND \"dot_agent_bindings\".\"grant_id\" IS NOT NULL",
+ "concurrently": false
},
"dot_bindings_pairing_code_uq": {
"name": "dot_bindings_pairing_code_uq",
@@ -25108,50 +25108,50 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -25244,9 +25244,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"dot_mailbox_binding_cursor_idx": {
"name": "dot_mailbox_binding_cursor_idx",
@@ -25271,50 +25271,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -25464,9 +25464,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"dot_assignments_active_binding_uq": {
"name": "dot_assignments_active_binding_uq",
@@ -25479,10 +25479,10 @@
}
],
"isUnique": true,
- "where": "\"dot_runner_assignments\".\"status\" IN ('offered', 'accepted')",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"dot_runner_assignments\".\"status\" IN ('offered', 'accepted')",
+ "concurrently": false
},
"dot_assignments_company_idx": {
"name": "dot_assignments_company_idx",
@@ -25495,63 +25495,63 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -25665,37 +25665,37 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -25762,17 +25762,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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -25885,9 +25885,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"email_messages_conversation_idx": {
"name": "email_messages_conversation_idx",
@@ -25912,41 +25912,41 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -26032,42 +26032,42 @@
}
],
"isUnique": false,
- "where": "\"email_sends\".\"outcome\" in ('queued', 'uncertain')",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"email_sends\".\"outcome\" in ('queued', 'uncertain')",
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -26222,9 +26222,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"environment_custom_image_setup_sessions_environment_active_uq": {
"name": "environment_custom_image_setup_sessions_environment_active_uq",
@@ -26237,10 +26237,10 @@
}
],
"isUnique": true,
- "where": "\"environment_custom_image_setup_sessions\".\"status\" IN ('starting', 'waiting_for_user', 'capturing')",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"environment_custom_image_setup_sessions\".\"status\" IN ('starting', 'waiting_for_user', 'capturing')",
+ "concurrently": false
},
"environment_custom_image_setup_sessions_template_idx": {
"name": "environment_custom_image_setup_sessions_template_idx",
@@ -26253,9 +26253,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"environment_custom_image_setup_sessions_promoted_template_idx": {
"name": "environment_custom_image_setup_sessions_promoted_template_idx",
@@ -26268,9 +26268,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"environment_custom_image_setup_sessions_expires_idx": {
"name": "environment_custom_image_setup_sessions_expires_idx",
@@ -26283,9 +26283,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"environment_custom_image_setup_sessions_provider_lease_idx": {
"name": "environment_custom_image_setup_sessions_provider_lease_idx",
@@ -26304,76 +26304,76 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -26506,9 +26506,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"environment_custom_image_templates_environment_provider_status_idx": {
"name": "environment_custom_image_templates_environment_provider_status_idx",
@@ -26533,9 +26533,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"environment_custom_image_templates_environment_active_uq": {
"name": "environment_custom_image_templates_environment_active_uq",
@@ -26548,10 +26548,10 @@
}
],
"isUnique": true,
- "where": "\"environment_custom_image_templates\".\"status\" = 'active'",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"environment_custom_image_templates\".\"status\" = 'active'",
+ "concurrently": false
},
"environment_custom_image_templates_superseded_by_idx": {
"name": "environment_custom_image_templates_superseded_by_idx",
@@ -26564,9 +26564,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"environment_custom_image_templates_last_used_idx": {
"name": "environment_custom_image_templates_last_used_idx",
@@ -26579,50 +26579,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -26781,9 +26781,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"environment_leases_company_execution_workspace_idx": {
"name": "environment_leases_company_execution_workspace_idx",
@@ -26802,9 +26802,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"environment_leases_company_issue_idx": {
"name": "environment_leases_company_issue_idx",
@@ -26823,9 +26823,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"environment_leases_heartbeat_run_idx": {
"name": "environment_leases_heartbeat_run_idx",
@@ -26838,9 +26838,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"environment_leases_company_last_used_idx": {
"name": "environment_leases_company_last_used_idx",
@@ -26859,9 +26859,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"environment_leases_provider_lease_idx": {
"name": "environment_leases_provider_lease_idx",
@@ -26874,76 +26874,76 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -27036,9 +27036,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"environments_local_driver_idx": {
"name": "environments_local_driver_idx",
@@ -27051,10 +27051,10 @@
}
],
"isUnique": true,
- "where": "\"environments\".\"driver\" = 'local'",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"environments\".\"driver\" = 'local'",
+ "concurrently": false
},
"environments_managed_sandbox_idx": {
"name": "environments_managed_sandbox_idx",
@@ -27067,10 +27067,10 @@
}
],
"isUnique": true,
- "where": "\"environments\".\"driver\" = 'sandbox' AND (\"environments\".\"metadata\" ->> 'managedByPaperclip')::boolean = true",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"environments\".\"driver\" = 'sandbox' AND (\"environments\".\"metadata\" ->> 'managedByPaperclip')::boolean = true",
+ "concurrently": false
},
"environments_name_idx": {
"name": "environments_name_idx",
@@ -27083,9 +27083,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"foreignKeys": {},
@@ -27226,9 +27226,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"execution_workspace_repositories_path_idx": {
"name": "execution_workspace_repositories_path_idx",
@@ -27247,9 +27247,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"execution_workspace_repositories_request_idx": {
"name": "execution_workspace_repositories_request_idx",
@@ -27268,9 +27268,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"execution_workspace_repositories_company_workspace_idx": {
"name": "execution_workspace_repositories_company_workspace_idx",
@@ -27289,50 +27289,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -27445,24 +27445,24 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -27539,24 +27539,24 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -27677,9 +27677,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"execution_workspace_runtime_leases_company_owner_idx": {
"name": "execution_workspace_runtime_leases_company_owner_idx",
@@ -27698,9 +27698,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"execution_workspace_runtime_leases_expires_at_idx": {
"name": "execution_workspace_runtime_leases_expires_at_idx",
@@ -27713,86 +27713,86 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"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": {},
@@ -27979,9 +27979,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"execution_workspaces_company_project_workspace_status_idx": {
"name": "execution_workspaces_company_project_workspace_status_idx",
@@ -28006,9 +28006,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"execution_workspaces_company_source_issue_idx": {
"name": "execution_workspaces_company_source_issue_idx",
@@ -28027,9 +28027,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"execution_workspaces_company_last_used_idx": {
"name": "execution_workspaces_company_last_used_idx",
@@ -28048,9 +28048,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"execution_workspaces_company_branch_idx": {
"name": "execution_workspaces_company_branch_idx",
@@ -28069,76 +28069,76 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "restrict",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "restrict"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -28288,9 +28288,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"external_object_mentions_company_object_idx": {
"name": "external_object_mentions_company_object_idx",
@@ -28309,9 +28309,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"external_object_mentions_company_provider_idx": {
"name": "external_object_mentions_company_provider_idx",
@@ -28336,9 +28336,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"external_object_mentions_company_source_record_uq": {
"name": "external_object_mentions_company_source_record_uq",
@@ -28387,10 +28387,10 @@
}
],
"isUnique": true,
- "where": "\"external_object_mentions\".\"source_record_id\" is not null and \"external_object_mentions\".\"canonical_identity_hash\" is not null",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"external_object_mentions\".\"source_record_id\" is not null and \"external_object_mentions\".\"canonical_identity_hash\" is not null",
+ "concurrently": false
},
"external_object_mentions_company_source_null_record_uq": {
"name": "external_object_mentions_company_source_null_record_uq",
@@ -28433,64 +28433,64 @@
}
],
"isUnique": true,
- "where": "\"external_object_mentions\".\"source_record_id\" is null and \"external_object_mentions\".\"canonical_identity_hash\" is not null",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"external_object_mentions\".\"source_record_id\" is null and \"external_object_mentions\".\"canonical_identity_hash\" is not null",
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -28722,9 +28722,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"external_objects_company_provider_status_idx": {
"name": "external_objects_company_provider_status_idx",
@@ -28749,9 +28749,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"external_objects_company_refresh_idx": {
"name": "external_objects_company_refresh_idx",
@@ -28770,9 +28770,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"external_objects_company_external_id_uq": {
"name": "external_objects_company_external_id_uq",
@@ -28803,9 +28803,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"external_objects_company_identity_uq": {
"name": "external_objects_company_identity_uq",
@@ -28836,37 +28836,37 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -28936,15 +28936,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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -29166,9 +29166,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"fast_response_requests_history_idx": {
"name": "fast_response_requests_history_idx",
@@ -29187,9 +29187,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"fast_response_requests_work_idx": {
"name": "fast_response_requests_work_idx",
@@ -29202,38 +29202,38 @@
}
],
"isUnique": false,
- "where": "\"fast_response_requests\".\"status\" in ('pending', 'running')",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"fast_response_requests\".\"status\" in ('pending', 'running')",
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -29428,9 +29428,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"feedback_exports_company_created_idx": {
"name": "feedback_exports_company_created_idx",
@@ -29449,9 +29449,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"feedback_exports_company_status_idx": {
"name": "feedback_exports_company_status_idx",
@@ -29476,9 +29476,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"feedback_exports_company_issue_idx": {
"name": "feedback_exports_company_issue_idx",
@@ -29503,9 +29503,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"feedback_exports_company_project_idx": {
"name": "feedback_exports_company_project_idx",
@@ -29530,9 +29530,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"feedback_exports_company_author_idx": {
"name": "feedback_exports_company_author_idx",
@@ -29557,63 +29557,63 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -29733,9 +29733,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"feedback_votes_issue_target_idx": {
"name": "feedback_votes_issue_target_idx",
@@ -29760,9 +29760,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"feedback_votes_author_idx": {
"name": "feedback_votes_author_idx",
@@ -29781,9 +29781,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"feedback_votes_company_target_author_idx": {
"name": "feedback_votes_company_target_author_idx",
@@ -29814,37 +29814,37 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -30055,9 +30055,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"finance_events_company_occurred_idx": {
"name": "finance_events_company_occurred_idx",
@@ -30076,9 +30076,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"finance_events_company_biller_occurred_idx": {
"name": "finance_events_company_biller_occurred_idx",
@@ -30103,9 +30103,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"finance_events_company_kind_occurred_idx": {
"name": "finance_events_company_kind_occurred_idx",
@@ -30130,9 +30130,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"finance_events_company_direction_occurred_idx": {
"name": "finance_events_company_direction_occurred_idx",
@@ -30157,9 +30157,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"finance_events_company_heartbeat_run_idx": {
"name": "finance_events_company_heartbeat_run_idx",
@@ -30178,9 +30178,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"finance_events_company_cost_event_idx": {
"name": "finance_events_company_cost_event_idx",
@@ -30199,102 +30199,102 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -30408,9 +30408,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"folders_company_kind_root_slug_uq": {
"name": "folders_company_kind_root_slug_uq",
@@ -30435,10 +30435,10 @@
}
],
"isUnique": true,
- "where": "\"folders\".\"parent_id\" is null",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"folders\".\"parent_id\" is null",
+ "concurrently": false
},
"folders_company_kind_parent_slug_uq": {
"name": "folders_company_kind_parent_slug_uq",
@@ -30469,10 +30469,10 @@
}
],
"isUnique": true,
- "where": "\"folders\".\"parent_id\" is not null",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"folders\".\"parent_id\" is not null",
+ "concurrently": false
},
"folders_company_kind_system_key_uq": {
"name": "folders_company_kind_system_key_uq",
@@ -30497,10 +30497,10 @@
}
],
"isUnique": true,
- "where": "\"folders\".\"system_key\" is not null",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"folders\".\"system_key\" is not null",
+ "concurrently": false
},
"folders_company_kind_parent_position_idx": {
"name": "folders_company_kind_parent_position_idx",
@@ -30537,37 +30537,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"folders_parent_id_folders_id_fk": {
"name": "folders_parent_id_folders_id_fk",
"tableFrom": "folders",
- "tableTo": "folders",
"columnsFrom": [
"parent_id"
],
+ "tableTo": "folders",
"columnsTo": [
"id"
],
- "onDelete": "restrict",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "restrict"
}
},
"compositePrimaryKeys": {},
@@ -30658,50 +30658,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -30863,9 +30863,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"grok_dispatch_company_status_idx": {
"name": "grok_dispatch_company_status_idx",
@@ -30884,9 +30884,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"grok_dispatch_assignment_kind_idx": {
"name": "grok_dispatch_assignment_kind_idx",
@@ -30905,76 +30905,76 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -31100,9 +31100,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"grok_routines_company_agent_idx": {
"name": "grok_routines_company_agent_idx",
@@ -31121,76 +31121,76 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -31325,9 +31325,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"heartbeat_run_events_run_source_event_uq": {
"name": "heartbeat_run_events_run_source_event_uq",
@@ -31346,10 +31346,10 @@
}
],
"isUnique": true,
- "where": "\"heartbeat_run_events\".\"source_event_id\" is not null",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"heartbeat_run_events\".\"source_event_id\" is not null",
+ "concurrently": false
},
"heartbeat_run_events_run_source_seq_uq": {
"name": "heartbeat_run_events_run_source_seq_uq",
@@ -31374,10 +31374,10 @@
}
],
"isUnique": true,
- "where": "\"heartbeat_run_events\".\"source_instance_id\" is not null and \"heartbeat_run_events\".\"source_seq\" is not null",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"heartbeat_run_events\".\"source_instance_id\" is not null and \"heartbeat_run_events\".\"source_seq\" is not null",
+ "concurrently": false
},
"heartbeat_run_events_company_run_idx": {
"name": "heartbeat_run_events_company_run_idx",
@@ -31396,9 +31396,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"heartbeat_run_events_company_created_idx": {
"name": "heartbeat_run_events_company_created_idx",
@@ -31417,50 +31417,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -31566,9 +31566,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"heartbeat_run_watchdog_decisions_company_run_snooze_idx": {
"name": "heartbeat_run_watchdog_decisions_company_run_snooze_idx",
@@ -31593,76 +31593,76 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -32178,10 +32178,10 @@
}
],
"isUnique": false,
- "where": "\"heartbeat_runs\".\"cost_accounting_pending\" = true",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"heartbeat_runs\".\"cost_accounting_pending\" = true",
+ "concurrently": false
},
"heartbeat_runs_cost_data_quality_idx": {
"name": "heartbeat_runs_cost_data_quality_idx",
@@ -32194,8 +32194,8 @@
},
{
"expression": "coalesce(\"finished_at\", \"created_at\") desc",
- "asc": true,
"isExpression": true,
+ "asc": true,
"nulls": "last"
},
{
@@ -32206,10 +32206,10 @@
}
],
"isUnique": false,
- "where": "\"heartbeat_runs\".\"cost_accounting_pending\" = true and \"heartbeat_runs\".\"status\" in ('succeeded','failed','timed_out','cancelled','interrupted')",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"heartbeat_runs\".\"cost_accounting_pending\" = true and \"heartbeat_runs\".\"status\" in ('succeeded','failed','timed_out','cancelled','interrupted')",
+ "concurrently": false
},
"heartbeat_runs_execution_status_delivery_idx": {
"name": "heartbeat_runs_execution_status_delivery_idx",
@@ -32222,10 +32222,10 @@
}
],
"isUnique": false,
- "where": "\"heartbeat_runs\".\"execution_status_delivery_id\" is not null",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"heartbeat_runs\".\"execution_status_delivery_id\" is not null",
+ "concurrently": false
},
"heartbeat_runs_execution_control_deadline_idx": {
"name": "heartbeat_runs_execution_control_deadline_idx",
@@ -32238,10 +32238,10 @@
}
],
"isUnique": false,
- "where": "\"heartbeat_runs\".\"execution_control_deadline_at\" is not null",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"heartbeat_runs\".\"execution_control_deadline_at\" is not null",
+ "concurrently": false
},
"heartbeat_runs_native_replacement_predecessor_uq": {
"name": "heartbeat_runs_native_replacement_predecessor_uq",
@@ -32260,10 +32260,10 @@
}
],
"isUnique": true,
- "where": "\"heartbeat_runs\".\"scheduled_retry_reason\" = 'native_safe_replacement'",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"heartbeat_runs\".\"scheduled_retry_reason\" = 'native_safe_replacement'",
+ "concurrently": false
},
"heartbeat_runs_company_agent_started_idx": {
"name": "heartbeat_runs_company_agent_started_idx",
@@ -32288,9 +32288,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"heartbeat_runs_company_issue_created_idx": {
"name": "heartbeat_runs_company_issue_created_idx",
@@ -32315,9 +32315,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"heartbeat_runs_company_responsible_user_idx": {
"name": "heartbeat_runs_company_responsible_user_idx",
@@ -32342,9 +32342,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"heartbeat_runs_company_liveness_idx": {
"name": "heartbeat_runs_company_liveness_idx",
@@ -32369,9 +32369,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"heartbeat_runs_company_status_last_output_idx": {
"name": "heartbeat_runs_company_status_last_output_idx",
@@ -32396,9 +32396,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"heartbeat_runs_company_status_process_started_idx": {
"name": "heartbeat_runs_company_status_process_started_idx",
@@ -32423,9 +32423,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"heartbeat_runs_company_created_at_desc_idx": {
"name": "heartbeat_runs_company_created_at_desc_idx",
@@ -32444,9 +32444,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"heartbeat_runs_company_ctx_issue_created_idx": {
"name": "heartbeat_runs_company_ctx_issue_created_idx",
@@ -32459,8 +32459,8 @@
},
{
"expression": "(\"context_snapshot\" ->> 'issueId')",
- "asc": true,
"isExpression": true,
+ "asc": true,
"nulls": "last"
},
{
@@ -32471,9 +32471,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"heartbeat_runs_company_ctx_task_created_idx": {
"name": "heartbeat_runs_company_ctx_task_created_idx",
@@ -32486,8 +32486,8 @@
},
{
"expression": "(\"context_snapshot\" ->> 'taskId')",
- "asc": true,
"isExpression": true,
+ "asc": true,
"nulls": "last"
},
{
@@ -32498,9 +32498,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"heartbeat_runs_company_ctx_taskkey_created_idx": {
"name": "heartbeat_runs_company_ctx_taskkey_created_idx",
@@ -32513,8 +32513,8 @@
},
{
"expression": "(\"context_snapshot\" ->> 'taskKey')",
- "asc": true,
"isExpression": true,
+ "asc": true,
"nulls": "last"
},
{
@@ -32525,9 +32525,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"heartbeat_runs_company_ctx_paperclip_issue_created_idx": {
"name": "heartbeat_runs_company_ctx_paperclip_issue_created_idx",
@@ -32540,8 +32540,8 @@
},
{
"expression": "(\"context_snapshot\" -> 'paperclipIssue' ->> 'id')",
- "asc": true,
"isExpression": true,
+ "asc": true,
"nulls": "last"
},
{
@@ -32552,9 +32552,9 @@
}
],
"isUnique": false,
- "concurrently": true,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": true
},
"heartbeat_runs_company_origin_issue_idx": {
"name": "heartbeat_runs_company_origin_issue_idx",
@@ -32567,104 +32567,104 @@
},
{
"expression": "coalesce(\n \"native_issue_id\"::text,\n nullif(\"context_snapshot\"->>'issueId', ''),\n nullif(\"context_snapshot\"->>'taskId', ''),\n nullif(\"context_snapshot\"->>'taskKey', '')\n )",
- "asc": true,
"isExpression": true,
+ "asc": true,
"nulls": "last"
}
],
"isUnique": false,
- "concurrently": true,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": true
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"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": {},
@@ -32758,9 +32758,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"inbox_dismissals_company_item_idx": {
"name": "inbox_dismissals_company_item_idx",
@@ -32779,9 +32779,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"inbox_dismissals_company_user_item_idx": {
"name": "inbox_dismissals_company_user_item_idx",
@@ -32806,24 +32806,24 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -32893,9 +32893,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"connection_grant_delegations_grant_agent_uq": {
"name": "connection_grant_delegations_grant_agent_uq",
@@ -32914,52 +32914,52 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -33035,9 +33035,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"connection_grant_members_grant_subject_uq": {
"name": "connection_grant_members_grant_subject_uq",
@@ -33062,39 +33062,39 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -33251,9 +33251,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"connection_grants_subject_user_idx": {
"name": "connection_grants_subject_user_idx",
@@ -33272,9 +33272,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"connection_grants_subject_agent_idx": {
"name": "connection_grants_subject_agent_idx",
@@ -33293,9 +33293,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"connection_grants_user_uq": {
"name": "connection_grants_user_uq",
@@ -33314,9 +33314,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"connection_grants_agent_uq": {
"name": "connection_grants_agent_uq",
@@ -33335,9 +33335,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"connection_grants_default_uq": {
"name": "connection_grants_default_uq",
@@ -33350,90 +33350,90 @@
}
],
"isUnique": true,
- "where": "\"connection_grants\".\"is_default\" = true and \"connection_grants\".\"kind\" = 'organization'",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"connection_grants\".\"is_default\" = true and \"connection_grants\".\"kind\" = 'organization'",
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"connection_grants_company_id_uq": {
"name": "connection_grants_company_id_uq",
- "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ]
+ ],
+ "nullsNotDistinct": false
}
},
"policies": {},
@@ -33603,9 +33603,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"connection_token_issuances_connection_created_idx": {
"name": "connection_token_issuances_connection_created_idx",
@@ -33630,9 +33630,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"connection_token_issuances_agent_connection_idx": {
"name": "connection_token_issuances_agent_connection_idx",
@@ -33663,9 +33663,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"connection_token_issuances_run_idx": {
"name": "connection_token_issuances_run_idx",
@@ -33684,102 +33684,102 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -33853,24 +33853,24 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -33936,9 +33936,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"instance_user_roles_role_idx": {
"name": "instance_user_roles_role_idx",
@@ -33951,9 +33951,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"foreignKeys": {},
@@ -34057,9 +34057,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"invites_company_invite_state_idx": {
"name": "invites_company_invite_state_idx",
@@ -34090,24 +34090,24 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -34207,9 +34207,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_access_grants_issue_idx": {
"name": "issue_access_grants_issue_idx",
@@ -34228,37 +34228,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -34330,9 +34330,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_approvals_approval_idx": {
"name": "issue_approvals_approval_idx",
@@ -34345,9 +34345,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_approvals_company_idx": {
"name": "issue_approvals_company_idx",
@@ -34360,63 +34360,63 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {
@@ -34507,9 +34507,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_attachments_issue_comment_idx": {
"name": "issue_attachments_issue_comment_idx",
@@ -34522,9 +34522,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_attachments_originating_run_idx": {
"name": "issue_attachments_originating_run_idx",
@@ -34537,9 +34537,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_attachments_asset_uq": {
"name": "issue_attachments_asset_uq",
@@ -34552,76 +34552,76 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -34807,9 +34807,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_comments_company_idx": {
"name": "issue_comments_company_idx",
@@ -34822,9 +34822,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_comments_company_issue_created_at_idx": {
"name": "issue_comments_company_issue_created_at_idx",
@@ -34849,9 +34849,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_comments_company_author_issue_created_at_idx": {
"name": "issue_comments_company_author_issue_created_at_idx",
@@ -34882,9 +34882,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_comments_body_search_idx": {
"name": "issue_comments_body_search_idx",
@@ -34898,148 +34898,148 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "gin",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"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": {},
@@ -35101,9 +35101,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_create_idempotency_keys_issue_idx": {
"name": "issue_create_idempotency_keys_issue_idx",
@@ -35116,9 +35116,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_create_idempotency_keys_company_created_at_idx": {
"name": "issue_create_idempotency_keys_company_created_at_idx",
@@ -35137,37 +35137,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -35250,9 +35250,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_documents_document_uq": {
"name": "issue_documents_document_uq",
@@ -35265,9 +35265,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_documents_company_issue_updated_idx": {
"name": "issue_documents_company_issue_updated_idx",
@@ -35292,50 +35292,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -35442,9 +35442,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_execution_decisions_stage_idx": {
"name": "issue_execution_decisions_stage_idx",
@@ -35469,63 +35469,63 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -35622,9 +35622,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_inbox_archives_company_user_idx": {
"name": "issue_inbox_archives_company_user_idx",
@@ -35643,9 +35643,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_inbox_archives_company_issue_user_idx": {
"name": "issue_inbox_archives_company_issue_user_idx",
@@ -35670,63 +35670,63 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -35782,9 +35782,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_labels_label_idx": {
"name": "issue_labels_label_idx",
@@ -35797,9 +35797,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_labels_company_idx": {
"name": "issue_labels_company_idx",
@@ -35812,50 +35812,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {
@@ -36004,9 +36004,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_plan_decompositions_active_owner_idx": {
"name": "issue_plan_decompositions_active_owner_idx",
@@ -36025,10 +36025,10 @@
}
],
"isUnique": false,
- "where": "\"issue_plan_decompositions\".\"status\" = 'in_flight'",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"issue_plan_decompositions\".\"status\" = 'in_flight'",
+ "concurrently": false
},
"issue_plan_decompositions_source_revision_uq": {
"name": "issue_plan_decompositions_source_revision_uq",
@@ -36053,89 +36053,89 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -36275,9 +36275,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_question_response_deliveries_correlation_uq": {
"name": "issue_question_response_deliveries_correlation_uq",
@@ -36290,9 +36290,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_question_response_deliveries_pending_idx": {
"name": "issue_question_response_deliveries_pending_idx",
@@ -36311,9 +36311,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_question_response_deliveries_company_issue_idx": {
"name": "issue_question_response_deliveries_company_issue_idx",
@@ -36338,76 +36338,76 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -36494,9 +36494,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_read_states_company_user_idx": {
"name": "issue_read_states_company_user_idx",
@@ -36515,9 +36515,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_read_states_company_issue_user_idx": {
"name": "issue_read_states_company_issue_user_idx",
@@ -36542,37 +36542,37 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -36773,9 +36773,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_recovery_actions_company_owner_status_idx": {
"name": "issue_recovery_actions_company_owner_status_idx",
@@ -36800,9 +36800,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_recovery_actions_company_recovery_issue_idx": {
"name": "issue_recovery_actions_company_recovery_issue_idx",
@@ -36821,9 +36821,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_recovery_actions_active_source_uq": {
"name": "issue_recovery_actions_active_source_uq",
@@ -36842,10 +36842,10 @@
}
],
"isUnique": true,
- "where": "\"issue_recovery_actions\".\"status\" in ('active', 'escalated')",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"issue_recovery_actions\".\"status\" in ('active', 'escalated')",
+ "concurrently": false
},
"issue_recovery_actions_active_fingerprint_uq": {
"name": "issue_recovery_actions_active_fingerprint_uq",
@@ -36876,90 +36876,90 @@
}
],
"isUnique": true,
- "where": "\"issue_recovery_actions\".\"status\" in ('active', 'escalated')",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"issue_recovery_actions\".\"status\" in ('active', 'escalated')",
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -37054,9 +37054,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_reference_mentions_company_target_issue_idx": {
"name": "issue_reference_mentions_company_target_issue_idx",
@@ -37075,9 +37075,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_reference_mentions_company_issue_pair_idx": {
"name": "issue_reference_mentions_company_issue_pair_idx",
@@ -37102,9 +37102,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_reference_mentions_company_source_mention_record_uq": {
"name": "issue_reference_mentions_company_source_mention_record_uq",
@@ -37141,10 +37141,10 @@
}
],
"isUnique": true,
- "where": "\"issue_reference_mentions\".\"source_record_id\" is not null",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"issue_reference_mentions\".\"source_record_id\" is not null",
+ "concurrently": false
},
"issue_reference_mentions_company_source_mention_null_record_uq": {
"name": "issue_reference_mentions_company_source_mention_null_record_uq",
@@ -37175,51 +37175,51 @@
}
],
"isUnique": true,
- "where": "\"issue_reference_mentions\".\"source_record_id\" is null",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"issue_reference_mentions\".\"source_record_id\" is null",
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -37308,9 +37308,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_relations_company_related_issue_idx": {
"name": "issue_relations_company_related_issue_idx",
@@ -37329,9 +37329,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_relations_company_type_idx": {
"name": "issue_relations_company_type_idx",
@@ -37350,9 +37350,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_relations_company_edge_uq": {
"name": "issue_relations_company_edge_uq",
@@ -37383,63 +37383,63 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -37649,9 +37649,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_thread_interactions_company_issue_created_at_idx": {
"name": "issue_thread_interactions_company_issue_created_at_idx",
@@ -37676,9 +37676,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_thread_interactions_company_issue_status_idx": {
"name": "issue_thread_interactions_company_issue_status_idx",
@@ -37703,9 +37703,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_thread_interactions_company_issue_idempotency_uq": {
"name": "issue_thread_interactions_company_issue_idempotency_uq",
@@ -37730,10 +37730,10 @@
}
],
"isUnique": true,
- "where": "\"issue_thread_interactions\".\"idempotency_key\" IS NOT NULL",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"issue_thread_interactions\".\"idempotency_key\" IS NOT NULL",
+ "concurrently": false
},
"issue_thread_interactions_source_comment_idx": {
"name": "issue_thread_interactions_source_comment_idx",
@@ -37746,9 +37746,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_thread_interactions_addressee_agent_idx": {
"name": "issue_thread_interactions_addressee_agent_idx",
@@ -37761,9 +37761,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_thread_interactions_addressee_user_idx": {
"name": "issue_thread_interactions_addressee_user_idx",
@@ -37776,115 +37776,115 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -38016,9 +38016,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_tree_hold_members_company_issue_idx": {
"name": "issue_tree_hold_members_company_issue_idx",
@@ -38037,9 +38037,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_tree_hold_members_hold_depth_idx": {
"name": "issue_tree_hold_members_hold_depth_idx",
@@ -38058,89 +38058,89 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -38303,9 +38303,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_tree_holds_company_status_mode_idx": {
"name": "issue_tree_holds_company_status_mode_idx",
@@ -38330,89 +38330,89 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -38581,9 +38581,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_watchdogs_company_status_idx": {
"name": "issue_watchdogs_company_status_idx",
@@ -38602,9 +38602,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_watchdogs_company_agent_idx": {
"name": "issue_watchdogs_company_agent_idx",
@@ -38623,9 +38623,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_watchdogs_company_watchdog_issue_uq": {
"name": "issue_watchdogs_company_watchdog_issue_uq",
@@ -38644,116 +38644,116 @@
}
],
"isUnique": true,
- "where": "\"issue_watchdogs\".\"watchdog_issue_id\" is not null",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"issue_watchdogs\".\"watchdog_issue_id\" is not null",
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -38923,9 +38923,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_work_products_company_execution_workspace_type_idx": {
"name": "issue_work_products_company_execution_workspace_type_idx",
@@ -38950,9 +38950,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_work_products_company_provider_external_id_idx": {
"name": "issue_work_products_company_provider_external_id_idx",
@@ -38977,9 +38977,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issue_work_products_company_updated_idx": {
"name": "issue_work_products_company_updated_idx",
@@ -38998,89 +38998,89 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -39541,9 +39541,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issues_company_status_idx": {
"name": "issues_company_status_idx",
@@ -39562,9 +39562,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issues_company_harness_kind_idx": {
"name": "issues_company_harness_kind_idx",
@@ -39583,9 +39583,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issues_company_assignee_status_idx": {
"name": "issues_company_assignee_status_idx",
@@ -39610,9 +39610,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issues_company_assignee_user_status_idx": {
"name": "issues_company_assignee_user_status_idx",
@@ -39637,9 +39637,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issues_company_responsible_user_idx": {
"name": "issues_company_responsible_user_idx",
@@ -39658,9 +39658,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issues_company_parent_idx": {
"name": "issues_company_parent_idx",
@@ -39679,9 +39679,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issues_company_privacy_parent_idx": {
"name": "issues_company_privacy_parent_idx",
@@ -39700,9 +39700,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issues_company_privacy_root_idx": {
"name": "issues_company_privacy_root_idx",
@@ -39721,9 +39721,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issues_company_project_idx": {
"name": "issues_company_project_idx",
@@ -39742,9 +39742,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issues_company_origin_idx": {
"name": "issues_company_origin_idx",
@@ -39769,9 +39769,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issues_company_project_workspace_idx": {
"name": "issues_company_project_workspace_idx",
@@ -39790,9 +39790,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issues_company_execution_workspace_idx": {
"name": "issues_company_execution_workspace_idx",
@@ -39811,9 +39811,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issues_company_monitor_due_idx": {
"name": "issues_company_monitor_due_idx",
@@ -39832,9 +39832,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issues_company_updated_idx": {
"name": "issues_company_updated_idx",
@@ -39853,9 +39853,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issues_company_created_idx": {
"name": "issues_company_created_idx",
@@ -39874,9 +39874,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issues_open_normalized_title_created_idx": {
"name": "issues_open_normalized_title_created_idx",
@@ -39895,8 +39895,8 @@
},
{
"expression": "lower(regexp_replace(btrim(\"title\"), '\\s+', ' ', 'g'))",
- "asc": true,
"isExpression": true,
+ "asc": true,
"nulls": "last"
},
{
@@ -39907,10 +39907,10 @@
}
],
"isUnique": false,
- "where": "\"issues\".\"hidden_at\" is null and \"issues\".\"status\" not in ('done', 'cancelled')",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"issues\".\"hidden_at\" is null and \"issues\".\"status\" not in ('done', 'cancelled')",
+ "concurrently": false
},
"issues_company_priority_idx": {
"name": "issues_company_priority_idx",
@@ -39929,9 +39929,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issues_identifier_idx": {
"name": "issues_identifier_idx",
@@ -39944,9 +39944,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"issues_title_search_idx": {
"name": "issues_title_search_idx",
@@ -39960,9 +39960,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "gin",
- "with": {}
+ "concurrently": false
},
"issues_identifier_search_idx": {
"name": "issues_identifier_search_idx",
@@ -39976,9 +39976,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "gin",
- "with": {}
+ "concurrently": false
},
"issues_description_search_idx": {
"name": "issues_description_search_idx",
@@ -39992,9 +39992,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "gin",
- "with": {}
+ "concurrently": false
},
"issues_open_routine_execution_uq": {
"name": "issues_open_routine_execution_uq",
@@ -40025,10 +40025,10 @@
}
],
"isUnique": true,
- "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,
+ "with": {},
"method": "btree",
- "with": {}
+ "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
},
"issues_active_liveness_recovery_incident_uq": {
"name": "issues_active_liveness_recovery_incident_uq",
@@ -40053,10 +40053,10 @@
}
],
"isUnique": true,
- "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,
+ "with": {},
"method": "btree",
- "with": {}
+ "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
},
"issues_active_liveness_recovery_leaf_uq": {
"name": "issues_active_liveness_recovery_leaf_uq",
@@ -40081,10 +40081,10 @@
}
],
"isUnique": true,
- "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,
+ "with": {},
"method": "btree",
- "with": {}
+ "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
},
"issues_active_stale_run_evaluation_uq": {
"name": "issues_active_stale_run_evaluation_uq",
@@ -40109,10 +40109,10 @@
}
],
"isUnique": true,
- "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,
+ "with": {},
"method": "btree",
- "with": {}
+ "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
},
"issues_active_task_watchdog_uq": {
"name": "issues_active_task_watchdog_uq",
@@ -40137,10 +40137,10 @@
}
],
"isUnique": true,
- "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,
+ "with": {},
"method": "btree",
- "with": {}
+ "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
},
"issues_active_productivity_review_uq": {
"name": "issues_active_productivity_review_uq",
@@ -40165,10 +40165,10 @@
}
],
"isUnique": true,
- "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,
+ "with": {},
"method": "btree",
- "with": {}
+ "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
},
"issues_active_stranded_issue_recovery_uq": {
"name": "issues_active_stranded_issue_recovery_uq",
@@ -40193,10 +40193,10 @@
}
],
"isUnique": true,
- "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,
+ "with": {},
"method": "btree",
- "with": {}
+ "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
},
"issues_onboarding_first_task_uq": {
"name": "issues_onboarding_first_task_uq",
@@ -40209,192 +40209,192 @@
}
],
"isUnique": true,
- "where": "\"issues\".\"origin_kind\" = 'onboarding_first_task'",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"issues\".\"origin_kind\" = 'onboarding_first_task'",
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"issues_goal_id_goals_id_fk": {
"name": "issues_goal_id_goals_id_fk",
"tableFrom": "issues",
- "tableTo": "goals",
"columnsFrom": [
"goal_id"
],
+ "tableTo": "goals",
"columnsTo": [
"id"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"issues_company_id_uq": {
"name": "issues_company_id_uq",
- "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ]
+ ],
+ "nullsNotDistinct": false
}
},
"policies": {},
@@ -40563,9 +40563,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"join_requests_company_status_type_created_idx": {
"name": "join_requests_company_status_type_created_idx",
@@ -40596,9 +40596,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"join_requests_pending_human_user_uq": {
"name": "join_requests_pending_human_user_uq",
@@ -40617,10 +40617,10 @@
}
],
"isUnique": true,
- "where": "\"join_requests\".\"request_type\" = 'human' AND \"join_requests\".\"status\" = 'pending_approval' AND \"join_requests\".\"requesting_user_id\" IS NOT NULL",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"join_requests\".\"request_type\" = 'human' AND \"join_requests\".\"status\" = 'pending_approval' AND \"join_requests\".\"requesting_user_id\" IS NOT NULL",
+ "concurrently": false
},
"join_requests_pending_human_email_uq": {
"name": "join_requests_pending_human_email_uq",
@@ -40633,57 +40633,57 @@
},
{
"expression": "lower(\"request_email_snapshot\")",
- "asc": true,
"isExpression": true,
+ "asc": true,
"nulls": "last"
}
],
"isUnique": true,
- "where": "\"join_requests\".\"request_type\" = 'human' AND \"join_requests\".\"status\" = 'pending_approval' AND \"join_requests\".\"request_email_snapshot\" IS NOT NULL",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"join_requests\".\"request_type\" = 'human' AND \"join_requests\".\"status\" = 'pending_approval' AND \"join_requests\".\"request_email_snapshot\" IS NOT NULL",
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -40748,9 +40748,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"labels_company_name_idx": {
"name": "labels_company_name_idx",
@@ -40769,24 +40769,24 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -40936,9 +40936,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"managed_agent_profiles_company_key_uq": {
"name": "managed_agent_profiles_company_key_uq",
@@ -40957,9 +40957,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"managed_agent_profiles_company_resource_uq": {
"name": "managed_agent_profiles_company_resource_uq",
@@ -40990,37 +40990,37 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "restrict",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "restrict"
}
},
"compositePrimaryKeys": {},
@@ -41206,100 +41206,99 @@
}
],
"isUnique": false,
- "where": "\"native_run_finalizations\".\"control_deadline_at\" is not null",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"native_run_finalizations\".\"control_deadline_at\" is not null",
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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",
@@ -41307,6 +41306,7 @@
"assessment_id",
"decision_id"
],
+ "tableTo": "status_decisions",
"columnsTo": [
"company_id",
"issue_id",
@@ -41314,8 +41314,8 @@
"assessment_id",
"id"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -41442,9 +41442,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"native_run_results_run_caller_result_uq": {
"name": "native_run_results_run_caller_result_uq",
@@ -41463,9 +41463,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"native_run_results_run_caller_dedupe_uq": {
"name": "native_run_results_run_caller_dedupe_uq",
@@ -41484,88 +41484,88 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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": {},
@@ -41683,9 +41683,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"pipeline_automation_executions_company_case_idx": {
"name": "pipeline_automation_executions_company_case_idx",
@@ -41704,9 +41704,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"pipeline_automation_executions_routine_idx": {
"name": "pipeline_automation_executions_routine_idx",
@@ -41719,9 +41719,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"pipeline_automation_executions_execution_issue_idx": {
"name": "pipeline_automation_executions_execution_issue_idx",
@@ -41734,9 +41734,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"pipeline_automation_executions_retry_of_execution_idx": {
"name": "pipeline_automation_executions_retry_of_execution_idx",
@@ -41749,63 +41749,63 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -41881,9 +41881,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"pipeline_case_blockers_blocked_by_idx": {
"name": "pipeline_case_blockers_blocked_by_idx",
@@ -41896,9 +41896,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"pipeline_case_blockers_company_case_idx": {
"name": "pipeline_case_blockers_company_case_idx",
@@ -41917,50 +41917,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -42048,9 +42048,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"pipeline_case_documents_document_uq": {
"name": "pipeline_case_documents_document_uq",
@@ -42063,9 +42063,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"pipeline_case_documents_company_case_updated_idx": {
"name": "pipeline_case_documents_company_case_updated_idx",
@@ -42090,50 +42090,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -42247,9 +42247,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"pipeline_case_events_company_case_idx": {
"name": "pipeline_case_events_company_case_idx",
@@ -42268,76 +42268,76 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -42457,9 +42457,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"pipeline_case_issue_links_issue_idx": {
"name": "pipeline_case_issue_links_issue_idx",
@@ -42472,9 +42472,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"pipeline_case_issue_links_company_case_idx": {
"name": "pipeline_case_issue_links_company_case_idx",
@@ -42493,9 +42493,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"pipeline_case_issue_links_automation_attempt_idx": {
"name": "pipeline_case_issue_links_automation_attempt_idx",
@@ -42508,50 +42508,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -42793,9 +42793,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"pipeline_cases_parent_request_key_uq": {
"name": "pipeline_cases_parent_request_key_uq",
@@ -42814,10 +42814,10 @@
}
],
"isUnique": true,
- "where": "\"pipeline_cases\".\"request_key\" is not null and \"pipeline_cases\".\"retired_at\" is null",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"pipeline_cases\".\"request_key\" is not null and \"pipeline_cases\".\"retired_at\" is null",
+ "concurrently": false
},
"pipeline_cases_company_idx": {
"name": "pipeline_cases_company_idx",
@@ -42830,9 +42830,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"pipeline_cases_pipeline_stage_idx": {
"name": "pipeline_cases_pipeline_stage_idx",
@@ -42851,9 +42851,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"pipeline_cases_parent_idx": {
"name": "pipeline_cases_parent_idx",
@@ -42866,9 +42866,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"pipeline_cases_automation_attempt_idx": {
"name": "pipeline_cases_automation_attempt_idx",
@@ -42881,9 +42881,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"pipeline_cases_retired_idx": {
"name": "pipeline_cases_retired_idx",
@@ -42902,9 +42902,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"pipeline_cases_lease_expires_idx": {
"name": "pipeline_cases_lease_expires_idx",
@@ -42917,90 +42917,90 @@
}
],
"isUnique": false,
- "where": "\"pipeline_cases\".\"lease_expires_at\" is not null",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"pipeline_cases\".\"lease_expires_at\" is not null",
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -43092,9 +43092,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"pipeline_documents_document_uq": {
"name": "pipeline_documents_document_uq",
@@ -43107,9 +43107,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"pipeline_documents_company_pipeline_updated_idx": {
"name": "pipeline_documents_company_pipeline_updated_idx",
@@ -43134,50 +43134,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -43267,9 +43267,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"pipeline_stages_pipeline_position_idx": {
"name": "pipeline_stages_pipeline_position_idx",
@@ -43288,24 +43288,24 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -43393,9 +43393,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"pipeline_transitions_pipeline_from_idx": {
"name": "pipeline_transitions_pipeline_from_idx",
@@ -43414,9 +43414,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"pipeline_transitions_pipeline_to_idx": {
"name": "pipeline_transitions_pipeline_to_idx",
@@ -43435,50 +43435,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -43586,9 +43586,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"pipelines_company_idx": {
"name": "pipelines_company_idx",
@@ -43601,9 +43601,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"pipelines_company_project_idx": {
"name": "pipelines_company_project_idx",
@@ -43622,50 +43622,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"pipelines_project_id_projects_id_fk": {
"name": "pipelines_project_id_projects_id_fk",
"tableFrom": "pipelines",
- "tableTo": "projects",
"columnsFrom": [
"project_id"
],
+ "tableTo": "projects",
"columnsTo": [
"id"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -43744,9 +43744,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"plugin_company_settings_plugin_idx": {
"name": "plugin_company_settings_plugin_idx",
@@ -43759,9 +43759,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"plugin_company_settings_company_plugin_uq": {
"name": "plugin_company_settings_company_plugin_uq",
@@ -43780,37 +43780,37 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -43888,37 +43888,37 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -43997,9 +43997,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"plugin_database_namespaces_namespace_idx": {
"name": "plugin_database_namespaces_namespace_idx",
@@ -44012,9 +44012,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"plugin_database_namespaces_status_idx": {
"name": "plugin_database_namespaces_status_idx",
@@ -44027,24 +44027,24 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -44146,9 +44146,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"plugin_entities_company_idx": {
"name": "plugin_entities_company_idx",
@@ -44161,9 +44161,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"plugin_entities_type_idx": {
"name": "plugin_entities_type_idx",
@@ -44176,9 +44176,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"plugin_entities_scope_idx": {
"name": "plugin_entities_scope_idx",
@@ -44197,50 +44197,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"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": {},
@@ -44340,9 +44340,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"plugin_job_runs_plugin_idx": {
"name": "plugin_job_runs_plugin_idx",
@@ -44355,9 +44355,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"plugin_job_runs_company_idx": {
"name": "plugin_job_runs_company_idx",
@@ -44370,9 +44370,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"plugin_job_runs_status_idx": {
"name": "plugin_job_runs_status_idx",
@@ -44385,50 +44385,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -44512,9 +44512,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"plugin_jobs_next_run_idx": {
"name": "plugin_jobs_next_run_idx",
@@ -44527,9 +44527,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"plugin_jobs_unique_idx": {
"name": "plugin_jobs_unique_idx",
@@ -44548,24 +44548,24 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -44610,37 +44610,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {
@@ -44725,9 +44725,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"plugin_logs_company_idx": {
"name": "plugin_logs_company_idx",
@@ -44740,9 +44740,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"plugin_logs_level_idx": {
"name": "plugin_logs_level_idx",
@@ -44755,37 +44755,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -44875,9 +44875,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"plugin_managed_resources_plugin_idx": {
"name": "plugin_managed_resources_plugin_idx",
@@ -44890,9 +44890,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"plugin_managed_resources_resource_idx": {
"name": "plugin_managed_resources_resource_idx",
@@ -44911,9 +44911,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"plugin_managed_resources_company_plugin_resource_uq": {
"name": "plugin_managed_resources_company_plugin_resource_uq",
@@ -44944,37 +44944,37 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -45074,9 +45074,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"plugin_migrations_plugin_idx": {
"name": "plugin_migrations_plugin_idx",
@@ -45089,9 +45089,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"plugin_migrations_status_idx": {
"name": "plugin_migrations_status_idx",
@@ -45104,24 +45104,24 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -45204,38 +45204,38 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"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": {},
@@ -45341,9 +45341,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"plugin_webhook_deliveries_company_idx": {
"name": "plugin_webhook_deliveries_company_idx",
@@ -45356,9 +45356,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"plugin_webhook_deliveries_status_idx": {
"name": "plugin_webhook_deliveries_status_idx",
@@ -45371,9 +45371,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"plugin_webhook_deliveries_key_idx": {
"name": "plugin_webhook_deliveries_key_idx",
@@ -45386,37 +45386,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -45526,9 +45526,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"plugins_status_idx": {
"name": "plugins_status_idx",
@@ -45541,9 +45541,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"foreignKeys": {},
@@ -45645,9 +45645,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"principal_permission_grants_company_permission_idx": {
"name": "principal_permission_grants_company_permission_idx",
@@ -45666,24 +45666,24 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -45759,9 +45759,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"project_access_members_subject_lookup_idx": {
"name": "project_access_members_subject_lookup_idx",
@@ -45792,37 +45792,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -45885,9 +45885,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"project_goals_goal_idx": {
"name": "project_goals_goal_idx",
@@ -45900,9 +45900,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"project_goals_company_idx": {
"name": "project_goals_company_idx",
@@ -45915,50 +45915,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {
@@ -46050,9 +46050,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"project_memberships_company_user_starred_idx": {
"name": "project_memberships_company_user_starred_idx",
@@ -46077,9 +46077,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"project_memberships_project_idx": {
"name": "project_memberships_project_idx",
@@ -46092,9 +46092,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"project_memberships_company_user_project_uq": {
"name": "project_memberships_company_user_project_uq",
@@ -46119,37 +46119,37 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -46301,9 +46301,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"project_workspaces_project_primary_idx": {
"name": "project_workspaces_project_primary_idx",
@@ -46322,9 +46322,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"project_workspaces_project_source_type_idx": {
"name": "project_workspaces_project_source_type_idx",
@@ -46343,9 +46343,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"project_workspaces_company_shared_key_idx": {
"name": "project_workspaces_company_shared_key_idx",
@@ -46364,9 +46364,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"project_workspaces_project_remote_ref_idx": {
"name": "project_workspaces_project_remote_ref_idx",
@@ -46391,37 +46391,37 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -46572,9 +46572,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"projects_company_personal_owner_uq": {
"name": "projects_company_personal_owner_uq",
@@ -46593,51 +46593,51 @@
}
],
"isUnique": true,
- "where": "\"projects\".\"personal_owner_user_id\" is not null",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"projects\".\"personal_owner_user_id\" is not null",
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -46764,9 +46764,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"provider_trace_records_expiry_idx": {
"name": "provider_trace_records_expiry_idx",
@@ -46785,9 +46785,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"provider_trace_records_company_created_idx": {
"name": "provider_trace_records_company_created_idx",
@@ -46806,37 +46806,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -46947,9 +46947,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"remote_agent_profiles_company_key_uq": {
"name": "remote_agent_profiles_company_key_uq",
@@ -46968,24 +46968,24 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -47013,15 +47013,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
+ "cycle": false,
+ "schema": "public",
+ "type": "always"
}
},
"company_id": {
@@ -47080,10 +47080,10 @@
}
],
"isUnique": true,
- "where": "\"resource_lifecycle_events\".\"action\" = 'create'",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"resource_lifecycle_events\".\"action\" = 'create'",
+ "concurrently": false
},
"resource_lifecycle_events_company_idx": {
"name": "resource_lifecycle_events_company_idx",
@@ -47102,9 +47102,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"resource_lifecycle_events_resource_order_idx": {
"name": "resource_lifecycle_events_resource_order_idx",
@@ -47135,24 +47135,24 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -47244,9 +47244,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"routine_documents_document_uq": {
"name": "routine_documents_document_uq",
@@ -47259,9 +47259,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"routine_documents_company_routine_updated_idx": {
"name": "routine_documents_company_routine_updated_idx",
@@ -47286,50 +47286,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -47447,9 +47447,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"routine_revisions_company_routine_created_idx": {
"name": "routine_revisions_company_routine_created_idx",
@@ -47474,9 +47474,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"routine_revisions_company_responsible_user_idx": {
"name": "routine_revisions_company_responsible_user_idx",
@@ -47501,76 +47501,76 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -47721,9 +47721,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"routine_runs_revision_idx": {
"name": "routine_runs_revision_idx",
@@ -47736,9 +47736,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"routine_runs_company_responsible_user_idx": {
"name": "routine_runs_company_responsible_user_idx",
@@ -47763,9 +47763,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"routine_runs_trigger_idx": {
"name": "routine_runs_trigger_idx",
@@ -47784,9 +47784,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"routine_runs_dispatch_fingerprint_idx": {
"name": "routine_runs_dispatch_fingerprint_idx",
@@ -47805,9 +47805,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"routine_runs_linked_issue_idx": {
"name": "routine_runs_linked_issue_idx",
@@ -47820,9 +47820,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"routine_runs_trigger_idempotency_idx": {
"name": "routine_runs_trigger_idempotency_idx",
@@ -47841,76 +47841,76 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -48098,9 +48098,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"routine_triggers_company_kind_idx": {
"name": "routine_triggers_company_kind_idx",
@@ -48119,9 +48119,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"routine_triggers_next_run_idx": {
"name": "routine_triggers_next_run_idx",
@@ -48134,9 +48134,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"routine_triggers_public_id_idx": {
"name": "routine_triggers_public_id_idx",
@@ -48149,9 +48149,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"routine_triggers_public_id_uq": {
"name": "routine_triggers_public_id_uq",
@@ -48164,76 +48164,76 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -48297,37 +48297,37 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -48551,9 +48551,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"routines_company_assignee_idx": {
"name": "routines_company_assignee_idx",
@@ -48572,9 +48572,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"routines_company_project_idx": {
"name": "routines_company_project_idx",
@@ -48593,9 +48593,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"routines_company_folder_idx": {
"name": "routines_company_folder_idx",
@@ -48614,9 +48614,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"routines_company_responsible_user_idx": {
"name": "routines_company_responsible_user_idx",
@@ -48635,9 +48635,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"routines_company_origin_idx": {
"name": "routines_company_origin_idx",
@@ -48662,115 +48662,115 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"routines_project_id_projects_id_fk": {
"name": "routines_project_id_projects_id_fk",
"tableFrom": "routines",
- "tableTo": "projects",
"columnsFrom": [
"project_id"
],
+ "tableTo": "projects",
"columnsTo": [
"id"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"routines_folder_id_folders_id_fk": {
"name": "routines_folder_id_folders_id_fk",
"tableFrom": "routines",
- "tableTo": "folders",
"columnsFrom": [
"folder_id"
],
+ "tableTo": "folders",
"columnsTo": [
"id"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"routines_goal_id_goals_id_fk": {
"name": "routines_goal_id_goals_id_fk",
"tableFrom": "routines",
- "tableTo": "goals",
"columnsFrom": [
"goal_id"
],
+ "tableTo": "goals",
"columnsTo": [
"id"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -48883,9 +48883,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"run_identity_contexts_run_correlation_idx": {
"name": "run_identity_contexts_run_correlation_idx",
@@ -48904,9 +48904,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"run_identity_contexts_company_run_idx": {
"name": "run_identity_contexts_company_run_idx",
@@ -48925,24 +48925,24 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -49006,50 +49006,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -49216,9 +49216,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"secret_access_events_secret_created_idx": {
"name": "secret_access_events_secret_created_idx",
@@ -49237,9 +49237,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"secret_access_events_user_definition_created_idx": {
"name": "secret_access_events_user_definition_created_idx",
@@ -49258,9 +49258,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"secret_access_events_company_credential_owner_idx": {
"name": "secret_access_events_company_credential_owner_idx",
@@ -49285,9 +49285,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"secret_access_events_consumer_idx": {
"name": "secret_access_events_consumer_idx",
@@ -49312,9 +49312,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"secret_access_events_run_idx": {
"name": "secret_access_events_run_idx",
@@ -49327,89 +49327,89 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -49510,9 +49510,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"smoke_run_steps_company_path_idx": {
"name": "smoke_run_steps_company_path_idx",
@@ -49531,37 +49531,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -49653,9 +49653,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"smoke_runs_company_status_idx": {
"name": "smoke_runs_company_status_idx",
@@ -49674,24 +49674,24 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -49831,9 +49831,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"status_card_updates_generation_issue_idx": {
"name": "status_card_updates_generation_issue_idx",
@@ -49846,50 +49846,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -50122,9 +50122,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"status_cards_company_next_eval_idx": {
"name": "status_cards_company_next_eval_idx",
@@ -50143,102 +50143,102 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -50377,9 +50377,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"status_decision_effects_company_idempotency_uq": {
"name": "status_decision_effects_company_idempotency_uq",
@@ -50398,56 +50398,56 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "no action"
}
},
"compositePrimaryKeys": {},
@@ -50584,9 +50584,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"status_decisions_company_assessment_uq": {
"name": "status_decisions_company_assessment_uq",
@@ -50605,9 +50605,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"status_decisions_company_issue_digest_uq": {
"name": "status_decisions_company_issue_digest_uq",
@@ -50632,98 +50632,98 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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": {},
@@ -50835,9 +50835,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"summary_slots_company_scope_idx": {
"name": "summary_slots_company_scope_idx",
@@ -50862,9 +50862,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"summary_slots_company_generating_issue_idx": {
"name": "summary_slots_company_generating_issue_idx",
@@ -50883,9 +50883,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"summary_slots_company_updated_idx": {
"name": "summary_slots_company_updated_idx",
@@ -50904,76 +50904,76 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"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": {},
@@ -51103,9 +51103,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_access_audit_connection_idx": {
"name": "tool_access_audit_connection_idx",
@@ -51118,9 +51118,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_access_audit_gateway_idx": {
"name": "tool_access_audit_gateway_idx",
@@ -51139,76 +51139,76 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -51277,63 +51277,63 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -51501,9 +51501,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_action_requests_invocation_idx": {
"name": "tool_action_requests_invocation_idx",
@@ -51516,9 +51516,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_action_requests_issue_idx": {
"name": "tool_action_requests_issue_idx",
@@ -51537,115 +51537,115 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -51760,9 +51760,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_applications_company_status_idx": {
"name": "tool_applications_company_status_idx",
@@ -51781,9 +51781,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_applications_company_name_uq": {
"name": "tool_applications_company_name_uq",
@@ -51802,9 +51802,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_applications_company_key_uq": {
"name": "tool_applications_company_key_uq",
@@ -51823,50 +51823,50 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -52161,9 +52161,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_call_events_run_idx": {
"name": "tool_call_events_run_idx",
@@ -52182,9 +52182,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_call_events_issue_idx": {
"name": "tool_call_events_issue_idx",
@@ -52203,9 +52203,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_call_events_invocation_idx": {
"name": "tool_call_events_invocation_idx",
@@ -52218,9 +52218,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_call_events_gateway_idx": {
"name": "tool_call_events_gateway_idx",
@@ -52239,167 +52239,167 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -52612,9 +52612,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_catalog_entries_application_idx": {
"name": "tool_catalog_entries_application_idx",
@@ -52627,9 +52627,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_catalog_entries_connection_idx": {
"name": "tool_catalog_entries_connection_idx",
@@ -52642,9 +52642,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_catalog_entries_company_status_idx": {
"name": "tool_catalog_entries_company_status_idx",
@@ -52663,9 +52663,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_catalog_entries_connection_name_uq": {
"name": "tool_catalog_entries_connection_name_uq",
@@ -52684,63 +52684,63 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -52847,39 +52847,39 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -53000,39 +53000,39 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -53120,9 +53120,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_connection_installs_connection_idx": {
"name": "tool_connection_installs_connection_idx",
@@ -53141,9 +53141,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_connection_installs_target_uq": {
"name": "tool_connection_installs_target_uq",
@@ -53174,50 +53174,50 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -53444,9 +53444,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_connections_application_idx": {
"name": "tool_connections_application_idx",
@@ -53459,9 +53459,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_connections_company_enabled_idx": {
"name": "tool_connections_company_enabled_idx",
@@ -53480,9 +53480,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_connections_company_uid_uq": {
"name": "tool_connections_company_uid_uq",
@@ -53501,61 +53501,61 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"tool_connections_company_id_uq": {
"name": "tool_connections_company_id_uq",
- "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ]
+ ],
+ "nullsNotDistinct": false
}
},
"policies": {},
@@ -53676,9 +53676,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_gateway_rate_limit_counters_window_uq": {
"name": "tool_gateway_rate_limit_counters_window_uq",
@@ -53703,24 +53703,24 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -53869,9 +53869,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_gateway_sessions_company_agent_idx": {
"name": "tool_gateway_sessions_company_agent_idx",
@@ -53890,9 +53890,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_gateway_sessions_company_expires_idx": {
"name": "tool_gateway_sessions_company_expires_idx",
@@ -53911,9 +53911,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_gateway_sessions_run_idx": {
"name": "tool_gateway_sessions_run_idx",
@@ -53932,9 +53932,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_gateway_sessions_issue_idx": {
"name": "tool_gateway_sessions_issue_idx",
@@ -53953,9 +53953,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_gateway_sessions_gateway_idx": {
"name": "tool_gateway_sessions_gateway_idx",
@@ -53974,102 +53974,102 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -54384,9 +54384,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_invocations_run_idx": {
"name": "tool_invocations_run_idx",
@@ -54405,9 +54405,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_invocations_issue_idx": {
"name": "tool_invocations_issue_idx",
@@ -54426,9 +54426,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_invocations_gateway_idx": {
"name": "tool_invocations_gateway_idx",
@@ -54447,9 +54447,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_invocations_company_idempotency_uq": {
"name": "tool_invocations_company_idempotency_uq",
@@ -54468,128 +54468,128 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -54755,9 +54755,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_mcp_gateway_tokens_expiry_idx": {
"name": "tool_mcp_gateway_tokens_expiry_idx",
@@ -54776,9 +54776,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_mcp_gateway_tokens_gateway_idx": {
"name": "tool_mcp_gateway_tokens_gateway_idx",
@@ -54797,9 +54797,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_mcp_gateway_tokens_subject_idx": {
"name": "tool_mcp_gateway_tokens_subject_idx",
@@ -54824,9 +54824,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_mcp_gateway_tokens_company_expires_idx": {
"name": "tool_mcp_gateway_tokens_company_expires_idx",
@@ -54845,63 +54845,63 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -55096,9 +55096,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_mcp_gateways_company_status_idx": {
"name": "tool_mcp_gateways_company_status_idx",
@@ -55117,9 +55117,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_mcp_gateways_profile_idx": {
"name": "tool_mcp_gateways_profile_idx",
@@ -55138,9 +55138,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_mcp_gateways_public_id_uq": {
"name": "tool_mcp_gateways_public_id_uq",
@@ -55153,9 +55153,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_mcp_gateways_company_slug_uq": {
"name": "tool_mcp_gateways_company_slug_uq",
@@ -55174,9 +55174,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_mcp_gateways_company_name_uq": {
"name": "tool_mcp_gateways_company_name_uq",
@@ -55195,102 +55195,102 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "restrict",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "restrict"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -55407,9 +55407,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_oauth_states_connection_idx": {
"name": "tool_oauth_states_connection_idx",
@@ -55422,9 +55422,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_oauth_states_actor_idx": {
"name": "tool_oauth_states_actor_idx",
@@ -55443,9 +55443,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_oauth_states_subject_agent_idx": {
"name": "tool_oauth_states_subject_agent_idx",
@@ -55464,9 +55464,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_oauth_states_expires_at_idx": {
"name": "tool_oauth_states_expires_at_idx",
@@ -55479,50 +55479,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -55644,9 +55644,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_policies_company_type_idx": {
"name": "tool_policies_company_type_idx",
@@ -55665,9 +55665,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_policies_company_name_uq": {
"name": "tool_policies_company_name_uq",
@@ -55686,37 +55686,37 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -55825,9 +55825,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_profile_bindings_target_profile_uq": {
"name": "tool_profile_bindings_target_profile_uq",
@@ -55858,50 +55858,50 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -56015,9 +56015,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_profile_entries_application_idx": {
"name": "tool_profile_entries_application_idx",
@@ -56036,9 +56036,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_profile_entries_connection_idx": {
"name": "tool_profile_entries_connection_idx",
@@ -56057,9 +56057,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_profile_entries_catalog_entry_idx": {
"name": "tool_profile_entries_catalog_entry_idx",
@@ -56078,76 +56078,76 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -56251,9 +56251,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_profiles_company_key_uq": {
"name": "tool_profiles_company_key_uq",
@@ -56272,9 +56272,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_profiles_company_name_uq": {
"name": "tool_profiles_company_name_uq",
@@ -56293,24 +56293,24 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -56417,9 +56417,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_rate_limit_counters_window_uq": {
"name": "tool_rate_limit_counters_window_uq",
@@ -56456,37 +56456,37 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -56570,9 +56570,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_runtime_metric_counters_bucket_uq": {
"name": "tool_runtime_metric_counters_bucket_uq",
@@ -56597,24 +56597,24 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -56840,9 +56840,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_runtime_slots_connection_idx": {
"name": "tool_runtime_slots_connection_idx",
@@ -56855,9 +56855,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_runtime_slots_execution_workspace_idx": {
"name": "tool_runtime_slots_execution_workspace_idx",
@@ -56876,9 +56876,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_runtime_slots_slot_key_uq": {
"name": "tool_runtime_slots_slot_key_uq",
@@ -56897,89 +56897,89 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -57102,9 +57102,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_stdio_command_templates_company_status_idx": {
"name": "tool_stdio_command_templates_company_status_idx",
@@ -57123,9 +57123,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"tool_stdio_command_templates_company_key_uq": {
"name": "tool_stdio_command_templates_company_key_uq",
@@ -57144,37 +57144,37 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -57252,9 +57252,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"user_company_preferences_primary_agent_idx": {
"name": "user_company_preferences_primary_agent_idx",
@@ -57267,37 +57267,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -57376,9 +57376,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"user_inbox_agent_policies_allowed_agent_ids_idx": {
"name": "user_inbox_agent_policies_allowed_agent_ids_idx",
@@ -57391,24 +57391,24 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "gin",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -57523,9 +57523,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"user_secret_declarations_definition_idx": {
"name": "user_secret_declarations_definition_idx",
@@ -57538,9 +57538,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"user_secret_declarations_target_idx": {
"name": "user_secret_declarations_target_idx",
@@ -57565,9 +57565,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"user_secret_declarations_company_required_idx": {
"name": "user_secret_declarations_company_required_idx",
@@ -57586,9 +57586,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"user_secret_declarations_target_path_uq": {
"name": "user_secret_declarations_target_path_uq",
@@ -57619,9 +57619,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"user_secret_declarations_required_override_idx": {
"name": "user_secret_declarations_required_override_idx",
@@ -57640,38 +57640,38 @@
}
],
"isUnique": false,
- "where": "\"user_secret_declarations\".\"allow_missing_override\" = true",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"user_secret_declarations\".\"allow_missing_override\" = true",
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -57817,9 +57817,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"user_secret_definitions_company_provider_idx": {
"name": "user_secret_definitions_company_provider_idx",
@@ -57838,9 +57838,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"user_secret_definitions_provider_config_idx": {
"name": "user_secret_definitions_provider_config_idx",
@@ -57853,9 +57853,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"user_secret_definitions_company_key_uq": {
"name": "user_secret_definitions_company_key_uq",
@@ -57874,64 +57874,64 @@
}
],
"isUnique": true,
- "where": "\"user_secret_definitions\".\"deleted_at\" is null",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"user_secret_definitions\".\"deleted_at\" is null",
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -57991,9 +57991,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"foreignKeys": {},
@@ -58148,137 +58148,137 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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": {},
@@ -58457,9 +58457,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"workspace_operations_company_workspace_started_idx": {
"name": "workspace_operations_company_workspace_started_idx",
@@ -58484,9 +58484,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"workspace_operations_company_workspace_issue_started_idx": {
"name": "workspace_operations_company_workspace_issue_started_idx",
@@ -58517,63 +58517,63 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -58796,9 +58796,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"workspace_runtime_services_company_execution_workspace_status_idx": {
"name": "workspace_runtime_services_company_execution_workspace_status_idx",
@@ -58823,9 +58823,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"workspace_runtime_services_company_project_status_idx": {
"name": "workspace_runtime_services_company_project_status_idx",
@@ -58850,9 +58850,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"workspace_runtime_services_run_idx": {
"name": "workspace_runtime_services_run_idx",
@@ -58865,9 +58865,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"workspace_runtime_services_company_updated_idx": {
"name": "workspace_runtime_services_company_updated_idx",
@@ -58886,102 +58886,102 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "no action",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
},
"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"
],
- "onDelete": "set null",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -59129,9 +59129,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"mcp_attachment_upload_expiry_idx": {
"name": "mcp_attachment_upload_expiry_idx",
@@ -59144,50 +59144,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -59263,9 +59263,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"mcp_event_admissions_grant_idx": {
"name": "mcp_event_admissions_grant_idx",
@@ -59278,9 +59278,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"mcp_event_admissions_company_idx": {
"name": "mcp_event_admissions_company_idx",
@@ -59293,37 +59293,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -59412,9 +59412,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"mcp_event_deliveries_activity_uq": {
"name": "mcp_event_deliveries_activity_uq",
@@ -59433,9 +59433,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"mcp_event_deliveries_due_idx": {
"name": "mcp_event_deliveries_due_idx",
@@ -59448,24 +59448,24 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -59576,9 +59576,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"mcp_event_subscriptions_company_idx": {
"name": "mcp_event_subscriptions_company_idx",
@@ -59591,37 +59591,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -59701,9 +59701,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"mcp_file_ticket_grant_idx": {
"name": "mcp_file_ticket_grant_idx",
@@ -59716,50 +59716,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -59866,9 +59866,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"mcp_mutation_receipts_company_idx": {
"name": "mcp_mutation_receipts_company_idx",
@@ -59881,50 +59881,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -60090,9 +60090,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"mcp_oauth_user_code_uq": {
"name": "mcp_oauth_user_code_uq",
@@ -60105,9 +60105,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"mcp_oauth_device_expiry_idx": {
"name": "mcp_oauth_device_expiry_idx",
@@ -60120,37 +60120,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -60245,63 +60245,63 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -60346,9 +60346,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"foreignKeys": {},
@@ -60460,9 +60460,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"mcp_oauth_requests_expiry_idx": {
"name": "mcp_oauth_requests_expiry_idx",
@@ -60475,37 +60475,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -60575,9 +60575,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"mcp_oauth_tokens_grant_idx": {
"name": "mcp_oauth_tokens_grant_idx",
@@ -60590,9 +60590,9 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"mcp_oauth_tokens_expiry_idx": {
"name": "mcp_oauth_tokens_expiry_idx",
@@ -60605,24 +60605,24 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -60755,9 +60755,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"external_holds_agent_idx": {
"name": "external_holds_agent_idx",
@@ -60776,37 +60776,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -60844,6 +60844,12 @@
"primaryKey": false,
"notNull": true
},
+ "grant_id": {
+ "name": "grant_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
"generation": {
"name": "generation",
"type": "integer",
@@ -60932,18 +60938,42 @@
"primaryKey": false,
"notNull": false
},
+ "qualification_started_at": {
+ "name": "qualification_started_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
"qualification_expires_at": {
"name": "qualification_expires_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
+ "deadline_enforced_at": {
+ "name": "deadline_enforced_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cadence_evidence_incomplete_at": {
+ "name": "cadence_evidence_incomplete_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
"cleanup_expires_at": {
"name": "cleanup_expires_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
+ "detector_removal_requested_at": {
+ "name": "detector_removal_requested_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
"detector_removed_at": {
"name": "detector_removed_at",
"type": "timestamp with time zone",
@@ -60989,10 +61019,10 @@
}
],
"isUnique": true,
- "where": "\"muse_agent_bindings\".\"revoked_at\" IS NULL",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"muse_agent_bindings\".\"revoked_at\" IS NULL",
+ "concurrently": false
},
"muse_bindings_ticket_uq": {
"name": "muse_bindings_ticket_uq",
@@ -61005,37 +61035,66 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
+ "method": "btree",
+ "concurrently": false
+ },
+ "muse_bindings_active_grant_uq": {
+ "name": "muse_bindings_active_grant_uq",
+ "columns": [
+ {
+ "expression": "grant_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"muse_agent_bindings\".\"revoked_at\" IS NULL AND \"muse_agent_bindings\".\"grant_id\" IS NOT NULL",
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
+ },
+ "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",
+ "columnsFrom": [
+ "grant_id"
+ ],
+ "tableTo": "mcp_oauth_grants",
"columnsTo": [
"id"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "set null"
}
},
"compositePrimaryKeys": {},
@@ -61129,9 +61188,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"muse_credentials_binding_idx": {
"name": "muse_credentials_binding_idx",
@@ -61150,37 +61209,37 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -61268,37 +61327,37 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -61398,9 +61457,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"muse_input_source_uq": {
"name": "muse_input_source_uq",
@@ -61419,37 +61478,37 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -61498,6 +61557,19 @@
"primaryKey": false,
"notNull": true
},
+ "signal_attempt": {
+ "name": "signal_attempt",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "signal_notified_at": {
+ "name": "signal_notified_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
"source_event_id": {
"name": "source_event_id",
"type": "text",
@@ -61542,9 +61614,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"muse_mailbox_cursor_idx": {
"name": "muse_mailbox_cursor_idx",
@@ -61569,50 +61641,50 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -61674,6 +61746,20 @@
"primaryKey": false,
"notNull": true
},
+ "timestamps": {
+ "name": "timestamps",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'[]'::jsonb"
+ },
+ "incomplete": {
+ "name": "incomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
"contacts": {
"name": "contacts",
"type": "integer",
@@ -61730,37 +61816,37 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -61929,9 +62015,9 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
},
"muse_assignments_live_binding_uq": {
"name": "muse_assignments_live_binding_uq",
@@ -61944,10 +62030,10 @@
}
],
"isUnique": true,
- "where": "\"muse_runner_assignments\".\"status\" IN ('offered','claimed','accepted')",
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "where": "\"muse_runner_assignments\".\"status\" IN ('offered','claimed','accepted')",
+ "concurrently": false
},
"muse_assignments_company_idx": {
"name": "muse_assignments_company_idx",
@@ -61960,63 +62046,63 @@
}
],
"isUnique": false,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -62054,6 +62140,12 @@
"primaryKey": false,
"notNull": true
},
+ "continuation_receipt_id": {
+ "name": "continuation_receipt_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
"digest": {
"name": "digest",
"type": "text",
@@ -62118,37 +62210,37 @@
}
],
"isUnique": true,
- "concurrently": false,
+ "with": {},
"method": "btree",
- "with": {}
+ "concurrently": false
}
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
},
"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"
],
- "onDelete": "cascade",
- "onUpdate": "no action"
+ "onUpdate": "no action",
+ "onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
@@ -62160,21 +62252,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
+ "cycle": false,
+ "schema": "public"
}
},
"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 b0cf57d33c..55ef7947e3 100644
--- a/packages/db/src/migrations/meta/_journal.json
+++ b/packages/db/src/migrations/meta/_journal.json
@@ -2465,6 +2465,13 @@
"when": 1792172416248,
"tag": "0353_skinny_gamma_corps",
"breakpoints": true
+ },
+ {
+ "idx": 354,
+ "version": "7",
+ "when": 1792187602372,
+ "tag": "0354_agent_connection_assignment_hooks",
+ "breakpoints": true
}
]
}
\ No newline at end of file
diff --git a/packages/plugins/sdk/src/index.ts b/packages/plugins/sdk/src/index.ts
index cfeebd3d55..5290d59568 100644
--- a/packages/plugins/sdk/src/index.ts
+++ b/packages/plugins/sdk/src/index.ts
@@ -271,6 +271,7 @@ export type {
PluginIssueSummariesClient,
PluginAgentsClient,
PluginAgentRuntimeState,
+ PluginAgentConnectionAssignments,
PluginAgentRuntimeSkill,
PluginAccessClient,
PluginAccessMembersClient,
diff --git a/packages/plugins/sdk/src/types.ts b/packages/plugins/sdk/src/types.ts
index 120e649aad..8414142463 100644
--- a/packages/plugins/sdk/src/types.ts
+++ b/packages/plugins/sdk/src/types.ts
@@ -1697,7 +1697,14 @@ export interface PluginAgentRuntimeSkill {
missingDetail?: string | null;
}
+export interface PluginAgentConnectionAssignments {
+ features: { publicMcp: boolean; chatConnectors: boolean };
+ connections: Array<{ id: string; name: string; transport: string; enabled: boolean; status: string }>;
+ profileIds: string[];
+}
+
export interface PluginAgentRuntimeState {
+ connectionAssignments: PluginAgentConnectionAssignments;
skills: PluginAgentRuntimeSkill[];
revision: string;
agent: Agent;
diff --git a/server/src/__tests__/agent-runtime-assignments.test.ts b/server/src/__tests__/agent-runtime-assignments.test.ts
new file mode 100644
index 0000000000..c2d92eaf04
--- /dev/null
+++ b/server/src/__tests__/agent-runtime-assignments.test.ts
@@ -0,0 +1,382 @@
+import { randomUUID } from "node:crypto";
+import { EventEmitter } from "node:events";
+import { mkdtemp, realpath, rm } from "node:fs/promises";
+import { tmpdir } from "node:os";
+import { join } from "node:path";
+import { and, eq, sql } from "drizzle-orm";
+import { agents, heartbeatRuns, issues, companies, companyMemberships, createDb, instanceSettings, pluginConfig, plugins, projects, toolApplications, toolConnections, toolConnectionInstalls, toolProfiles, toolMcpGateways, toolProfileBindings, 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 { pluginAgentRuntimeState } from "../services/plugin-agent-runtime-state.js";
+import { pluginLifecycleInbox } from "../services/plugin-lifecycle-inbox.js";
+import { registerPluginLifecycleDelivery } from "../services/plugin-lifecycle-delivery.js";
+import { createDeliveryWorkCoordinator } from "../services/delivery-work-coordinator.js";
+import { toolAccessService } from "../services/tool-access.js";
+import { createToolGatewayService } from "../services/tool-gateway.js";
+import { connectionIntentService } from "../services/connection-intents.js";
+import { aiConnectionService } from "../services/ai-connections.js";
+
+vi.mock("../services/subscription-refresh.js", () => ({ refreshSubscriptionConnection: vi.fn().mockResolvedValue(undefined) }));
+
+const support = await getEmbeddedPostgresTestSupport();
+const describeDatabase = support.supported ? describe : describe.skip;
+
+describeDatabase("connection assignment synchronization", () => {
+ let database: Awaited<ReturnType<typeof startEmbeddedPostgresTestDatabase>>;
+ let db: Db;
+ let companyId: string;
+ let agentId: string;
+ let peerId: string;
+ let pluginId: string;
+ let applicationId: string;
+ let connectionId: string;
+ beforeAll(async () => { database = await startEmbeddedPostgresTestDatabase("paperclip-runtime-assignments-"); db = createDb(database.connectionString); }, 90_000);
+ afterAll(async () => { await database?.cleanup(); });
+ afterEach(() => vi.unstubAllEnvs());
+ beforeEach(async () => {
+ companyId = randomUUID(); agentId = randomUUID(); peerId = randomUUID(); pluginId = randomUUID();
+ await db.insert(companies).values({ id: companyId, name: "Connector runtime fixture", issuePrefix: `C${companyId.slice(0, 6)}` });
+ await db.insert(plugins).values({ id: pluginId, pluginKey: pluginId, packageName: "runtime-fixture", version: "1.0.0", status: "ready", manifestJson: { resourceLifecycle: ["agent_runtime"], capabilities: ["events.subscribe", "agents.lifecycle.manage"] } as never });
+ await db.insert(agents).values([agentId, peerId].map(id => ({ id, companyId, name: id, adapterType: "paperclip_runner", lifecycleRequiredPluginIds: [pluginId] })));
+ const [application] = await db.insert(toolApplications).values({ companyId, name: "Fixture MCP", type: "mcp_http" }).returning(); applicationId = application.id;
+ const [connection] = await db.insert(toolConnections).values({ companyId, applicationId, name: "Fixture connection", uid: randomUUID(), transport: "mcp_remote", authKind: "none", enabled: true, status: "active" }).returning(); connectionId = connection.id;
+ });
+ const events = () => db.select().from(resourceLifecycleEvents).where(and(eq(resourceLifecycleEvents.companyId, companyId), eq(resourceLifecycleEvents.resourceType, "agent_runtime"))).orderBy(resourceLifecycleEvents.id);
+
+ it("creates gateways without invalidating unrelated standing assignments", async () => {
+ const [profile] = await db.insert(toolProfiles).values({ companyId, profileKey: "gateway-fixture", name: "Gateway fixture" }).returning();
+ const [lower, higher] = [agentId, peerId].sort();
+ let locked!: () => void; let release!: () => void;
+ const held = new Promise<void>(resolve => { locked = resolve; });
+ const resume = new Promise<void>(resolve => { release = resolve; });
+ const blocker = db.transaction(async tx => {
+ await tx.select().from(agents).where(eq(agents.id, lower)).for("no key update");
+ locked(); await resume;
+ });
+ await held;
+ const before = await events();
+ const saves = [higher, lower].map((target, index) => db.transaction(async tx => {
+ await tx.execute(sql`SET LOCAL lock_timeout = '8s'`);
+ return createToolGatewayService(tx as unknown as Db).createNamedGateway({ companyId, body: { name: `Gateway ${index}`, profileId: profile.id, agentId: target } });
+ }));
+ const completed = Promise.allSettled(saves);
+ try {
+ const results = await completed;
+ for (const result of results) if (result.status === "rejected") throw result.reason;
+ expect(await events()).toEqual(before);
+ } finally { release(); await blocker; }
+ const results = await completed;
+ for (const result of results) if (result.status === "rejected") throw result.reason;
+ expect(results.map(result => result.status)).toEqual(["fulfilled", "fulfilled"]);
+ expect(await db.select().from(toolMcpGateways).where(eq(toolMcpGateways.companyId, companyId))).toHaveLength(2);
+ expect(await db.select().from(toolProfileBindings).where(eq(toolProfileBindings.companyId, companyId))).toHaveLength(2);
+ }, 15000);
+ it("captures profile assignment and revocation without exposing another agent's assignments", async () => {
+ const [profile] = await db.insert(toolProfiles).values({ companyId, profileKey: "fixture", name: "Fixture profile" }).returning();
+ const [binding] = await db.insert(toolProfileBindings).values({ companyId, profileId: profile.id, targetType: "agent", targetId: agentId }).returning();
+ const [install] = await db.insert(toolConnectionInstalls).values({ companyId, connectionId, targetType: "agent", targetId: agentId }).returning();
+ const owner = await pluginAgentRuntimeState(db, pluginId, companyId, agentId);
+ expect(owner!.connectionAssignments).toMatchObject({ connections: [expect.objectContaining({ id: connectionId })], profileIds: [profile.id] });
+ expect((await pluginAgentRuntimeState(db, pluginId, companyId, peerId))!.connectionAssignments).toMatchObject({ connections: [], profileIds: [] });
+ const before = (await events()).length;
+ await db.delete(toolProfileBindings).where(eq(toolProfileBindings.id, binding.id));
+ await db.delete(toolConnectionInstalls).where(eq(toolConnectionInstalls.id, install.id));
+ expect(await events()).toHaveLength(before + 2);
+ expect((await pluginAgentRuntimeState(db, pluginId, companyId, agentId))!.connectionAssignments).toMatchObject({ connections: [], profileIds: [] });
+ });
+ it("journals only snapshot recipients when bindings and installs change", async () => {
+ const service = toolAccessService(db);
+ const [profile] = await db.insert(toolProfiles).values({ companyId, profileKey: "scoped", name: "Scoped profile" }).returning();
+ const [project] = await db.insert(projects).values({ companyId, name: "Project binding fixture" }).returning();
+ for (let round = 0; round < 2; round++) {
+ let before = (await events()).length;
+ await service.bindProfile(profile.id, { targetType: "agent", targetId: agentId });
+ expect((await events()).slice(before).map(event => event.resourceId)).toEqual([agentId]);
+ before = (await events()).length;
+ await service.unbindProfile(profile.id, { targetType: "agent", targetId: agentId });
+ expect((await events()).slice(before).map(event => event.resourceId)).toEqual([agentId]);
+ }
+ const beforeProject = await events();
+ await service.bindProfile(profile.id, { targetType: "project", targetId: project.id });
+ await service.unbindProfile(profile.id, { targetType: "project", targetId: project.id });
+ expect(await events()).toEqual(beforeProject);
+ let before = (await events()).length;
+ await db.transaction(async tx => {
+ const [binding] = await tx.insert(toolProfileBindings).values({ companyId, profileId: profile.id, targetType: "agent", targetId: agentId }).returning();
+ await tx.delete(toolProfileBindings).where(eq(toolProfileBindings.id, binding.id));
+ });
+ expect((await events()).slice(before).map(event => event.resourceId)).toEqual([agentId]);
+ before = (await events()).length;
+ const [install] = await db.insert(toolConnectionInstalls).values({ companyId, connectionId, targetType: "agent", targetId: agentId }).returning();
+ expect((await events()).slice(before).map(event => event.resourceId)).toEqual([agentId]);
+ before = (await events()).length;
+ await db.update(toolConnectionInstalls).set({ targetId: peerId }).where(eq(toolConnectionInstalls.id, install.id));
+ expect((await events()).slice(before).map(event => event.resourceId).sort()).toEqual([agentId, peerId].sort());
+ before = (await events()).length;
+ await service.bindProfile(profile.id, { targetType: "company", targetId: companyId });
+ expect((await events()).slice(before).map(event => event.resourceId).sort()).toEqual([agentId, peerId].sort());
+ });
+ it("keeps connector changes and their events atomic and company-scoped", async () => {
+ const before = await events();
+ await expect(db.transaction(async tx => {
+ await tx.update(toolConnections).set({ enabled: false }).where(eq(toolConnections.id, connectionId));
+ throw new Error("rollback");
+ })).rejects.toThrow("rollback");
+ expect(await events()).toEqual(before);
+ await db.execute(sql`ALTER TABLE resource_lifecycle_events ADD CONSTRAINT connector_fixture_failure CHECK (resource_type <> 'agent_runtime') NOT VALID`);
+ try { await expect(db.update(toolConnections).set({ enabled: false }).where(eq(toolConnections.id, connectionId))).rejects.toThrow(); }
+ finally { await db.execute(sql`ALTER TABLE resource_lifecycle_events DROP CONSTRAINT connector_fixture_failure`); }
+ expect((await db.select().from(toolConnections).where(eq(toolConnections.id, connectionId)))[0].enabled).toBe(true);
+ const other = randomUUID();
+ await db.insert(companies).values({ id: other, name: "Other company", issuePrefix: `X${other.slice(0, 6)}` });
+ await db.insert(toolApplications).values({ companyId: other, name: "Other MCP", type: "mcp_http" });
+ expect(await events()).toEqual(before);
+ });
+ it("fails closed when standing assignments exceed the bounded snapshot", async () => {
+ const added = await db.insert(toolConnections).values(Array.from({ length: 513 }, (_, index) => ({ companyId, applicationId, name: `bounded-${index}`, uid: randomUUID(), transport: "mcp_remote" as const, authKind: "none" as const }))).returning({ id: toolConnections.id });
+ await db.insert(toolConnectionInstalls).values(added.map(connection => ({ companyId, connectionId: connection.id, targetType: "agent" as const, targetId: agentId })));
+ await expect(pluginAgentRuntimeState(db, pluginId, companyId, agentId)).rejects.toMatchObject({ status: 422 });
+ });
+ it("invalidates connector feature switches and returns their effective standing state", async () => {
+ await pluginAgentRuntimeState(db, pluginId, companyId, agentId);
+ const before = (await events()).length;
+ await db.update(instanceSettings).set({ experimental: { enableChatConnectors: true } });
+ expect(await events()).toHaveLength(before + 2);
+ expect((await pluginAgentRuntimeState(db, pluginId, companyId, agentId))!.connectionAssignments.features).toEqual({ publicMcp: false, chatConnectors: true });
+ });
+ it("refreshes acknowledged runtime state after managed feature overlays change across restarts", async () => {
+ await pluginAgentRuntimeState(db, pluginId, companyId, agentId);
+ await db.insert(pluginConfig).values({ pluginId, companyId, configJson: {} });
+ const inbox = pluginLifecycleInbox(db, pluginId);
+ for (const event of await events()) await inbox.acknowledge(companyId, String(event.id));
+ for (const enabled of [true, false]) {
+ vi.stubEnv("PAPERCLIP_MANAGED_CONFIG", JSON.stringify({ v: 1, mode: "cloud", catalogVersion: "2026.720.0", features: { enablePublicMcp: enabled, enableChatConnectors: enabled }, plugins: { autoInstall: [] } }));
+ const before = (await events()).length;
+ const snapshots: Array<{ publicMcp: boolean; chatConnectors: boolean }> = [];
+ const call = vi.fn(async (_plugin, _method, event) => {
+ const state = await pluginAgentRuntimeState(db, pluginId, companyId, event.resourceId);
+ snapshots.push(state!.connectionAssignments.features);
+ return { eventId: event.id, status: "acknowledged" };
+ });
+ const coordinator = createDeliveryWorkCoordinator({ owner: db, canRun: () => true, onError: error => { throw error; } });
+ const delivery = registerPluginLifecycleDelivery(coordinator, db, { call, isRunning: () => true, onConfigApplied: () => () => {} } as never, new EventEmitter() as never);
+ try {
+ await delivery.ready;
+ await vi.waitFor(() => expect(snapshots).toEqual(Array(2).fill({ publicMcp: enabled, chatConnectors: enabled })), { timeout: 5000 });
+ await vi.waitFor(async () => expect(await inbox.list(companyId, 100, undefined, ["agent_runtime"])).toEqual([]), { timeout: 5000 });
+ expect(await events()).toHaveLength(before + 2);
+ } finally { delivery.dispose(); await coordinator.stop(); }
+ }
+ });
+
+ it("versions every returned connection field and skips unrelated bookkeeping", async () => {
+ await db.insert(toolConnectionInstalls).values({ companyId, connectionId, targetType: "company", targetId: companyId });
+ const initial = await pluginAgentRuntimeState(db, pluginId, companyId, agentId);
+ const before = await events();
+ await db.update(toolConnections).set({ healthCheckedAt: new Date(), lastError: "fixture", config: { fixture: true }, updatedAt: new Date() }).where(eq(toolConnections.id, connectionId));
+ expect(await events()).toEqual(before);
+ await db.transaction(async tx => {
+ await tx.update(toolConnections).set({ name: "Renamed", enabled: false }).where(eq(toolConnections.id, connectionId));
+ await tx.update(toolConnections).set({ status: "disabled", transport: "local_stdio" }).where(eq(toolConnections.id, connectionId));
+ });
+ expect(await events()).toHaveLength(before.length + 2);
+ const current = await pluginAgentRuntimeState(db, pluginId, companyId, agentId);
+ expect(current!.revision).not.toBe(initial!.revision);
+ expect(current!.connectionAssignments.connections).toEqual([{ id: connectionId, name: "Renamed", transport: "local_stdio", enabled: false, status: "disabled" }]);
+ const [profile] = await db.insert(toolProfiles).values({ companyId, profileKey: "status-fixture", name: "Status fixture" }).returning();
+ await db.insert(toolProfileBindings).values({ companyId, profileId: profile.id, targetType: "company", targetId: companyId });
+ expect((await pluginAgentRuntimeState(db, pluginId, companyId, agentId))!.connectionAssignments.profileIds).toContain(profile.id);
+ const active = await events();
+ await db.update(toolProfiles).set({ name: "Cosmetic rename" }).where(eq(toolProfiles.id, profile.id));
+ expect(await events()).toEqual(active);
+ await db.update(toolProfiles).set({ status: "archived" }).where(eq(toolProfiles.id, profile.id));
+ expect(await events()).toHaveLength(active.length + 2);
+ expect((await pluginAgentRuntimeState(db, pluginId, companyId, agentId))!.connectionAssignments.profileIds).not.toContain(profile.id);
+ });
+
+ it("rejects excessive active profile assignments", async () => {
+ const profiles = await db.insert(toolProfiles).values(Array.from({ length: 129 }, (_, index) => ({ companyId, profileKey: `bound-${index}`, name: `Bound ${index}` }))).returning();
+ await db.insert(toolProfileBindings).values(profiles.map(profile => ({ companyId, profileId: profile.id, targetType: "company" as const, targetId: companyId })));
+ await expect(pluginAgentRuntimeState(db, pluginId, companyId, agentId)).rejects.toMatchObject({ status: 422 });
+ });
+
+ it.each(["bind", "unbind", "delete", "reassign"] as const)("completes profile %s with a single database connection", async change => {
+ const [source, target] = await db.insert(toolProfiles).values([
+ { companyId, profileKey: "single-source", name: "Single source" },
+ { companyId, profileKey: "single-target", name: "Single target" },
+ ]).returning();
+ if (change !== "bind") await db.insert(toolProfileBindings).values({ companyId, profileId: source.id, targetType: "agent", targetId: agentId });
+ const single = createDb(database.connectionString, { maxConnections: 1 });
+ const service = toolAccessService(single);
+ let timer: ReturnType<typeof setTimeout> | undefined;
+ const work = change === "bind" ? service.bindProfile(source.id, { targetType: "agent", targetId: agentId })
+ : change === "unbind" ? service.unbindProfile(source.id, { targetType: "agent", targetId: agentId })
+ : service.deleteProfile(source.id, change === "reassign" ? { reassignToProfileId: target.id } : { force: true });
+ const settled = Promise.allSettled([work]);
+ try {
+ await Promise.race([work, new Promise<never>((_, reject) => { timer = setTimeout(() => reject(new Error("Profile operation waited for another pooled connection")), 3000); })]);
+ if (change === "bind") expect(await db.select().from(toolProfileBindings).where(eq(toolProfileBindings.profileId, source.id))).toHaveLength(1);
+ else if (change === "unbind") expect(await db.select().from(toolProfileBindings).where(eq(toolProfileBindings.profileId, source.id))).toHaveLength(0);
+ else {
+ expect(await db.select().from(toolProfiles).where(eq(toolProfiles.id, source.id))).toHaveLength(0);
+ expect(await db.select().from(toolProfileBindings).where(eq(toolProfileBindings.profileId, target.id))).toHaveLength(change === "reassign" ? 1 : 0);
+ }
+ } finally { clearTimeout(timer); await single.$client.end({ timeout: 1 }); await settled; }
+ }, 10000);
+
+ it.each(["bind", "unbind", "reassign"] as const)("orders profile %s with setup finalization before assignment fanout", async change => {
+ const targetAgent = [agentId, peerId].sort()[0];
+ const [profile] = await db.insert(toolProfiles).values({ companyId, profileKey: `app:${connectionId}`, name: "Managed profile" }).returning();
+ await db.insert(toolProfileBindings).values({ companyId, profileId: profile.id, targetType: "company", targetId: companyId });
+ if (change === "unbind") await db.insert(toolProfileBindings).values({ companyId, profileId: profile.id, targetType: "agent", targetId: targetAgent });
+ const [source] = change === "reassign" ? await db.insert(toolProfiles).values({ companyId, profileKey: "source", name: "Source profile" }).returning() : [];
+ if (source) await db.insert(toolProfileBindings).values({ companyId, profileId: source.id, targetType: "agent", targetId: targetAgent });
+ let locked!: () => void;
+ let release!: () => void;
+ const held = new Promise<void>(resolve => { locked = resolve; });
+ const resume = new Promise<void>(resolve => { release = resolve; });
+ const blocker = db.transaction(async tx => {
+ await tx.select().from(agents).where(eq(agents.id, [agentId, peerId].sort()[0])).for("no key update");
+ locked(); await resume;
+ });
+ await held;
+ const pids: number[] = [];
+ const run = (work: (service: ReturnType<typeof toolAccessService>) => Promise<unknown>) => db.transaction(async tx => {
+ await tx.execute(sql`SET LOCAL lock_timeout = '8s'`);
+ const [backend] = await tx.execute(sql`SELECT pg_backend_pid() AS pid`);
+ pids.push(Number(backend.pid));
+ return work(toolAccessService(tx as unknown as Db));
+ });
+ const waitForLock = (index: number) => vi.waitFor(async () => {
+ expect(pids.length).toBeGreaterThan(index);
+ const [activity] = await db.execute(sql`SELECT wait_event_type FROM pg_stat_activity WHERE pid = ${pids[index]}`);
+ expect(activity.wait_event_type).toBe("Lock");
+ }, { timeout: 5000 });
+ const mutation = run(writer => change === "bind"
+ ? writer.bindProfile(profile.id, { targetType: "agent", targetId: targetAgent })
+ : change === "unbind" ? writer.unbindProfile(profile.id, { targetType: "agent", targetId: targetAgent })
+ : writer.deleteProfile(source!.id, { reassignToProfileId: profile.id }));
+ const mutationResult = Promise.allSettled([mutation]);
+ let finishResult: Promise<PromiseSettledResult<unknown>[]> | undefined;
+ try {
+ await waitForLock(0);
+ finishResult = Promise.allSettled([run(writer => writer.finishGalleryAppConnection(companyId, connectionId, { enabledCatalogEntryIds: [], askFirstCatalogEntryIds: [], access: "all_agents" }))]);
+ await waitForLock(1);
+ } finally { release(); await blocker; }
+ for (const result of [...await mutationResult, ...await finishResult!]) if (result.status === "rejected") throw result.reason;
+ expect((await db.select().from(toolProfiles).where(eq(toolProfiles.id, profile.id)))[0].status).toBe("active");
+ if (source) expect(await db.select().from(toolProfiles).where(eq(toolProfiles.id, source.id))).toEqual([]);
+ }, 15000);
+
+ it.each(["connection settings", "profile binding"] as const)("orders AI adoption with concurrent %s using foreign-key-compatible locks", async change => {
+ const home = await realpath(await mkdtemp(join(tmpdir(), "paperclip-adoption-fixture-")));
+ vi.stubEnv("PAPERCLIP_HOME", home);
+ vi.stubEnv("PAPERCLIP_INSTANCE_ID", "adoption-fixture");
+ const [lower, higher] = [agentId, peerId].sort();
+ const userId = `adoption-${randomUUID()}`;
+ const issueId = randomUUID();
+ const runId = randomUUID();
+ let release!: () => void;
+ try {
+ await db.update(toolConnections).set({ config: { url: "https://mcp.example.test/mcp" } }).where(eq(toolConnections.id, connectionId));
+ await db.insert(companyMemberships).values({ companyId, principalType: "user", principalId: userId, status: "active", membershipRole: "member" });
+ await db.update(agents).set({ adapterType: "paperclip_runner", adapterConfig: { provider: "codex" } }).where(eq(agents.id, higher));
+ await db.insert(issues).values({ id: issueId, companyId, title: "Legacy AI adoption", status: "in_progress", assigneeAgentId: higher, responsibleUserId: userId });
+ await db.insert(heartbeatRuns).values({ id: runId, companyId, agentId: higher, nativeIssueId: issueId, status: "failed", errorCode: "acpx_auth_required", responsibleUserId: userId, contextSnapshot: {} });
+ const intents = connectionIntentService(db);
+ const card = await intents.requestForRunAuthFailure(runId);
+ const setup = await intents.setupOptions(card!.interactionId!);
+ expect(setup.aiConnectionRequiresAdoption).toBe(true);
+ const account = await aiConnectionService(db).save(companyId, userId, { provider: "openai", method: "api_key", ownership: "personal", name: "Adopted account", apiKey: "fixture", allAgents: true, agentIds: [] }, "fixture-api-key");
+ const [bindingProfile] = change === "profile binding" ? await db.insert(toolProfiles).values({ companyId, profileKey: "adoption-binding", name: "Adoption binding" }).returning() : [];
+ const [agent] = await db.select().from(agents).where(eq(agents.id, higher));
+ let locked!: () => void;
+ const held = new Promise<void>(resolve => { locked = resolve; });
+ const resume = new Promise<void>(resolve => { release = resolve; });
+ const blocker = db.transaction(async tx => {
+ await tx.select().from(agents).where(eq(agents.id, lower)).for("no key update");
+ locked(); await resume;
+ });
+ await held;
+ const pids: number[] = [];
+ const run = (work: (client: Db) => Promise<unknown>) => db.transaction(async tx => {
+ await tx.execute(sql`SET LOCAL lock_timeout = '8s'`);
+ const [backend] = await tx.execute(sql`SELECT pg_backend_pid() AS pid`);
+ pids.push(Number(backend.pid));
+ return work(tx as unknown as Db);
+ });
+ const waitForLock = (index: number) => vi.waitFor(async () => {
+ expect(pids.length).toBeGreaterThan(index);
+ const [activity] = await db.execute(sql`SELECT wait_event_type FROM pg_stat_activity WHERE pid = ${pids[index]}`);
+ expect(activity.wait_event_type).toBe("Lock");
+ }, { timeout: 5000 });
+ const adopt = (client: Db) => connectionIntentService(client).complete(card!.interactionId!, account.connectionId, userId, { validatedAdoption: { agentUpdatedAt: agent.updatedAt, binding: setup.aiConnection! } });
+ const first = run(change === "connection settings" ? client => toolAccessService(client, { remoteHttpEndpointLookup: async () => [{ address: "8.8.8.8", family: 4 }] }).updateConnection(connectionId, { name: "Concurrent settings" }) : adopt);
+ let second: Promise<PromiseSettledResult<unknown>[]> | undefined;
+ const firstResult = Promise.allSettled([first]);
+ try {
+ await waitForLock(0);
+ second = Promise.allSettled([run(change === "connection settings" ? adopt : client => toolAccessService(client).bindProfile(bindingProfile!.id, { targetType: "agent", targetId: lower }, { actorType: "agent", actorId: higher }))]);
+ await waitForLock(1);
+ } finally { release(); await blocker; }
+ for (const result of [...await firstResult, ...await second!]) if (result.status === "rejected") throw result.reason;
+ expect((await db.select().from(agents).where(eq(agents.id, higher)))[0].runtimeConfig.aiConnection).toEqual(setup.aiConnection);
+ if (change === "connection settings") expect((await db.select().from(toolConnections).where(eq(toolConnections.id, connectionId)))[0].name).toBe("Concurrent settings");
+ else expect(await db.select().from(toolProfileBindings).where(eq(toolProfileBindings.profileId, bindingProfile!.id))).toEqual(expect.arrayContaining([expect.objectContaining({ targetType: "agent", targetId: lower })]));
+ expect(await toolAccessService(db).listConnectionInstalls(account.connectionId, companyId)).toEqual(expect.arrayContaining([expect.objectContaining({ targetType: "agent", targetId: higher })]));
+ expect((await intents.setupOptions(card!.interactionId!)).interaction.status).toBe("accepted");
+ } finally { release?.(); await rm(home, { recursive: true, force: true }); }
+ }, 20000);
+
+ it.each(["installs", "finish", "activate", "enable", "revive", "reassign"] as const)("orders %s replacement before scoped and company runtime locks", async change => {
+ const [lower, higher] = [agentId, peerId].sort();
+ await db.update(toolConnections).set({ config: { url: "https://mcp.example.test/mcp" } }).where(eq(toolConnections.id, connectionId));
+ const [app] = await db.insert(toolApplications).values({ companyId, name: "Replacement app", type: "mcp_http" }).returning();
+ const [connection] = await db.insert(toolConnections).values({ companyId, applicationId: app.id, name: "Replacement connection", uid: randomUUID(), transport: "mcp_remote", status: change === "activate" ? "draft" : "active", enabled: change !== "enable" }).returning();
+ const [source, target] = await db.insert(toolProfiles).values([
+ { companyId, profileKey: `app:${connection.id}`, name: "Replacement source", status: change === "revive" ? "archived" : "active" },
+ { companyId, profileKey: "replacement-target", name: "Replacement target" },
+ ]).returning();
+ await db.insert(toolProfileBindings).values({ companyId, profileId: source.id, targetType: "agent", targetId: higher });
+ if (change === "installs") await db.insert(toolConnectionInstalls).values({ companyId, connectionId: connection.id, targetType: "agent", targetId: higher });
+ let locked!: () => void; let release!: () => void;
+ const held = new Promise<void>(resolve => { locked = resolve; });
+ const resume = new Promise<void>(resolve => { release = resolve; });
+ const blocker = db.transaction(async tx => {
+ await tx.select().from(agents).where(eq(agents.id, lower)).for("no key update");
+ locked(); await resume;
+ });
+ await held;
+ const pids: number[] = [];
+ const run = (work: (service: ReturnType<typeof toolAccessService>) => Promise<unknown>) => db.transaction(async tx => {
+ await tx.execute(sql`SET LOCAL lock_timeout = '8s'`);
+ const [backend] = await tx.execute(sql`SELECT pg_backend_pid() AS pid`);
+ pids.push(Number(backend.pid));
+ return work(toolAccessService(tx as unknown as Db, { remoteHttpEndpointLookup: async () => [{ address: "8.8.8.8", family: 4 }] }));
+ });
+ const waitForLock = (index: number) => vi.waitFor(async () => {
+ expect(pids.length).toBeGreaterThan(index);
+ const [activity] = await db.execute(sql`SELECT wait_event_type FROM pg_stat_activity WHERE pid = ${pids[index]}`);
+ expect(activity.wait_event_type).toBe("Lock");
+ }, { timeout: 5000 });
+ const settings = Promise.allSettled([run(service => service.updateConnection(connectionId, { name: "Ordered replacement settings" }))]);
+ let replacement: Promise<PromiseSettledResult<unknown>[]> | undefined;
+ try {
+ await waitForLock(0);
+ replacement = Promise.allSettled([run(service => change === "installs"
+ ? service.putConnectionInstalls(connection.id, { installs: [{ targetType: "agent", targetId: lower }] })
+ : change === "reassign" ? service.deleteProfile(source.id, { reassignToProfileId: target.id })
+ : service.finishGalleryAppConnection(companyId, connection.id, { enabledCatalogEntryIds: [], askFirstCatalogEntryIds: [], access: { agentIds: [change === "finish" ? lower : higher] } }))]);
+ await waitForLock(1);
+ } finally { release(); await blocker; }
+ for (const result of [...await settings, ...await replacement!]) if (result.status === "rejected") throw result.reason;
+ if (change === "installs") expect(await toolAccessService(db).listConnectionInstalls(connection.id, companyId)).toEqual([expect.objectContaining({ targetType: "agent", targetId: lower })]);
+ else expect(await db.select().from(toolProfileBindings).where(eq(toolProfileBindings.profileId, change === "reassign" ? target.id : source.id))).toEqual([expect.objectContaining({ targetType: "agent", targetId: change === "finish" ? lower : higher })]);
+ if (change === "activate" || change === "enable" || change === "revive") {
+ expect((await db.select().from(toolConnections).where(eq(toolConnections.id, connection.id)))[0].status).toBe("active");
+ expect((await db.select().from(toolConnections).where(eq(toolConnections.id, connection.id)))[0].enabled).toBe(true);
+ expect((await db.select().from(toolProfiles).where(eq(toolProfiles.id, source.id)))[0].status).toBe("active");
+ }
+ }, 15000);
+
+});
diff --git a/server/src/modules/agent-lifecycle/adapters/configuration.ts b/server/src/modules/agent-lifecycle/adapters/configuration.ts
index 70a8e44d5d..2b55583d9f 100644
--- a/server/src/modules/agent-lifecycle/adapters/configuration.ts
+++ b/server/src/modules/agent-lifecycle/adapters/configuration.ts
@@ -9,7 +9,7 @@ import type { LifecycleEffects } from "./effects.js";
export async function updateAgentConfiguration(tx: Db, effects: LifecycleEffects, id: string, data: AgentConfigurationPatch, options?: UpdateAgentOptions, publications: ActivityPublication[] = []) {
if (!("nestedIndex" in tx)) throw new AgentLifecycleConflict("Configuration integration requires a database transaction");
assertConfigurationFields(data);
- const [current] = await tx.select().from(agents).where(eq(agents.id, id)).for("update");
+ const [current] = await tx.select().from(agents).where(eq(agents.id, id)).for("no key update");
if (!current) return null;
const patch = await effects.prepareConfiguration(tx, current, data, options);
assertConfigurationFields(patch);
diff --git a/server/src/services/connection-intents.ts b/server/src/services/connection-intents.ts
index 8cb1d73c50..d02b27c4e8 100644
--- a/server/src/services/connection-intents.ts
+++ b/server/src/services/connection-intents.ts
@@ -51,7 +51,7 @@ import { instanceSettingsService } from "./instance-settings.js";
import { conflict, forbidden, notFound, unprocessable } from "../errors.js";
import type { RuntimeToolsTokenClaims } from "../runtime-tools-token.js";
import { issueThreadInteractionService } from "./issue-thread-interactions.js";
-import { toolAccessService } from "./tool-access.js";
+import { lockToolConnectionRuntimeInputs, toolAccessService } from "./tool-access.js";
import { toolAccessPolicyService } from "./tool-access-policy.js";
import { captureRunIdentity } from "./run-identity.js";
import { resolveManagedGitHubIdentitySelection } from "./git-credentials.js";
@@ -994,7 +994,7 @@ export function connectionIntentService(db: Db) {
if (payload.accessRequest.connectionId !== connectionId) throw conflict("Use the connection named in this access request");
throw forbidden("Granting agent tool access requires connection-management authority");
}
- await tx.select({ id: toolConnections.id }).from(toolConnections).where(and(eq(toolConnections.id, connectionId), eq(toolConnections.companyId, loaded.issue.companyId))).for("update");
+ await lockToolConnectionRuntimeInputs(tx, loaded.issue.companyId, connectionId);
let selectedConnection = await txAccess.getConnection(connectionId, loaded.issue.companyId);
const selectedApplication = await txAccess.getApplication(
selectedConnection.applicationId,
@@ -1031,7 +1031,10 @@ export function connectionIntentService(db: Db) {
if (payload.purpose !== "ai") throw conflict("AI authentication cannot satisfy a tool connection request");
let managed;
if (options.validatedAdoption) {
- const [agent] = await tx.select().from(agents).where(and(eq(agents.id, payload.requestingAgentId), eq(agents.companyId, loaded.issue.companyId))).for("update");
+ await tx.select({ id: agents.id }).from(agents)
+ .where(and(eq(agents.companyId, loaded.issue.companyId), sql`${agents.status} NOT IN ('pending_approval', 'terminated')`))
+ .orderBy(agents.id).for("no key update");
+ const [agent] = await tx.select().from(agents).where(and(eq(agents.id, payload.requestingAgentId), eq(agents.companyId, loaded.issue.companyId))).for("no key update");
if (!agent || agent.runtimeConfig.aiConnection || agent.updatedAt.getTime() !== options.validatedAdoption.agentUpdatedAt.getTime()) {
throw conflict("The agent changed during validation. Reload the task and try again.");
}
diff --git a/server/src/services/email-connections.ts b/server/src/services/email-connections.ts
index 70a8b4b186..78f38ad505 100644
--- a/server/src/services/email-connections.ts
+++ b/server/src/services/email-connections.ts
@@ -11,7 +11,7 @@ import {
import type { EmailConnectionInput, EmailCredentialOption } from "@paperclipai/shared";
import { badRequest, forbidden, HttpError, notFound } from "../errors.js";
import { secretService } from "./secrets.js";
-import { toolAccessService } from "./tool-access.js";
+import { lockToolConnectionRuntimeInputs, toolAccessService } from "./tool-access.js";
import { agentmailApi } from "./agentmail-api.js";
import { logActivity } from "./activity-log.js";
import type { EmailActor } from "./email-channels.js";
@@ -321,16 +321,7 @@ export function emailConnectionService(
) {
return db.transaction(async (tx) => {
const db = tx as unknown as Db;
- await db
- .select()
- .from(toolConnections)
- .where(
- and(
- eq(toolConnections.id, id),
- eq(toolConnections.companyId, companyId),
- ),
- )
- .for("update");
+ await lockToolConnectionRuntimeInputs(db, companyId, id);
const connection = await emailConnectionService(db, fetchImpl).get(companyId, id, actor);
const tools = toolAccessService(db);
const installs = await db
diff --git a/server/src/services/plugin-agent-connections.ts b/server/src/services/plugin-agent-connections.ts
new file mode 100644
index 0000000000..ca90fb9c4c
--- /dev/null
+++ b/server/src/services/plugin-agent-connections.ts
@@ -0,0 +1,24 @@
+import { and, eq, or } from "drizzle-orm";
+import { toolConnections, toolConnectionInstalls, toolProfiles, toolProfileBindings, type Db } from "@paperclipai/db";
+import type { PluginAgentConnectionAssignments } from "@paperclipai/plugin-sdk";
+import { unprocessable } from "../errors.js";
+
+export async function pluginAgentConnectionAssignments(db: Db, companyId: string, agentId: string, features: PluginAgentConnectionAssignments["features"]): Promise<PluginAgentConnectionAssignments> {
+ const [connections, profiles] = await Promise.all([
+ db.selectDistinct({ id: toolConnections.id, name: toolConnections.name, transport: toolConnections.transport,
+ enabled: toolConnections.enabled, status: toolConnections.status })
+ .from(toolConnectionInstalls).innerJoin(toolConnections, and(eq(toolConnections.id, toolConnectionInstalls.connectionId), eq(toolConnections.companyId, companyId)))
+ .where(and(eq(toolConnectionInstalls.companyId, companyId), or(
+ and(eq(toolConnectionInstalls.targetType, "agent"), eq(toolConnectionInstalls.targetId, agentId)),
+ and(eq(toolConnectionInstalls.targetType, "company"), eq(toolConnectionInstalls.targetId, companyId)))))
+ .orderBy(toolConnections.id).limit(513),
+ db.selectDistinct({ id: toolProfiles.id }).from(toolProfileBindings)
+ .innerJoin(toolProfiles, and(eq(toolProfiles.id, toolProfileBindings.profileId), eq(toolProfiles.companyId, companyId), eq(toolProfiles.status, "active")))
+ .where(and(eq(toolProfileBindings.companyId, companyId), or(
+ and(eq(toolProfileBindings.targetType, "agent"), eq(toolProfileBindings.targetId, agentId)),
+ and(eq(toolProfileBindings.targetType, "company"), eq(toolProfileBindings.targetId, companyId)))))
+ .orderBy(toolProfiles.id).limit(129),
+ ]);
+ if (connections.length > 512 || profiles.length > 128) throw unprocessable("Agent connection assignments exceed the synchronization limit");
+ return { features, connections, profileIds: profiles.map(profile => profile.id) };
+}
diff --git a/server/src/services/plugin-agent-runtime-state.ts b/server/src/services/plugin-agent-runtime-state.ts
index c04ea0728b..11615783b0 100644
--- a/server/src/services/plugin-agent-runtime-state.ts
+++ b/server/src/services/plugin-agent-runtime-state.ts
@@ -4,6 +4,7 @@ import type { PluginAgentRuntimeState } from "@paperclipai/plugin-sdk";
import { agentRecordQueries } from "../lib/agent-records.js";
import { conflict, forbidden } from "../errors.js";
import { agentInstructionsService } from "./agent-instructions.js";
+import { pluginAgentConnectionAssignments } from "./plugin-agent-connections.js";
import { companySkillService } from "./company-skills.js";
import { withSkillActor } from "./skill-access.js";
import { readPaperclipSkillSyncPreference } from "@paperclipai/adapter-utils/server-utils";
@@ -11,7 +12,7 @@ import { skillVersionSelectionMap } from "./runtime-skill-selections.js";
import { instanceSettingsService } from "./instance-settings.js";
import { agentInstanceSecretService } from "./agent-instance-secrets.js";
-async function readState(db: Db, pluginId: string, companyId: string, agentId: string): Promise<Omit<PluginAgentRuntimeState, "skills"> | null> {
+async function readState(db: Db, pluginId: string, companyId: string, agentId: string): Promise<Omit<PluginAgentRuntimeState, "skills" | "connectionAssignments"> | null> {
return db.transaction(async tx => {
const [agent] = await tx.select().from(agents)
.where(and(eq(agents.companyId, companyId), eq(agents.id, agentId))).for("share");
@@ -48,9 +49,10 @@ export async function pluginAgentRuntimeState(db: Db, pluginId: string, companyI
selectionConfig: state.agent.adapterConfig, includeLegacy: state.agent.adapterType !== "paperclip_runner", snapshotLatest: true,
versionSelections: skillVersionSelectionMap(preference.desiredSkillEntries, { versionPinsEnabled: settings.enableBetaSkills }),
}));
+ const connectionAssignments = await pluginAgentConnectionAssignments(db, companyId, agentId, { publicMcp: settings.enablePublicMcp, chatConnectors: settings.enableChatConnectors });
const current = await readState(db, pluginId, companyId, agentId);
if (!current) return null;
- if (current.revision === state.revision) return { ...current, skills };
+ if (current.revision === state.revision) return { ...current, skills, connectionAssignments };
}
throw conflict("Agent runtime changed while resolving synchronization inputs; retry");
}
diff --git a/server/src/services/plugin-lifecycle-delivery.ts b/server/src/services/plugin-lifecycle-delivery.ts
index 5eea93f183..6b67741b0d 100644
--- a/server/src/services/plugin-lifecycle-delivery.ts
+++ b/server/src/services/plugin-lifecycle-delivery.ts
@@ -1,4 +1,4 @@
-import { and, asc, eq, isNull, or } from "drizzle-orm";
+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";
import { pluginLifecycleInbox } from "./plugin-lifecycle-inbox.js";
@@ -21,6 +21,7 @@ export function registerPluginLifecycleDelivery(
let pending = true;
let disposed = false;
const retryAt = new Map<string, number>();
+ const refreshedRuntimeCompanies = new Set<string>();
const retryMs = 30_000;
const delivery = coordinator.register(DELIVERY_QUEUES.pluginLifecycle, {
retryMs,
@@ -50,6 +51,10 @@ export function registerPluginLifecycleDelivery(
const [disabled] = await db.select({ id: pluginCompanySettings.id }).from(pluginCompanySettings)
.where(and(eq(pluginCompanySettings.pluginId, plugin.id), eq(pluginCompanySettings.companyId, companyId), eq(pluginCompanySettings.enabled, false)));
if (disabled) continue;
+ if (types.includes("agent_runtime") && !refreshedRuntimeCompanies.has(companyId)) {
+ await db.execute(sql`SELECT paperclip_invalidate_company_agent_runtimes(${companyId}::uuid)`);
+ refreshedRuntimeCompanies.add(companyId);
+ }
const inbox = pluginLifecycleInbox(db, plugin.id);
let afterId: string | undefined;
// Visit independent resources past a failed or deferred head.
diff --git a/server/src/services/tool-access.ts b/server/src/services/tool-access.ts
index 852860cc1f..8ef80f0cf5 100644
--- a/server/src/services/tool-access.ts
+++ b/server/src/services/tool-access.ts
@@ -3073,6 +3073,29 @@ async function lockManagedAppPolicies(client: ToolAccessMutationDb, companyId: s
)).orderBy(toolPolicies.id).for("no key update");
}
+async function lockToolAssignmentAgents(client: ToolAccessMutationDb, companyId: string, targets: ReadonlyArray<{ targetType: string; targetId: string }>) {
+ const allAgents = targets.some(target => target.targetType === "company" && target.targetId === companyId);
+ const ids = targets.filter(target => target.targetType === "agent").map(target => target.targetId);
+ if (!allAgents && !ids.length) return;
+ await client.select({ id: agents.id }).from(agents)
+ .where(and(eq(agents.companyId, companyId), sql`${agents.status} NOT IN ('pending_approval', 'terminated')`,
+ allAgents ? undefined : inArray(agents.id, ids)))
+ .orderBy(agents.id).for("no key update");
+}
+
+export async function lockToolConnectionRuntimeInputs(client: ToolAccessMutationDb, companyId: string, connectionId: string) {
+ await client.select({ id: toolApplications.id }).from(toolApplications)
+ .innerJoin(toolConnections, and(eq(toolConnections.applicationId, toolApplications.id), eq(toolConnections.companyId, toolApplications.companyId)))
+ .where(and(eq(toolConnections.id, connectionId), eq(toolConnections.companyId, companyId)))
+ .for("update", { of: toolApplications });
+ await client.select({ id: toolConnections.id }).from(toolConnections)
+ .where(and(eq(toolConnections.id, connectionId), eq(toolConnections.companyId, companyId))).for("update");
+ await client.select({ id: toolProfiles.id }).from(toolProfiles)
+ .where(and(eq(toolProfiles.companyId, companyId), eq(toolProfiles.profileKey, `app:${connectionId}`)))
+ .for("no key update");
+ await lockManagedAppPolicies(client, companyId, connectionId);
+}
+
export function toolAccessService(
db: Db,
options: ToolAccessServiceOptions = {},
@@ -5495,6 +5518,7 @@ export function toolAccessService(
companyId: string,
targetType: CreateToolProfileBindingForProfile["targetType"],
targetId: string,
+ dbClient: ToolAccessMutationDb = db,
) {
if (targetType === "company") {
if (targetId !== companyId)
@@ -5504,7 +5528,7 @@ export function toolAccessService(
return;
}
if (targetType === "agent") {
- const [row] = await db
+ const [row] = await dbClient
.select({ id: agents.id })
.from(agents)
.where(and(eq(agents.id, targetId), eq(agents.companyId, companyId)));
@@ -5515,7 +5539,7 @@ export function toolAccessService(
return;
}
if (targetType === "project") {
- const [row] = await db
+ const [row] = await dbClient
.select({ id: projects.id })
.from(projects)
.where(
@@ -5528,7 +5552,7 @@ export function toolAccessService(
return;
}
if (targetType === "routine") {
- const [row] = await db
+ const [row] = await dbClient
.select({ id: routines.id })
.from(routines)
.where(
@@ -5541,7 +5565,7 @@ export function toolAccessService(
return;
}
if (targetType === "issue") {
- const [row] = await db
+ const [row] = await dbClient
.select({ id: issues.id })
.from(issues)
.where(and(eq(issues.id, targetId), eq(issues.companyId, companyId)));
@@ -5552,7 +5576,7 @@ export function toolAccessService(
return;
}
if (targetType === "gateway") {
- const [row] = await db
+ const [row] = await dbClient
.select({ id: toolMcpGateways.id })
.from(toolMcpGateways)
.where(
@@ -5661,6 +5685,7 @@ export function toolAccessService(
await lockManagedAppPolicies(dbClient, input.connection.companyId, input.connection.id);
const createdProfile = !profile;
const resetToRecommendedDefaults = !profile || profile.status !== "active";
+ if (resetToRecommendedDefaults) await lockToolAssignmentAgents(dbClient, input.connection.companyId, [{ targetType: "company", targetId: input.connection.companyId }]);
if (!profile) {
const [sameName] = await dbClient
.select({ id: toolProfiles.id })
@@ -6003,14 +6028,14 @@ export function toolAccessService(
return created;
}
- async function getProfileRow(profileId: string, companyId?: string) {
+ async function getProfileRow(profileId: string, companyId?: string, dbClient: ToolAccessMutationDb = db) {
const where = companyId
? and(
eq(toolProfiles.id, profileId),
eq(toolProfiles.companyId, companyId),
)
: eq(toolProfiles.id, profileId);
- const [row] = await db.select().from(toolProfiles).where(where);
+ const [row] = await dbClient.select().from(toolProfiles).where(where);
if (!row) throw notFound("Tool profile not found");
return row;
}
@@ -6018,8 +6043,9 @@ export function toolAccessService(
async function profileDetails(
profileId: string,
companyId?: string,
+ dbClient: ToolAccessMutationDb = db,
): Promise<ToolProfileWithDetails> {
- const profile = await getProfileRow(profileId, companyId);
+ const profile = await getProfileRow(profileId, companyId, dbClient);
const [
entries,
bindings,
@@ -6028,7 +6054,7 @@ export function toolAccessService(
applications,
connections,
] = await Promise.all([
- db
+ dbClient
.select()
.from(toolProfileEntries)
.where(
@@ -6038,7 +6064,7 @@ export function toolAccessService(
),
)
.orderBy(asc(toolProfileEntries.createdAt)),
- db
+ dbClient
.select()
.from(toolProfileBindings)
.where(
@@ -6051,7 +6077,7 @@ export function toolAccessService(
asc(toolProfileBindings.priority),
asc(toolProfileBindings.createdAt),
),
- db
+ dbClient
.select()
.from(toolCatalogEntries)
.where(
@@ -6060,15 +6086,15 @@ export function toolAccessService(
eq(toolCatalogEntries.status, "active"),
),
),
- db
+ dbClient
.select({ id: agents.id })
.from(agents)
.where(eq(agents.companyId, profile.companyId)),
- db
+ dbClient
.select()
.from(toolApplications)
.where(eq(toolApplications.companyId, profile.companyId)),
- db
+ dbClient
.select()
.from(toolConnections)
.where(eq(toolConnections.companyId, profile.companyId)),
@@ -14022,8 +14048,8 @@ export function toolAccessService(
await tx.select({ id: toolApplications.id }).from(toolApplications)
.where(and(eq(toolApplications.id, connection.applicationId), eq(toolApplications.companyId, companyId)))
.for("update");
- await tx
- .select({ id: toolConnections.id })
+ const [lockedConnection] = await tx
+ .select({ id: toolConnections.id, status: toolConnections.status, enabled: toolConnections.enabled })
.from(toolConnections)
.where(
and(
@@ -14032,6 +14058,7 @@ export function toolAccessService(
),
)
.for("update");
+ if (!lockedConnection) throw notFound("Tool connection not found");
const [existingProfile] = await tx
.select()
.from(toolProfiles)
@@ -14043,6 +14070,13 @@ export function toolAccessService(
)
.limit(1).for("no key update");
await lockManagedAppPolicies(tx, companyId, connection.id);
+ const existingBindings = existingProfile ? await tx.select().from(toolProfileBindings)
+ .where(and(eq(toolProfileBindings.companyId, companyId), eq(toolProfileBindings.profileId, existingProfile.id))) : [];
+ const existingInstalls = await tx.select().from(toolConnectionInstalls)
+ .where(and(eq(toolConnectionInstalls.companyId, companyId), eq(toolConnectionInstalls.connectionId, connection.id)));
+ const companyTargets = lockedConnection.status !== "active" || !lockedConnection.enabled || (existingProfile && existingProfile.status !== "active")
+ ? [{ targetType: "company", targetId: companyId }] : [];
+ await lockToolAssignmentAgents(tx, companyId, [...existingBindings, ...bindingInputs, ...existingInstalls, ...companyTargets]);
// A renamed connection can leave its old profile name in use. Resolve
// names against profiles too, including when finalizing an installed draft.
const otherProfiles = await tx
@@ -14059,11 +14093,7 @@ export function toolAccessService(
let profileId: string;
if (existingProfile) {
if (input.preserveExistingAccess) {
- const priorBindings = await tx
- .select()
- .from(toolProfileBindings)
- .where(eq(toolProfileBindings.profileId, existingProfile.id));
- for (const prior of priorBindings)
+ for (const prior of existingBindings)
if (
!bindingInputs.some(
(binding) =>
@@ -14187,9 +14217,6 @@ export function toolAccessService(
// These connectors expose one agent-access choice. Commit installation
// reach and permission bindings together, including an empty selection.
if (isRemoteMcpConnectorMethod(connection.config.sourceTemplateKey, connection.config.connectionMethodKey)) {
- const existingInstalls = await tx.select().from(toolConnectionInstalls).where(and(
- eq(toolConnectionInstalls.companyId, companyId), eq(toolConnectionInstalls.connectionId, connection.id),
- ));
const desired = new Map(bindingInputs.flatMap((binding) => binding.targetType === "company" || binding.targetType === "agent"
? [[`${binding.targetType}:${binding.targetId}`, { targetType: binding.targetType, targetId: binding.targetId }] as const] : []));
const removed = existingInstalls.filter((install) => !desired.has(`${install.targetType}:${install.targetId}`));
@@ -18847,6 +18874,7 @@ export function toolAccessService(
profileId: string;
}> = [];
await db.transaction(async (tx) => {
+ await lockToolConnectionRuntimeInputs(tx, connection.companyId, connection.id);
if (markMcpAccessConfigured) {
// Preserve an explicit zero-agent selection through OAuth. Merge the
// marker in SQL so concurrent credential/config changes are retained.
@@ -18873,6 +18901,10 @@ export function toolAccessService(
(install) => `${install.targetType}:${install.targetId}`,
),
);
+ const bindings = await tx.select({ targetType: toolProfileBindings.targetType, targetId: toolProfileBindings.targetId })
+ .from(toolProfileBindings).innerJoin(toolProfiles, eq(toolProfiles.id, toolProfileBindings.profileId))
+ .where(and(eq(toolProfileBindings.companyId, connection.companyId), eq(toolProfiles.companyId, connection.companyId), eq(toolProfiles.profileKey, `app:${connection.id}`)));
+ await lockToolAssignmentAgents(tx, connection.companyId, [...existing, ...requested.values(), ...bindings]);
const removals = existing.filter(
(install) =>
!requested.has(`${install.targetType}:${install.targetId}`),
@@ -19753,14 +19785,19 @@ export function toolAccessService(
summary: ToolProfileSummary;
reassignedToProfileId: string | null;
reassignedBindingCount: number;
- }> => {
- const existing = await getProfileRow(profileId);
+ }> => db.transaction(async tx => {
+ const existing = await getProfileRow(profileId, undefined, tx);
+ const db = tx as unknown as Db;
+ await tx.select({ id: toolProfiles.id }).from(toolProfiles)
+ .where(and(eq(toolProfiles.companyId, existing.companyId), inArray(toolProfiles.id, [profileId, ...(input.reassignToProfileId ? [input.reassignToProfileId] : [])])))
+ .orderBy(toolProfiles.id).for("update");
+ await lockToolAssignmentAgents(tx, existing.companyId, [{ targetType: "company", targetId: existing.companyId }]);
if (input.force && input.reassignToProfileId) {
throw badRequest(
"Use either force or reassignToProfileId when deleting a tool profile, not both",
);
}
- const details = await profileDetails(existing.id, existing.companyId);
+ const details = await profileDetails(existing.id, existing.companyId, tx);
if (
details.summary.isCompanyDefault &&
!input.force &&
@@ -19782,6 +19819,7 @@ export function toolAccessService(
const target = await getProfileRow(
input.reassignToProfileId,
existing.companyId,
+ tx,
);
if (target.status !== "active") {
throw unprocessable(
@@ -19838,7 +19876,7 @@ export function toolAccessService(
reassignedToProfileId: input.reassignToProfileId ?? null,
reassignedBindingCount,
};
- },
+ }),
addProfileEntry: async (
profileId: string,
@@ -19936,12 +19974,15 @@ export function toolAccessService(
profileId: string,
input: CreateToolProfileBindingForProfile,
actor?: ActorInfo,
- ): Promise<ToolProfileBinding> => {
- const profile = await getProfileRow(profileId);
+ ): Promise<ToolProfileBinding> => db.transaction(async tx => {
+ const db = tx as unknown as Db;
+ const [profile] = await tx.select().from(toolProfiles).where(eq(toolProfiles.id, profileId)).for("no key update");
+ if (!profile) throw notFound("Tool profile not found");
await assertTargetExists(
profile.companyId,
input.targetType,
input.targetId,
+ tx,
);
const [row] = await db
.insert(toolProfileBindings)
@@ -19963,17 +20004,20 @@ export function toolAccessService(
.set({ updatedAt: new Date() })
.where(eq(toolProfiles.id, profile.id));
return toProfileBinding(row);
- },
+ }),
unbindProfile: async (
profileId: string,
input: UnbindToolProfileBinding,
- ): Promise<{ unbound: number }> => {
- const profile = await getProfileRow(profileId);
+ ): Promise<{ unbound: number }> => db.transaction(async tx => {
+ const db = tx as unknown as Db;
+ const [profile] = await tx.select().from(toolProfiles).where(eq(toolProfiles.id, profileId)).for("no key update");
+ if (!profile) throw notFound("Tool profile not found");
await assertTargetExists(
profile.companyId,
input.targetType,
input.targetId,
+ tx,
);
const rows = await db
.delete(toolProfileBindings)
@@ -19993,7 +20037,7 @@ export function toolAccessService(
.where(eq(toolProfiles.id, profile.id));
}
return { unbound: rows.length };
- },
+ }),
getEffectiveProfilesForAgent: async (
companyId: string,