From 8482b17b8715dc71778239d944d21cf149e376e7 Mon Sep 17 00:00:00 2001 From: Dotta Date: Tue, 10 Nov 2026 09:20:29 -0600 Subject: [PATCH] Generate current hosted Dot cutover migration --- .../src/migrations/0457_magical_luckman.sql | 1 + ...{0452_snapshot.json => 0457_snapshot.json} | 156 +++++++++++++++++- packages/db/src/migrations/meta/_journal.json | 7 + 3 files changed, 162 insertions(+), 2 deletions(-) create mode 100644 packages/db/src/migrations/0457_magical_luckman.sql rename packages/db/src/migrations/meta/{0452_snapshot.json => 0457_snapshot.json} (99%) diff --git a/packages/db/src/migrations/0457_magical_luckman.sql b/packages/db/src/migrations/0457_magical_luckman.sql new file mode 100644 index 00000000000..eaa84a454dd --- /dev/null +++ b/packages/db/src/migrations/0457_magical_luckman.sql @@ -0,0 +1 @@ +ALTER TABLE "mcp_oauth_client_mirror_state" ADD COLUMN "dot_device_cutover" jsonb; \ No newline at end of file diff --git a/packages/db/src/migrations/meta/0452_snapshot.json b/packages/db/src/migrations/meta/0457_snapshot.json similarity index 99% rename from packages/db/src/migrations/meta/0452_snapshot.json rename to packages/db/src/migrations/meta/0457_snapshot.json index 082e8419e84..4265dc69217 100644 --- a/packages/db/src/migrations/meta/0452_snapshot.json +++ b/packages/db/src/migrations/meta/0457_snapshot.json @@ -1,6 +1,6 @@ { - "id": "64e8be1e-e0cb-4cd8-85e0-0fdcce5eafde", - "prevId": "b5699366-77c2-48c8-b7dc-658a75de7658", + "id": "54755f92-a986-44e4-beea-94a72e79076d", + "prevId": "a2606b41-36c2-4eb5-a59d-28cc730bc455", "version": "7", "dialect": "postgresql", "tables": { @@ -10955,6 +10955,28 @@ "concurrently": false, "method": "btree", "with": {} + }, + "chat_deliveries_github_automatic_delivery_idx": { + "name": "chat_deliveries_github_automatic_delivery_idx", + "columns": [ + { + "expression": "endpoint_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "(\"normalized_event\"->'githubAutomatic'->'context'->>'deliveryId')", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "(\"chat_deliveries\".\"normalized_event\"->'githubAutomatic'->'context'->>'deliveryId') is not null", + "concurrently": true, + "method": "btree", + "with": {} } }, "foreignKeys": { @@ -12393,6 +12415,44 @@ "concurrently": false, "method": "btree", "with": {} + }, + "chat_message_links_company_comment_idx": { + "name": "chat_message_links_company_comment_idx", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "comment_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"chat_message_links\".\"comment_id\" is not null", + "concurrently": true, + "method": "btree", + "with": {} + }, + "chat_message_links_delivery_idx": { + "name": "chat_message_links_delivery_idx", + "columns": [ + { + "expression": "delivery_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"chat_message_links\".\"delivery_id\" is not null", + "concurrently": true, + "method": "btree", + "with": {} } }, "foreignKeys": { @@ -34552,6 +34612,34 @@ "concurrently": false, "method": "btree", "with": {} + }, + "heartbeat_run_events_retry_exhausted_idx": { + "name": "heartbeat_run_events_retry_exhausted_idx", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "run_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": false, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"heartbeat_run_events\".\"event_type\" = 'lifecycle' and \"heartbeat_run_events\".\"message\" like 'Bounded retry exhausted%'", + "concurrently": true, + "method": "btree", + "with": {} } }, "foreignKeys": { @@ -35393,6 +35481,22 @@ "method": "btree", "with": {} }, + "heartbeat_runs_pending_budget_cancellation_idx": { + "name": "heartbeat_runs_pending_budget_cancellation_idx", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "jsonb_typeof(\"heartbeat_runs\".\"result_json\"->'startupCancellation'->'budgetEnforcement') = 'object'\n and \"heartbeat_runs\".\"result_json\"->'startupCancellation'->'budgetEnforcement'->>'deliveredAt' is null", + "concurrently": true, + "method": "btree", + "with": {} + }, "heartbeat_runs_tree_hold_suppression_idx": { "name": "heartbeat_runs_tree_hold_suppression_idx", "columns": [ @@ -35431,6 +35535,27 @@ "method": "btree", "with": {} }, + "heartbeat_runs_company_wake_comment_idx": { + "name": "heartbeat_runs_company_wake_comment_idx", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "(\"context_snapshot\"->>'wakeCommentId')", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, "heartbeat_runs_cost_accounting_pending_idx": { "name": "heartbeat_runs_cost_accounting_pending_idx", "columns": [ @@ -35562,6 +35687,27 @@ "method": "btree", "with": {} }, + "heartbeat_runs_company_native_workspace_idx": { + "name": "heartbeat_runs_company_native_workspace_idx", + "columns": [ + { + "expression": "company_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "(\"runner_profile_json\"->'nativeWorkspaceSync'->>'workspaceId')", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, "heartbeat_runs_company_issue_created_idx": { "name": "heartbeat_runs_company_issue_created_idx", "columns": [ @@ -64789,6 +64935,12 @@ "notNull": true, "default": false }, + "dot_device_cutover": { + "name": "dot_device_cutover", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, "device_cutover_stack_id": { "name": "device_cutover_stack_id", "type": "text", diff --git a/packages/db/src/migrations/meta/_journal.json b/packages/db/src/migrations/meta/_journal.json index 6da1ec71b79..4201ff62fc5 100644 --- a/packages/db/src/migrations/meta/_journal.json +++ b/packages/db/src/migrations/meta/_journal.json @@ -3186,6 +3186,13 @@ "when": 1794270045155, "tag": "0456_chat_review_lookup_indexes", "breakpoints": true + }, + { + "idx": 457, + "version": "7", + "when": 1794323727417, + "tag": "0457_magical_luckman", + "breakpoints": true } ] } \ No newline at end of file