@onequery/cli 0.1.63 → 0.1.64-darwin-arm64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +17 -24
- package/vendor/aarch64-apple-darwin/onequery/onequery +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/CompositeItem-BB408Cyb.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/CompositeList-DbbDW_rT.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/DialogTitle-ChNkcIa6.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/IconArrowRight-DsOD7mDl.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/IconCheck-Gc24xPT2.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/IconChevronDown-B-39MA7-.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/IconChevronRight-DD16tNHZ.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/IconCoins-C7Nn0L6R.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/IconHistory-DuLS8PKF.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/IconLoader2-BpZcTuHV.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/IconPlus-CZiRiEUF.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/IconTerminal2-PxNqcz3d.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/IconX-rRpRFwc5.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/Separator-M05FshHx.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/_authenticated-CcSc_Pt7.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/_org_slug-BvJDit6U.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/alert-BIGxI3XN.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/api-base-url-DIb6qukm.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/api-client-tp8XTpAa.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/api-paths-DcYkf-C_.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/app-routes-CMyon6Em.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/audit-CdPU9Jf2.js +2 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/auth-bootstrap-query-B1MHd_NV.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/auth-client-D-YHMy0G.js +3 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/avatar-SaFoLofF.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/badge-BFPkSrVD.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/budget-CX5MplAP.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/callback-BWQ3ETBy.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/card-Dllm2lhp.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/checkbox-Bii9Pcrx.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/compiler-runtime-DCc3R3Xn.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/connect-database-C1Jb2l53.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/copy-button-BO1KBdf9.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/create-org-BSzKv5ue.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/createReactComponent-_L2mp4Ui.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/data-source-connection-form-CbDL0cgG.js +273 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/device-Bbz7apAX.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/dist-BNi06Dzx.js +3 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/dropdown-menu-Cw2MW0pD.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/empty-DjRo5ytz.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/format-date-Rg05aHXh.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/getDisabledMountTransitionStyles-C0uz3iMh.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/getPseudoElementBounds-CRlxTrfr.js +12 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/home-BNjpNKdt.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/index-B4OsjuJp.css +2 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/index-CXR0dKJj.js +10 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/input-BRu0b1Tq.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/integrations-BWC7iPQ5.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/invite._invitationId-DmJnR4R5.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/jsx-runtime-DG_AJzB_.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/label-f2wVZcni.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/link-Cgvqhh5w.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/matchContext-CDajBC0L.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/organization-permissions-BXV_ess0.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/organization-query-keys-ieaSNxMR.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/query-CY--GYXb.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/query-timing-YBkSOxxF.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/queryOptions-bXtOUR_h.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/routes-CxJ2aoMf.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/schemas-EcBBwCo1.js +64 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/select-yNaL0SXM.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/separator-BH7Gsum-.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/settings-C8us2bWX.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/signin-BgfqB9QB.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/src-C5F1uEDb.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/team-CYPsHFTt.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/textarea-CnA77PLS.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/theme-toggle-CRaDbyxE.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/use-optimistic-mutation-3PPnMc-O.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/useBaseQuery-CO5Q8xm4.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/useBaseUiId-CtNp109T.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/useCompositeItem-D243hyne.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/useControlled-C-85HRFr.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/useQuery-DyOxsY45.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/useRender-CzpKCg11.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/useRouterState-DpT8luFk.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/useSuspenseQuery-CBFRU4At.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/useValueChanged-BNrgSVVM.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/utils-C8DGLIgm.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/xstate-react.esm-Bo3CCIRt.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/assets/zod-D0PWrP9q.js +1 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/favicon.ico +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/amplitude/step1_settings_sidebar.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/amplitude/step2_projects.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/amplitude/step3_project_keys.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/amplitude/step4_api_keys.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/bigquery/step1_service_accounts.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/bigquery/step2_bigquery_roles.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/bigquery/step3_add_key_menu.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/bigquery/step4_create_json_key.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/cloudflare-workers-observability/step2_enable_workers_logs.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/cloudflare-workers-observability/step3_user_api_tokens.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/cloudflare-workers-observability/step4_create_api_token.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/cloudflare-workers-observability/step5_workers_pages_account_id.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/cloudflare-workers-observability/step6_workers_observability_permission.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/ga4/step1_service_accounts.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/ga4/step2_create_json_key.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/ga4/step3_add_user_viewer.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/ga4/step4_property_details.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/github-token-guide/step1_signin.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/github-token-guide/step2_new_fine_grained_token_sanitized.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/github-token-guide/step3_permissions_configured_sanitized.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/github-token-guide/step4_token_created_sanitized.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/google-search-console/step1_confirm_property.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/google-search-console/step2_scope_selected.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/google-search-console/step3_copy_access_token.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/mixpanel/step1_service_accounts.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/mixpanel/step2_create_service_account.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/mixpanel/step3_credentials.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/mixpanel/step4_project_settings.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/postgresql/step1_create_user.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/postgresql/step2_connection.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/posthog/step1_project_settings.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/posthog/step2_personal_api_keys.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/posthog/step3_create_key_modal.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/rds/step1_connect.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/rds/step2_create_user.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/rds/step3_grant.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/rds/step4_info.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/sentry/step1_personal_tokens.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/sentry/step2_create_token_permissions.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/sentry/step3_organization_slug.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/sentry/step4_project_slug.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/vercel/step1_tokens_page.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/images/vercel/step2_configure_token.png +0 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/index.html +47 -0
- package/vendor/aarch64-apple-darwin/runtime/dashboard/onequery.svg +44 -0
- package/vendor/aarch64-apple-darwin/runtime/migrations/20260327065242_curious_nightmare.sql +403 -0
- package/vendor/aarch64-apple-darwin/runtime/migrations/20260403103652_slippery_hellfire_club.sql +8 -0
- package/vendor/aarch64-apple-darwin/runtime/migrations/20260403112219_gigantic_namora.sql +1 -0
- package/vendor/aarch64-apple-darwin/runtime/migrations/20260420071232_previous_justin_hammer.sql +141 -0
- package/vendor/aarch64-apple-darwin/runtime/migrations/20260420093157_spooky_cassandra_nova.sql +29 -0
- package/vendor/aarch64-apple-darwin/runtime/migrations/20260420101631_even_ogun.sql +5 -0
- package/vendor/aarch64-apple-darwin/runtime/migrations/20260425110519_smart_amazoness.sql +8 -0
- package/vendor/aarch64-apple-darwin/runtime/migrations/20260428033542_rename_source_query_interface_missing.sql +36 -0
- package/vendor/aarch64-apple-darwin/runtime/migrations/20260430114113_jittery_scorpion.sql +28 -0
- package/vendor/aarch64-apple-darwin/runtime/migrations/20260430135906_flippant_timeslip.sql +4 -0
- package/vendor/aarch64-apple-darwin/runtime/migrations/20260502000100_drop_old_workflow_audit_tables.sql +15 -0
- package/vendor/aarch64-apple-darwin/runtime/migrations/20260503011110_moaning_jack_flag.sql +22 -0
- package/vendor/aarch64-apple-darwin/runtime/migrations/20260514143216_reset_workflow_audit_history.sql +20 -0
- package/vendor/aarch64-apple-darwin/runtime/migrations/20260524081943_colorful_firelord.sql +1 -0
- package/vendor/aarch64-apple-darwin/runtime/migrations/meta/20260327065242_snapshot.json +2817 -0
- package/vendor/aarch64-apple-darwin/runtime/migrations/meta/20260403103652_snapshot.json +2864 -0
- package/vendor/aarch64-apple-darwin/runtime/migrations/meta/20260403112219_snapshot.json +2870 -0
- package/vendor/aarch64-apple-darwin/runtime/migrations/meta/20260420071232_snapshot.json +3879 -0
- package/vendor/aarch64-apple-darwin/runtime/migrations/meta/20260420093157_snapshot.json +4088 -0
- package/vendor/aarch64-apple-darwin/runtime/migrations/meta/20260420101631_snapshot.json +3250 -0
- package/vendor/aarch64-apple-darwin/runtime/migrations/meta/20260425110519_snapshot.json +3250 -0
- package/vendor/aarch64-apple-darwin/runtime/migrations/meta/20260428033542_snapshot.json +3250 -0
- package/vendor/aarch64-apple-darwin/runtime/migrations/meta/20260430114113_snapshot.json +3507 -0
- package/vendor/aarch64-apple-darwin/runtime/migrations/meta/20260430135906_snapshot.json +3531 -0
- package/vendor/aarch64-apple-darwin/runtime/migrations/meta/20260503011110_snapshot.json +3089 -0
- package/vendor/aarch64-apple-darwin/runtime/migrations/meta/20260524081943_snapshot.json +3082 -0
- package/vendor/aarch64-apple-darwin/runtime/migrations/meta/_journal.json +104 -0
- package/vendor/aarch64-apple-darwin/runtime/pglite/initdb.wasm +0 -0
- package/vendor/aarch64-apple-darwin/runtime/pglite/pglite.data +0 -0
- package/vendor/aarch64-apple-darwin/runtime/pglite/pglite.wasm +0 -0
- package/vendor/aarch64-apple-darwin/server/onequery-server.mjs +447932 -0
- package/vendor/aarch64-apple-darwin/server/polyglot_sql_wasm_bg.wasm +0 -0
- package/bin/onequery.js +0 -266
- package/bin/package-constants.d.ts +0 -75
- package/bin/package-constants.js +0 -160
- package/runtime-bundle.json +0 -55
package/vendor/aarch64-apple-darwin/runtime/migrations/20260420071232_previous_justin_hammer.sql
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
CREATE TABLE "audit_projection_checkpoints" (
|
|
2
|
+
"family" text NOT NULL,
|
|
3
|
+
"last_commit_position" bigint DEFAULT 0 NOT NULL,
|
|
4
|
+
"projection_name" text NOT NULL,
|
|
5
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
6
|
+
);
|
|
7
|
+
--> statement-breakpoint
|
|
8
|
+
ALTER TABLE "audit_projection_checkpoints" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint
|
|
9
|
+
CREATE TABLE "query_actions" (
|
|
10
|
+
"completed_at" timestamp with time zone,
|
|
11
|
+
"failure_code" text,
|
|
12
|
+
"id" text PRIMARY KEY NOT NULL,
|
|
13
|
+
"last_event_id" text NOT NULL,
|
|
14
|
+
"last_event_sequence" integer NOT NULL,
|
|
15
|
+
"organization_id" text NOT NULL,
|
|
16
|
+
"outcome" text NOT NULL,
|
|
17
|
+
"phase" text NOT NULL,
|
|
18
|
+
"query_mode" text NOT NULL,
|
|
19
|
+
"query_text" text NOT NULL,
|
|
20
|
+
"source_descriptor_json" jsonb,
|
|
21
|
+
"started_at" timestamp with time zone NOT NULL,
|
|
22
|
+
"usage_recording_status" text NOT NULL,
|
|
23
|
+
"validated_query" text,
|
|
24
|
+
CONSTRAINT "query_actions_completed_at_outcome_check" CHECK ((("query_actions"."outcome" = 'pending' and "query_actions"."completed_at" is null) or ("query_actions"."outcome" <> 'pending' and "query_actions"."completed_at" is not null))),
|
|
25
|
+
CONSTRAINT "query_actions_completed_phase_outcome_check" CHECK ((("query_actions"."outcome" = 'pending' and "query_actions"."phase" <> 'completed') or ("query_actions"."outcome" <> 'pending' and "query_actions"."phase" = 'completed'))),
|
|
26
|
+
CONSTRAINT "query_actions_failure_code_outcome_check" CHECK ((("query_actions"."outcome" = 'failed' and "query_actions"."failure_code" is not null) or ("query_actions"."outcome" <> 'failed' and "query_actions"."failure_code" is null))),
|
|
27
|
+
CONSTRAINT "query_actions_last_event_sequence_positive_check" CHECK ("query_actions"."last_event_sequence" > 0)
|
|
28
|
+
);
|
|
29
|
+
--> statement-breakpoint
|
|
30
|
+
ALTER TABLE "query_actions" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint
|
|
31
|
+
CREATE TABLE "query_action_events" (
|
|
32
|
+
"action_id" text NOT NULL,
|
|
33
|
+
"command_id" text NOT NULL,
|
|
34
|
+
"commit_position" bigserial NOT NULL,
|
|
35
|
+
"event_type" text NOT NULL,
|
|
36
|
+
"id" text PRIMARY KEY NOT NULL,
|
|
37
|
+
"occurred_at" timestamp with time zone NOT NULL,
|
|
38
|
+
"payload_json" jsonb NOT NULL,
|
|
39
|
+
"sequence" integer NOT NULL
|
|
40
|
+
);
|
|
41
|
+
--> statement-breakpoint
|
|
42
|
+
ALTER TABLE "query_action_events" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint
|
|
43
|
+
CREATE TABLE "source_api_actions" (
|
|
44
|
+
"attempt_number" integer,
|
|
45
|
+
"completed_at" timestamp with time zone,
|
|
46
|
+
"failure_code" text,
|
|
47
|
+
"id" text PRIMARY KEY NOT NULL,
|
|
48
|
+
"invoke_mode" text,
|
|
49
|
+
"last_event_id" text NOT NULL,
|
|
50
|
+
"last_event_sequence" integer NOT NULL,
|
|
51
|
+
"organization_id" text NOT NULL,
|
|
52
|
+
"outcome" text NOT NULL,
|
|
53
|
+
"page_progress_json" jsonb,
|
|
54
|
+
"phase" text NOT NULL,
|
|
55
|
+
"prepared_request_fingerprint" text,
|
|
56
|
+
"request_descriptor_json" jsonb,
|
|
57
|
+
"request_kind" text NOT NULL,
|
|
58
|
+
"source_descriptor_json" jsonb,
|
|
59
|
+
"started_at" timestamp with time zone NOT NULL,
|
|
60
|
+
CONSTRAINT "source_api_actions_completed_at_outcome_check" CHECK ((("source_api_actions"."outcome" = 'pending' and "source_api_actions"."completed_at" is null) or ("source_api_actions"."outcome" <> 'pending' and "source_api_actions"."completed_at" is not null))),
|
|
61
|
+
CONSTRAINT "source_api_actions_completed_phase_outcome_check" CHECK ((("source_api_actions"."outcome" = 'pending' and "source_api_actions"."phase" <> 'completed') or ("source_api_actions"."outcome" <> 'pending' and "source_api_actions"."phase" = 'completed'))),
|
|
62
|
+
CONSTRAINT "source_api_actions_failure_code_outcome_check" CHECK ((("source_api_actions"."outcome" = 'failed' and "source_api_actions"."failure_code" is not null) or ("source_api_actions"."outcome" <> 'failed' and "source_api_actions"."failure_code" is null))),
|
|
63
|
+
CONSTRAINT "source_api_actions_last_event_sequence_positive_check" CHECK ("source_api_actions"."last_event_sequence" > 0)
|
|
64
|
+
);
|
|
65
|
+
--> statement-breakpoint
|
|
66
|
+
ALTER TABLE "source_api_actions" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint
|
|
67
|
+
CREATE TABLE "source_api_action_events" (
|
|
68
|
+
"action_id" text NOT NULL,
|
|
69
|
+
"command_id" text NOT NULL,
|
|
70
|
+
"commit_position" bigserial NOT NULL,
|
|
71
|
+
"event_type" text NOT NULL,
|
|
72
|
+
"id" text PRIMARY KEY NOT NULL,
|
|
73
|
+
"occurred_at" timestamp with time zone NOT NULL,
|
|
74
|
+
"payload_json" jsonb NOT NULL,
|
|
75
|
+
"sequence" integer NOT NULL
|
|
76
|
+
);
|
|
77
|
+
--> statement-breakpoint
|
|
78
|
+
ALTER TABLE "source_api_action_events" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint
|
|
79
|
+
CREATE TABLE "workflow_commands" (
|
|
80
|
+
"action_id" text,
|
|
81
|
+
"actor_snapshot_json" jsonb NOT NULL,
|
|
82
|
+
"caused_by_event_id" text,
|
|
83
|
+
"command_invocation_id" text NOT NULL,
|
|
84
|
+
"command_payload_json" jsonb NOT NULL,
|
|
85
|
+
"command_type" text NOT NULL,
|
|
86
|
+
"created_at" timestamp with time zone NOT NULL,
|
|
87
|
+
"decision_kind" text NOT NULL,
|
|
88
|
+
"family" text NOT NULL,
|
|
89
|
+
"id" text PRIMARY KEY NOT NULL,
|
|
90
|
+
"organization_id" text NOT NULL,
|
|
91
|
+
"reject_code" text,
|
|
92
|
+
"reject_detail" text,
|
|
93
|
+
"request_id" text NOT NULL,
|
|
94
|
+
"surface" text NOT NULL,
|
|
95
|
+
CONSTRAINT "workflow_commands_decision_reject_alignment_check" CHECK ((("workflow_commands"."decision_kind" = 'rejected' and "workflow_commands"."reject_code" is not null) or ("workflow_commands"."decision_kind" = 'accepted' and "workflow_commands"."reject_code" is null))),
|
|
96
|
+
CONSTRAINT "workflow_commands_accepted_action_id_check" CHECK (("workflow_commands"."decision_kind" = 'rejected' or "workflow_commands"."action_id" is not null))
|
|
97
|
+
);
|
|
98
|
+
--> statement-breakpoint
|
|
99
|
+
ALTER TABLE "workflow_commands" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint
|
|
100
|
+
CREATE TABLE "workflow_effect_dispatches" (
|
|
101
|
+
"action_id" text NOT NULL,
|
|
102
|
+
"attempt_count" integer DEFAULT 0 NOT NULL,
|
|
103
|
+
"available_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
104
|
+
"completed_at" timestamp with time zone,
|
|
105
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
106
|
+
"effect_key" text NOT NULL,
|
|
107
|
+
"effect_type" text NOT NULL,
|
|
108
|
+
"family" text NOT NULL,
|
|
109
|
+
"id" text PRIMARY KEY NOT NULL,
|
|
110
|
+
"last_error_code" text,
|
|
111
|
+
"last_error_detail" text,
|
|
112
|
+
"leased_until" timestamp with time zone,
|
|
113
|
+
"origin_event_id" text NOT NULL,
|
|
114
|
+
"payload_json" jsonb NOT NULL,
|
|
115
|
+
"status" text DEFAULT 'pending' NOT NULL,
|
|
116
|
+
CONSTRAINT "workflow_effect_dispatches_completion_status_check" CHECK ((("workflow_effect_dispatches"."status" = 'completed' and "workflow_effect_dispatches"."completed_at" is not null) or ("workflow_effect_dispatches"."status" <> 'completed' and "workflow_effect_dispatches"."completed_at" is null)))
|
|
117
|
+
);
|
|
118
|
+
--> statement-breakpoint
|
|
119
|
+
ALTER TABLE "workflow_effect_dispatches" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint
|
|
120
|
+
ALTER TABLE "query_actions" ADD CONSTRAINT "query_actions_organization_id_organization_id_fk" FOREIGN KEY ("organization_id") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
121
|
+
ALTER TABLE "query_action_events" ADD CONSTRAINT "query_action_events_action_id_query_actions_id_fk" FOREIGN KEY ("action_id") REFERENCES "public"."query_actions"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
122
|
+
ALTER TABLE "query_action_events" ADD CONSTRAINT "query_action_events_command_id_workflow_commands_id_fk" FOREIGN KEY ("command_id") REFERENCES "public"."workflow_commands"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
123
|
+
ALTER TABLE "source_api_actions" ADD CONSTRAINT "source_api_actions_organization_id_organization_id_fk" FOREIGN KEY ("organization_id") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
124
|
+
ALTER TABLE "source_api_action_events" ADD CONSTRAINT "source_api_action_events_action_id_source_api_actions_id_fk" FOREIGN KEY ("action_id") REFERENCES "public"."source_api_actions"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
125
|
+
ALTER TABLE "source_api_action_events" ADD CONSTRAINT "source_api_action_events_command_id_workflow_commands_id_fk" FOREIGN KEY ("command_id") REFERENCES "public"."workflow_commands"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
126
|
+
ALTER TABLE "workflow_commands" ADD CONSTRAINT "workflow_commands_organization_id_organization_id_fk" FOREIGN KEY ("organization_id") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
127
|
+
CREATE UNIQUE INDEX "idx_audit_projection_checkpoints_projection_family_unique" ON "audit_projection_checkpoints" USING btree ("projection_name","family");--> statement-breakpoint
|
|
128
|
+
CREATE INDEX "idx_query_actions_org_started" ON "query_actions" USING btree ("organization_id","started_at");--> statement-breakpoint
|
|
129
|
+
CREATE UNIQUE INDEX "idx_query_action_events_action_sequence_unique" ON "query_action_events" USING btree ("action_id","sequence");--> statement-breakpoint
|
|
130
|
+
CREATE UNIQUE INDEX "idx_query_action_events_commit_position_unique" ON "query_action_events" USING btree ("commit_position");--> statement-breakpoint
|
|
131
|
+
CREATE INDEX "idx_query_action_events_command_sequence" ON "query_action_events" USING btree ("command_id","sequence");--> statement-breakpoint
|
|
132
|
+
CREATE INDEX "idx_source_api_actions_org_started" ON "source_api_actions" USING btree ("organization_id","started_at");--> statement-breakpoint
|
|
133
|
+
CREATE UNIQUE INDEX "idx_source_api_action_events_action_sequence_unique" ON "source_api_action_events" USING btree ("action_id","sequence");--> statement-breakpoint
|
|
134
|
+
CREATE UNIQUE INDEX "idx_source_api_action_events_commit_position_unique" ON "source_api_action_events" USING btree ("commit_position");--> statement-breakpoint
|
|
135
|
+
CREATE INDEX "idx_source_api_action_events_command_sequence" ON "source_api_action_events" USING btree ("command_id","sequence");--> statement-breakpoint
|
|
136
|
+
CREATE UNIQUE INDEX "idx_workflow_commands_family_invocation_unique" ON "workflow_commands" USING btree ("family","command_invocation_id");--> statement-breakpoint
|
|
137
|
+
CREATE INDEX "idx_workflow_commands_action_created" ON "workflow_commands" USING btree ("family","action_id","created_at");--> statement-breakpoint
|
|
138
|
+
CREATE INDEX "idx_workflow_commands_org_created" ON "workflow_commands" USING btree ("organization_id","created_at");--> statement-breakpoint
|
|
139
|
+
CREATE UNIQUE INDEX "idx_workflow_effect_dispatches_effect_key_unique" ON "workflow_effect_dispatches" USING btree ("effect_key");--> statement-breakpoint
|
|
140
|
+
CREATE INDEX "idx_workflow_effect_dispatches_status_available" ON "workflow_effect_dispatches" USING btree ("status","available_at");--> statement-breakpoint
|
|
141
|
+
CREATE INDEX "idx_workflow_effect_dispatches_family_action_created" ON "workflow_effect_dispatches" USING btree ("family","action_id","created_at");
|
package/vendor/aarch64-apple-darwin/runtime/migrations/20260420093157_spooky_cassandra_nova.sql
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
CREATE TABLE "audit_feed_entries" (
|
|
2
|
+
"action_name" text NOT NULL,
|
|
3
|
+
"completed_at" timestamp with time zone,
|
|
4
|
+
"failure_code" text,
|
|
5
|
+
"family" text NOT NULL,
|
|
6
|
+
"family_action_id" text NOT NULL,
|
|
7
|
+
"family_preview_json" jsonb,
|
|
8
|
+
"last_event_at" timestamp with time zone NOT NULL,
|
|
9
|
+
"last_projected_sequence" integer NOT NULL,
|
|
10
|
+
"last_event_type" text NOT NULL,
|
|
11
|
+
"metrics_json" jsonb,
|
|
12
|
+
"organization_id" text NOT NULL,
|
|
13
|
+
"origin_actor_json" jsonb NOT NULL,
|
|
14
|
+
"origin_surface" text NOT NULL,
|
|
15
|
+
"outcome" text NOT NULL,
|
|
16
|
+
"phase" text NOT NULL,
|
|
17
|
+
"search_document" text NOT NULL,
|
|
18
|
+
"started_at" timestamp with time zone NOT NULL,
|
|
19
|
+
"subtitle" text NOT NULL,
|
|
20
|
+
"target_json" jsonb NOT NULL,
|
|
21
|
+
"title" text NOT NULL,
|
|
22
|
+
CONSTRAINT "audit_feed_entries_family_action_pk" PRIMARY KEY("family","family_action_id")
|
|
23
|
+
);
|
|
24
|
+
--> statement-breakpoint
|
|
25
|
+
ALTER TABLE "audit_feed_entries" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint
|
|
26
|
+
ALTER TABLE "audit_projection_checkpoints" ALTER COLUMN "last_commit_position" SET DEFAULT 0;--> statement-breakpoint
|
|
27
|
+
ALTER TABLE "audit_feed_entries" ADD CONSTRAINT "audit_feed_entries_organization_id_organization_id_fk" FOREIGN KEY ("organization_id") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
28
|
+
CREATE INDEX "idx_audit_feed_entries_org_started_identity" ON "audit_feed_entries" USING btree ("organization_id","started_at","family","family_action_id");--> statement-breakpoint
|
|
29
|
+
CREATE INDEX "idx_audit_feed_entries_org_family_started" ON "audit_feed_entries" USING btree ("organization_id","family","started_at");
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
DROP TABLE "cli_query_actions" CASCADE;--> statement-breakpoint
|
|
2
|
+
DROP TABLE "cli_query_action_events" CASCADE;--> statement-breakpoint
|
|
3
|
+
ALTER TABLE "query_action_events" DROP CONSTRAINT "query_action_events_action_id_query_actions_id_fk";
|
|
4
|
+
--> statement-breakpoint
|
|
5
|
+
ALTER TABLE "source_api_action_events" DROP CONSTRAINT "source_api_action_events_action_id_source_api_actions_id_fk";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
ALTER TABLE "query_action_events" ADD COLUMN "payload_bytes" "bytea" NOT NULL;--> statement-breakpoint
|
|
2
|
+
ALTER TABLE "source_api_action_events" ADD COLUMN "payload_bytes" "bytea" NOT NULL;--> statement-breakpoint
|
|
3
|
+
ALTER TABLE "workflow_commands" ADD COLUMN "command_payload_bytes" "bytea" NOT NULL;--> statement-breakpoint
|
|
4
|
+
ALTER TABLE "workflow_effect_dispatches" ADD COLUMN "payload_bytes" "bytea" NOT NULL;--> statement-breakpoint
|
|
5
|
+
ALTER TABLE "query_action_events" DROP COLUMN "payload_json";--> statement-breakpoint
|
|
6
|
+
ALTER TABLE "source_api_action_events" DROP COLUMN "payload_json";--> statement-breakpoint
|
|
7
|
+
ALTER TABLE "workflow_commands" DROP COLUMN "command_payload_json";--> statement-breakpoint
|
|
8
|
+
ALTER TABLE "workflow_effect_dispatches" DROP COLUMN "payload_json";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
UPDATE "workflow_commands"
|
|
2
|
+
SET "command_type" = 'record_source_query_interface_missing'
|
|
3
|
+
WHERE "family" = 'query_action'
|
|
4
|
+
AND "command_type" = 'record_source_not_queryable';
|
|
5
|
+
--> statement-breakpoint
|
|
6
|
+
UPDATE "query_action_events"
|
|
7
|
+
SET "event_type" = 'source_query_interface_missing'
|
|
8
|
+
WHERE "event_type" = 'source_not_queryable';
|
|
9
|
+
--> statement-breakpoint
|
|
10
|
+
UPDATE "query_actions"
|
|
11
|
+
SET "failure_code" = 'source_query_interface_missing'
|
|
12
|
+
WHERE "failure_code" = 'source_not_queryable';
|
|
13
|
+
--> statement-breakpoint
|
|
14
|
+
UPDATE "audit_feed_entries"
|
|
15
|
+
SET
|
|
16
|
+
"failure_code" = CASE
|
|
17
|
+
WHEN "failure_code" = 'source_not_queryable'
|
|
18
|
+
THEN 'source_query_interface_missing'
|
|
19
|
+
ELSE "failure_code"
|
|
20
|
+
END,
|
|
21
|
+
"last_event_type" = CASE
|
|
22
|
+
WHEN "last_event_type" = 'source_not_queryable'
|
|
23
|
+
THEN 'source_query_interface_missing'
|
|
24
|
+
ELSE "last_event_type"
|
|
25
|
+
END,
|
|
26
|
+
"search_document" = replace(
|
|
27
|
+
"search_document",
|
|
28
|
+
'source_not_queryable',
|
|
29
|
+
'source_query_interface_missing'
|
|
30
|
+
)
|
|
31
|
+
WHERE "family" = 'query_action'
|
|
32
|
+
AND (
|
|
33
|
+
"failure_code" = 'source_not_queryable'
|
|
34
|
+
OR "last_event_type" = 'source_not_queryable'
|
|
35
|
+
OR "search_document" LIKE '%source_not_queryable%'
|
|
36
|
+
);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
CREATE TABLE "workflow_journal" (
|
|
2
|
+
"command_invocation_id" text,
|
|
3
|
+
"commit_id" text NOT NULL,
|
|
4
|
+
"commit_position" bigserial NOT NULL,
|
|
5
|
+
"entry_kind" text NOT NULL,
|
|
6
|
+
"event_id" text,
|
|
7
|
+
"event_type" text,
|
|
8
|
+
"effect_id" text,
|
|
9
|
+
"effect_type" text,
|
|
10
|
+
"family" text NOT NULL,
|
|
11
|
+
"id" text PRIMARY KEY NOT NULL,
|
|
12
|
+
"occurred_at" timestamp with time zone NOT NULL,
|
|
13
|
+
"organization_id" text NOT NULL,
|
|
14
|
+
"payload_bytes" "bytea",
|
|
15
|
+
"payload_type" text,
|
|
16
|
+
"stream_id" text NOT NULL,
|
|
17
|
+
"stream_position" integer NOT NULL,
|
|
18
|
+
CONSTRAINT "workflow_journal_command_invocation_check" CHECK (("workflow_journal"."entry_kind" = 'command' and "workflow_journal"."command_invocation_id" is not null) or ("workflow_journal"."entry_kind" <> 'command' and "workflow_journal"."command_invocation_id" is null))
|
|
19
|
+
);
|
|
20
|
+
--> statement-breakpoint
|
|
21
|
+
ALTER TABLE "workflow_journal" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint
|
|
22
|
+
ALTER TABLE "workflow_journal" ADD CONSTRAINT "workflow_journal_organization_id_organization_id_fk" FOREIGN KEY ("organization_id") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
23
|
+
CREATE UNIQUE INDEX "idx_workflow_journal_stream_position_unique" ON "workflow_journal" USING btree ("family","stream_id","stream_position");--> statement-breakpoint
|
|
24
|
+
CREATE UNIQUE INDEX "idx_workflow_journal_commit_position_unique" ON "workflow_journal" USING btree ("commit_position");--> statement-breakpoint
|
|
25
|
+
CREATE UNIQUE INDEX "idx_workflow_journal_command_invocation_unique" ON "workflow_journal" USING btree ("family","command_invocation_id");--> statement-breakpoint
|
|
26
|
+
CREATE INDEX "idx_workflow_journal_commit" ON "workflow_journal" USING btree ("commit_id");--> statement-breakpoint
|
|
27
|
+
CREATE INDEX "idx_workflow_journal_stream" ON "workflow_journal" USING btree ("family","stream_id","stream_position");--> statement-breakpoint
|
|
28
|
+
CREATE INDEX "idx_workflow_journal_effect" ON "workflow_journal" USING btree ("family","stream_id","effect_id");
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
ALTER TABLE "workflow_journal" ADD COLUMN "actor_snapshot_json" jsonb;--> statement-breakpoint
|
|
2
|
+
ALTER TABLE "workflow_journal" ADD COLUMN "caused_by_event_id" text;--> statement-breakpoint
|
|
3
|
+
ALTER TABLE "workflow_journal" ADD COLUMN "request_id" text;--> statement-breakpoint
|
|
4
|
+
ALTER TABLE "workflow_journal" ADD COLUMN "surface" text;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
-- Comment: this is a custom data migration because the journal migration cannot
|
|
2
|
+
-- be generated from the target Drizzle schema alone.
|
|
3
|
+
--
|
|
4
|
+
-- Drop legacy workflow/audit history instead of backfilling it. The old runtime
|
|
5
|
+
-- command payloads are not part of the new composite journal contract, so
|
|
6
|
+
-- preserving them would create decode/replay compatibility risk.
|
|
7
|
+
DELETE FROM "audit_feed_entries";--> statement-breakpoint
|
|
8
|
+
DELETE FROM "query_actions";--> statement-breakpoint
|
|
9
|
+
DELETE FROM "source_api_actions";--> statement-breakpoint
|
|
10
|
+
DELETE FROM "audit_projection_checkpoints"
|
|
11
|
+
WHERE "projection_name" IN ('audit_feed', 'audit_feed_entries');--> statement-breakpoint
|
|
12
|
+
DROP TABLE IF EXISTS "workflow_effect_dispatches" CASCADE;--> statement-breakpoint
|
|
13
|
+
DROP TABLE IF EXISTS "query_action_events" CASCADE;--> statement-breakpoint
|
|
14
|
+
DROP TABLE IF EXISTS "source_api_action_events" CASCADE;--> statement-breakpoint
|
|
15
|
+
DROP TABLE IF EXISTS "workflow_commands" CASCADE;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
CREATE TABLE "pending_workflow_effects" (
|
|
2
|
+
"attempt_count" integer DEFAULT 0 NOT NULL,
|
|
3
|
+
"effect_id" text NOT NULL,
|
|
4
|
+
"effect_type" text NOT NULL,
|
|
5
|
+
"family" text NOT NULL,
|
|
6
|
+
"last_error_code" text,
|
|
7
|
+
"last_error_detail" text,
|
|
8
|
+
"last_started_at" timestamp with time zone,
|
|
9
|
+
"organization_id" text NOT NULL,
|
|
10
|
+
"payload_bytes" "bytea" NOT NULL,
|
|
11
|
+
"scheduled_at" timestamp with time zone NOT NULL,
|
|
12
|
+
"scheduled_by_entry_id" text NOT NULL,
|
|
13
|
+
"status" text NOT NULL,
|
|
14
|
+
"stream_id" text NOT NULL,
|
|
15
|
+
"stream_position" integer NOT NULL
|
|
16
|
+
);
|
|
17
|
+
--> statement-breakpoint
|
|
18
|
+
ALTER TABLE "pending_workflow_effects" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint
|
|
19
|
+
ALTER TABLE "pending_workflow_effects" ADD CONSTRAINT "pending_workflow_effects_organization_id_organization_id_fk" FOREIGN KEY ("organization_id") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
20
|
+
CREATE UNIQUE INDEX "idx_pending_workflow_effects_family_effect_unique" ON "pending_workflow_effects" USING btree ("family","effect_id");--> statement-breakpoint
|
|
21
|
+
CREATE INDEX "idx_pending_workflow_effects_worker_scan" ON "pending_workflow_effects" USING btree ("family","organization_id","status","scheduled_at");--> statement-breakpoint
|
|
22
|
+
CREATE INDEX "idx_pending_workflow_effects_stream" ON "pending_workflow_effects" USING btree ("family","stream_id");
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
-- Comment: this internal workflow/audit history uses protobuf payload bytes.
|
|
2
|
+
-- The provider catalog migration intentionally changed those durable payload
|
|
3
|
+
-- shapes, so replaying old rows with the new codecs would create decode risk.
|
|
4
|
+
-- These tables back internal test tooling only, so reset the history instead
|
|
5
|
+
-- of carrying compatibility shims for the old payload contract.
|
|
6
|
+
DELETE FROM "pending_workflow_effects"
|
|
7
|
+
WHERE "family" IN ('query_action', 'source_api_action');--> statement-breakpoint
|
|
8
|
+
|
|
9
|
+
DELETE FROM "audit_feed_entries"
|
|
10
|
+
WHERE "family" IN ('query_action', 'source_api_action');--> statement-breakpoint
|
|
11
|
+
|
|
12
|
+
DELETE FROM "query_actions";--> statement-breakpoint
|
|
13
|
+
DELETE FROM "source_api_actions";--> statement-breakpoint
|
|
14
|
+
|
|
15
|
+
DELETE FROM "audit_projection_checkpoints"
|
|
16
|
+
WHERE "projection_name" IN ('audit_feed', 'audit_feed_entries')
|
|
17
|
+
AND "family" IN ('query_action', 'source_api_action');--> statement-breakpoint
|
|
18
|
+
|
|
19
|
+
DELETE FROM "workflow_journal"
|
|
20
|
+
WHERE "family" IN ('query_action', 'source_api_action');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ALTER TABLE "data_sources" DROP COLUMN "use_as_data_source";
|