diff --git a/docs/server-reference.md b/docs/server-reference.md index 4a6be5b53..640b50311 100644 --- a/docs/server-reference.md +++ b/docs/server-reference.md @@ -1258,10 +1258,38 @@ with at most 64 Unicode scalars / 256 UTF-8 bytes. The nullable UTC timestamp preserves six fractional digits, for example `2026-11-05T12:00:01.123456Z`, and matches describe's `info.last_skipped_at`. Invalid or oversized stored values return HTTP 503 `storage_unavailable`. A later successful fire preserves an -earlier skip, so this pair is not the latest overall dispatch outcome. Full -last-dispatch/buffer summaries and published capability remain pending Server -#1014. An empty list cannot prove pair support; consumers retain describe -fallback and their current polling policy. +earlier skip, so this pair is not the latest overall dispatch outcome. The +dispatch summary has its own authority below. An empty list cannot prove +support for either contract. + +Native list rows and describe responses also carry a top-level +`dispatch_summary` v1. Older producers omit it. The complete object contains +`version`, `state`, `last_outcome` and `buffered_actions_count`: + +| State | Last outcome | Current buffer count | +| --- | --- | --- | +| `known` | Complete recorded dispatch | Integer from 0 through 9007199254740991 | +| `never` | `null`, established only by new creation | `0` | +| `unavailable` | `null`, including legacy or invalid stored authority | `null` | + +A known outcome has exactly `id`, `outcome`, `recorded_at`, `reason`, +`workflow_instance_id` and `workflow_run_id`. Outcomes are `started`, `buffered`, +`skipped` or `failed`. Started outcomes name both new uppercase ULIDs and have +a null reason. Other outcomes have null workflow identities. Skipped and failed +outcomes keep the complete reason, including empty strings and whitespace; +buffered outcomes have a null reason. Times are UTC with six fractional digits. +The complete summary is bounded to 4096 serialized UTF-8 bytes. An outcome that +cannot fit the complete contract replaces earlier authority with unavailable +without changing the underlying scheduling operation or truncating its reason. + +A valid unavailable summary overrides older legacy outcome evidence. Absent, +null, partial or unsupported summaries provide no v1 authority. A later describe +owns the whole summary, including absence or null; do not merge it with a list +snapshot. Count-only buffer changes retain the outcome ID and time, so a buffered +outcome can coexist with a current count of zero. Neither timestamp ranking nor +the latest-workflow pointer determines the latest dispatch. Current workflow +execution status remains separate. Native schema upgrades leave existing rows +unknown and do not reconstruct summaries from legacy arrays. Schedule listing is namespace-scoped and never returns deleted schedules. The optional `status` (`active` or `paused`) and `workflow_type` filters are exact diff --git a/resources/platform-protocol-specs/control-plane-api.openapi.yaml b/resources/platform-protocol-specs/control-plane-api.openapi.yaml index 2d9b8c981..e6bf02c02 100644 --- a/resources/platform-protocol-specs/control-plane-api.openapi.yaml +++ b/resources/platform-protocol-specs/control-plane-api.openapi.yaml @@ -1217,10 +1217,74 @@ components: spec: { type: [object, "null"], additionalProperties: true } action: { type: [object, "null"], additionalProperties: true } search_attributes: { type: [object, "null"], additionalProperties: true } + dispatch_summary: { $ref: "#/components/schemas/ScheduleDispatchSummary" } created_at: { type: string, format: date-time } updated_at: { type: string, format: date-time } schedule_count: { type: integer, minimum: 0, maximum: 200 } next_page_token: { type: [string, "null"] } + ScheduleDispatchSummary: + description: >- + Native bounded dispatch authority, also at the top level of describe. + Older producers omit this member. Partial, null or unsupported objects + supply no v1 authority. A valid unavailable object overrides legacy + outcome evidence. A later describe owns its entire summary. + type: object + additionalProperties: false + required: [version, state, last_outcome, buffered_actions_count] + properties: + version: { type: integer, const: 1 } + state: { type: string, enum: [known, never, unavailable] } + last_outcome: + oneOf: + - { $ref: "#/components/schemas/ScheduleDispatchOutcome" } + - { type: "null" } + buffered_actions_count: { type: [integer, "null"], minimum: 0, maximum: 9007199254740991 } + oneOf: + - properties: + state: { const: known } + last_outcome: { $ref: "#/components/schemas/ScheduleDispatchOutcome" } + buffered_actions_count: { type: integer } + - properties: + state: { const: never } + last_outcome: { type: "null" } + buffered_actions_count: { const: 0 } + - properties: + state: { const: unavailable } + last_outcome: { type: "null" } + buffered_actions_count: { type: "null" } + ScheduleDispatchOutcome: + description: >- + Last committed dispatch, independently of current execution status. + Reason strings retain all text within 64 Unicode scalars and 256 UTF-8 + bytes. Oversized or incomplete outcomes produce unavailable, without + changing the underlying scheduling operation. The complete summary is + at most 4096 serialized UTF-8 bytes. + type: object + additionalProperties: false + required: [id, outcome, recorded_at, reason, workflow_instance_id, workflow_run_id] + properties: + id: { type: string, pattern: "^[0-7][0-9A-HJKMNP-TV-Z]{25}$" } + outcome: { type: string, enum: [started, buffered, skipped, failed] } + recorded_at: { type: string, format: date-time, pattern: '^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{6}Z$' } + reason: { type: [string, "null"], maxLength: 64 } + workflow_instance_id: { type: [string, "null"], pattern: "^[0-7][0-9A-HJKMNP-TV-Z]{25}$" } + workflow_run_id: { type: [string, "null"], pattern: "^[0-7][0-9A-HJKMNP-TV-Z]{25}$" } + oneOf: + - properties: + outcome: { const: started } + reason: { type: "null" } + workflow_instance_id: { type: string } + workflow_run_id: { type: string } + - properties: + outcome: { const: buffered } + reason: { type: "null" } + workflow_instance_id: { type: "null" } + workflow_run_id: { type: "null" } + - properties: + outcome: { enum: [skipped, failed] } + reason: { type: string } + workflow_instance_id: { type: "null" } + workflow_run_id: { type: "null" } ScheduleListError: type: object additionalProperties: true diff --git a/rust/README.md b/rust/README.md index 066c88f19..e05b2d712 100644 --- a/rust/README.md +++ b/rust/README.md @@ -420,6 +420,8 @@ table; commands admitted earlier have no digest. Stop the native nodes, back up the database and run `schema-upgrade` before starting this binary on an earlier schema; rolling back means restoring the backup. +Schedule dispatch summaries add a nullable scalar on `workflow_schedules`: SQLite schema 14, PostgreSQL and MariaDB 15, MySQL 16. Existing rows remain unknown, without an array scan or backfill. New dispatches and buffer mutations maintain the summary atomically. This step also requires stopped nodes, a backup and `schema-upgrade`; restore the backup to roll back. The wire states and bounds are documented in [Schedules](../docs/server-reference.md#schedules). + Implemented paths cover health/schema readiness, limited capability discovery, workflow start/describe/paginated history, worker registration/heartbeat/removal, workflow/activity polling, workflow lease renewal and both completion paths. diff --git a/rust/migrations/mariadb/0015_catalog.json b/rust/migrations/mariadb/0015_catalog.json new file mode 100644 index 000000000..7961f8a00 --- /dev/null +++ b/rust/migrations/mariadb/0015_catalog.json @@ -0,0 +1,254 @@ +[ + [ + "activity_attempts", + "CREATE TABLE `activity_attempts` (\n `id` varchar(26) NOT NULL,\n `workflow_run_id` varchar(26) NOT NULL,\n `activity_execution_id` varchar(26) NOT NULL,\n `workflow_task_id` varchar(26) DEFAULT NULL,\n `worker_attempt_id` varchar(255) DEFAULT NULL,\n `attempt_number` int(10) unsigned NOT NULL,\n `status` varchar(255) NOT NULL,\n `lease_owner` varchar(255) DEFAULT NULL,\n `started_at` timestamp(6) NOT NULL,\n `last_heartbeat_at` timestamp(6) NULL DEFAULT NULL,\n `lease_expires_at` timestamp(6) NULL DEFAULT NULL,\n `closed_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `activity_attempts_activity_execution_id_attempt_number_unique` (`activity_execution_id`,`attempt_number`),\n KEY `activity_attempts_workflow_run_id_index` (`workflow_run_id`),\n KEY `activity_attempts_activity_execution_id_index` (`activity_execution_id`),\n KEY `activity_attempts_workflow_task_id_index` (`workflow_task_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "activity_executions", + "CREATE TABLE `activity_executions` (\n `id` varchar(26) NOT NULL,\n `workflow_run_id` varchar(26) NOT NULL,\n `sequence` int(10) unsigned NOT NULL,\n `activity_class` varchar(255) NOT NULL,\n `activity_type` varchar(255) NOT NULL,\n `status` varchar(255) NOT NULL,\n `payload_codec` varchar(255) DEFAULT NULL,\n `arguments` longtext DEFAULT NULL,\n `result` longtext DEFAULT NULL,\n `exception` longtext DEFAULT NULL,\n `connection` varchar(255) DEFAULT NULL,\n `queue` varchar(255) DEFAULT NULL,\n `attempt_count` int(10) unsigned NOT NULL DEFAULT 1,\n `current_attempt_id` varchar(26) DEFAULT NULL,\n `retry_policy` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`retry_policy`)),\n `parallel_group_path` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`parallel_group_path`)),\n `activity_options` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`activity_options`)),\n `schedule_deadline_at` timestamp(6) NULL DEFAULT NULL,\n `close_deadline_at` timestamp(6) NULL DEFAULT NULL,\n `schedule_to_close_deadline_at` timestamp(6) NULL DEFAULT NULL,\n `heartbeat_deadline_at` timestamp(6) NULL DEFAULT NULL,\n `started_at` timestamp(6) NULL DEFAULT NULL,\n `closed_at` timestamp(6) NULL DEFAULT NULL,\n `last_heartbeat_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `activity_executions_workflow_run_id_sequence_unique` (`workflow_run_id`,`sequence`),\n KEY `activity_executions_workflow_run_id_index` (`workflow_run_id`),\n KEY `activity_exec_prom_metrics_series_idx` (`workflow_run_id`,`queue`,`activity_type`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "dw_command_intents", + "CREATE TABLE `dw_command_intents` (\n `command_id` varchar(26) NOT NULL,\n `namespace` varchar(191) NOT NULL,\n `intent_digest` varchar(71) NOT NULL,\n PRIMARY KEY (`command_id`),\n KEY `dw_command_intents_namespace` (`namespace`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "dw_external_payload_deletions", + "CREATE TABLE `dw_external_payload_deletions` (\n `id` varchar(26) NOT NULL,\n `namespace` varchar(191) NOT NULL,\n `storage_uri` text NOT NULL,\n `storage_uri_sha256` varchar(64) NOT NULL,\n `storage_policy` longtext NOT NULL,\n `attempts` bigint(20) NOT NULL DEFAULT 0,\n `failure_code` varchar(64) DEFAULT NULL,\n `created_at` datetime(6) NOT NULL,\n `updated_at` datetime(6) NOT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `dw_external_payload_deletions_uri` (`namespace`,`storage_uri_sha256`),\n KEY `dw_external_payload_deletions_due` (`namespace`,`updated_at`,`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "dw_poll_receipts", + "CREATE TABLE `dw_poll_receipts` (\n `namespace` varchar(255) NOT NULL,\n `worker_id` varchar(255) NOT NULL,\n `kind` varchar(8) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,\n `request_id` varchar(255) NOT NULL,\n `task_id` varchar(26) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,\n `attempt` bigint(20) NOT NULL,\n `response` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`response`)),\n `expires_at` timestamp(6) NOT NULL,\n PRIMARY KEY (`namespace`,`worker_id`,`kind`,`request_id`),\n KEY `dw_poll_receipts_task` (`task_id`),\n KEY `dw_poll_receipts_expiration` (`expires_at`),\n CONSTRAINT `dw_poll_receipts_task` FOREIGN KEY (`task_id`) REFERENCES `workflow_tasks` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_nopad_bin" + ], + [ + "dw_query_cache", + "CREATE TABLE `dw_query_cache` (\n `key` varchar(64) NOT NULL,\n `value` longtext NOT NULL,\n `expiration` bigint(20) NOT NULL,\n PRIMARY KEY (`key`),\n KEY `dw_query_cache_expiration` (`expiration`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin" + ], + [ + "dw_run_command_contracts", + "CREATE TABLE `dw_run_command_contracts` (\n `workflow_run_id` varchar(191) NOT NULL,\n `namespace` varchar(191) NOT NULL,\n `workflow_type` varchar(255) NOT NULL,\n `contract` longtext NOT NULL,\n `worker_id` varchar(255) DEFAULT NULL,\n `workflow_task_id` varchar(191) NOT NULL,\n `bound_at` datetime(6) NOT NULL,\n PRIMARY KEY (`workflow_run_id`),\n KEY `dw_run_command_contracts_namespace` (`namespace`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "dw_server_schema", + "CREATE TABLE `dw_server_schema` (\n `engine` varchar(64) NOT NULL,\n `version` bigint(20) NOT NULL,\n `bootstrap_checksum` varbinary(48) NOT NULL,\n PRIMARY KEY (`engine`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin" + ], + [ + "dw_service_admission_counters", + "CREATE TABLE `dw_service_admission_counters` (\n `cache_key` varchar(191) NOT NULL,\n `amount` bigint(20) NOT NULL,\n `expires_at` datetime(6) NOT NULL,\n PRIMARY KEY (`cache_key`),\n KEY `dw_service_admission_counters_expiry` (`expires_at`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "dw_service_call_deadlines", + "CREATE TABLE `dw_service_call_deadlines` (\n `service_call_id` varchar(26) NOT NULL,\n `namespace` varchar(128) NOT NULL,\n `call_deadline_at` datetime(6) NOT NULL,\n PRIMARY KEY (`service_call_id`),\n KEY `dw_service_call_deadlines_due` (`call_deadline_at`,`service_call_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "dw_stream_reclaims", + "CREATE TABLE `dw_stream_reclaims` (\n `stream_id` bigint(20) unsigned NOT NULL,\n `namespace` varchar(128) NOT NULL,\n `workflow_run_id` varchar(26) NOT NULL,\n `reclaim_at` datetime(6) NOT NULL,\n PRIMARY KEY (`stream_id`),\n KEY `dw_stream_reclaims_due` (`namespace`,`reclaim_at`,`stream_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "dw_task_completions", + "CREATE TABLE `dw_task_completions` (\n `task_id` varchar(26) NOT NULL,\n `receipt` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`receipt`)),\n PRIMARY KEY (`task_id`),\n CONSTRAINT `dw_task_completions_task` FOREIGN KEY (`task_id`) REFERENCES `workflow_tasks` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "dw_task_queue_pauses", + "CREATE TABLE `dw_task_queue_pauses` (\n `namespace` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,\n `task_queue` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,\n `reason` text DEFAULT NULL,\n `paused_by` text DEFAULT NULL,\n `paused_at` datetime(6) NOT NULL,\n `resumed_by` text DEFAULT NULL,\n `resumed_at` datetime(6) DEFAULT NULL,\n PRIMARY KEY (`namespace`,`task_queue`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "dw_worker_registration_incarnations", + "CREATE TABLE `dw_worker_registration_incarnations` (\n `token` char(32) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,\n `namespace` varchar(255) NOT NULL,\n `worker_id` varchar(255) NOT NULL,\n `status` varchar(32) NOT NULL,\n `recovered_workflow_task_count` bigint(20) DEFAULT NULL,\n `finished_at` datetime(6) DEFAULT NULL,\n `created_at` datetime(6) NOT NULL,\n `updated_at` datetime(6) NOT NULL,\n PRIMARY KEY (`token`),\n KEY `dw_worker_incarnation_authority` (`namespace`,`worker_id`,`status`),\n KEY `dw_worker_incarnation_retention` (`status`,`finished_at`),\n CONSTRAINT `dw_worker_incarnation_state` CHECK (`status` = 'active' and `finished_at` is null and `recovered_workflow_task_count` is null or `status` = 'superseded' and `finished_at` is not null and `recovered_workflow_task_count` is null or `status` = 'deregistered' and `finished_at` is not null and `recovered_workflow_task_count` is not null and `recovered_workflow_task_count` >= 0)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "dw_worker_session_holders", + "CREATE TABLE `dw_worker_session_holders` (\n `namespace` varchar(128) NOT NULL,\n `session_id` varchar(255) NOT NULL,\n `incarnation` char(64) COLLATE ascii_bin NOT NULL,\n `updated_at` datetime(6) NOT NULL,\n PRIMARY KEY (`namespace`,`session_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "failed_jobs", + "CREATE TABLE `failed_jobs` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n `uuid` varchar(255) NOT NULL,\n `connection` text NOT NULL,\n `queue` text NOT NULL,\n `payload` longtext NOT NULL,\n `exception` longtext NOT NULL,\n `failed_at` timestamp NOT NULL DEFAULT current_timestamp(),\n PRIMARY KEY (`id`),\n UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "jobs", + "CREATE TABLE `jobs` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n `queue` varchar(255) NOT NULL,\n `payload` longtext NOT NULL,\n `attempts` tinyint(3) unsigned NOT NULL,\n `reserved_at` int(10) unsigned DEFAULT NULL,\n `available_at` int(10) unsigned NOT NULL,\n `created_at` int(10) unsigned NOT NULL,\n PRIMARY KEY (`id`),\n KEY `jobs_queue_index` (`queue`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "migrations", + "CREATE TABLE `migrations` (\n `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n `migration` varchar(255) NOT NULL,\n `batch` int(11) NOT NULL,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "runtime_credentials", + "CREATE TABLE `runtime_credentials` (\n `id` varchar(64) NOT NULL,\n `name` varchar(255) DEFAULT NULL,\n `subject` varchar(255) NOT NULL,\n `roles` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`roles`)),\n `tenant` varchar(128) NOT NULL,\n `claims` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`claims`)),\n `token_prefix` varchar(16) NOT NULL,\n `token_hash` char(64) NOT NULL,\n `expires_at` timestamp NULL DEFAULT NULL,\n `revoked_at` timestamp NULL DEFAULT NULL,\n `rotated_at` timestamp NULL DEFAULT NULL,\n `created_at` timestamp NULL DEFAULT NULL,\n `updated_at` timestamp NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `runtime_credentials_token_hash_unique` (`token_hash`),\n KEY `runtime_credentials_tenant_index` (`tenant`),\n KEY `runtime_credentials_expires_at_index` (`expires_at`),\n KEY `runtime_credentials_revoked_at_index` (`revoked_at`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "runtime_external_payloads", + "CREATE TABLE `runtime_external_payloads` (\n `id` varchar(64) NOT NULL,\n `namespace` varchar(128) NOT NULL,\n `storage_uri` text NOT NULL,\n `storage_uri_sha256` char(64) NOT NULL,\n `codec` varchar(64) NOT NULL,\n `sha256` char(64) NOT NULL,\n `size_bytes` bigint(20) unsigned NOT NULL,\n `upload_status` varchar(16) NOT NULL DEFAULT 'ready',\n `retained_at` timestamp NULL DEFAULT NULL,\n `expires_at` timestamp NULL DEFAULT NULL,\n `last_fetched_at` timestamp NULL DEFAULT NULL,\n `created_at` timestamp NULL DEFAULT NULL,\n `updated_at` timestamp NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `runtime_external_payloads_namespace_uri_unique` (`namespace`,`storage_uri_sha256`),\n KEY `runtime_external_payloads_namespace_index` (`namespace`),\n KEY `runtime_external_payloads_expires_at_index` (`expires_at`),\n KEY `runtime_external_payloads_reclamation_idx` (`retained_at`,`expires_at`,`upload_status`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "runtime_external_payload_backup_hold", + "CREATE TABLE `runtime_external_payload_backup_hold` (\n `id` tinyint(3) unsigned NOT NULL,\n `owner` char(36) DEFAULT NULL,\n `acquired_at` timestamp NULL DEFAULT NULL,\n `expires_at` timestamp NULL DEFAULT NULL,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "runtime_external_payload_cleanup_stats", + "CREATE TABLE `runtime_external_payload_cleanup_stats` (\n `namespace` varchar(128) NOT NULL,\n `passes_total` bigint(20) unsigned NOT NULL DEFAULT 0,\n `deleted_references_total` bigint(20) unsigned NOT NULL DEFAULT 0,\n `deleted_backing_objects_total` bigint(20) unsigned NOT NULL DEFAULT 0,\n `shared_objects_preserved_total` bigint(20) unsigned NOT NULL DEFAULT 0,\n `blocked_outcomes_total` bigint(20) unsigned NOT NULL DEFAULT 0,\n `storage_driver_failures_total` bigint(20) unsigned NOT NULL DEFAULT 0,\n `last_processed` int(10) unsigned NOT NULL DEFAULT 0,\n `last_deleted_references` int(10) unsigned NOT NULL DEFAULT 0,\n `last_deleted_backing_objects` int(10) unsigned NOT NULL DEFAULT 0,\n `last_shared_objects_preserved` int(10) unsigned NOT NULL DEFAULT 0,\n `last_blocked_outcomes` int(10) unsigned NOT NULL DEFAULT 0,\n `last_storage_driver_failures` int(10) unsigned NOT NULL DEFAULT 0,\n `last_pass_status` varchar(16) DEFAULT NULL,\n `last_completed_at` timestamp NULL DEFAULT NULL,\n `last_storage_failure_at` timestamp NULL DEFAULT NULL,\n `created_at` timestamp NULL DEFAULT NULL,\n `updated_at` timestamp NULL DEFAULT NULL,\n PRIMARY KEY (`namespace`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "runtime_external_payload_object_locks", + "CREATE TABLE `runtime_external_payload_object_locks` (\n `bucket` smallint(5) unsigned NOT NULL,\n PRIMARY KEY (`bucket`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "runtime_payload_completion_budgets", + "CREATE TABLE `runtime_payload_completion_budgets` (\n `id` char(64) NOT NULL,\n `namespace` varchar(128) NOT NULL,\n `context` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`context`)),\n `slots` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`slots`)),\n `objects` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`objects`)),\n `expires_at` timestamp NOT NULL,\n `created_at` timestamp NULL DEFAULT NULL,\n `updated_at` timestamp NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n KEY `runtime_payload_completion_budgets_namespace_index` (`namespace`),\n KEY `runtime_payload_completion_budgets_expires_at_index` (`expires_at`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "search_attribute_definitions", + "CREATE TABLE `search_attribute_definitions` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n `namespace` varchar(128) NOT NULL,\n `name` varchar(128) NOT NULL,\n `type` varchar(32) NOT NULL,\n `created_at` timestamp NULL DEFAULT NULL,\n `updated_at` timestamp NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `search_attribute_definitions_namespace_name_unique` (`namespace`,`name`),\n KEY `search_attribute_definitions_namespace_index` (`namespace`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_child_calls", + "CREATE TABLE `workflow_child_calls` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n `parent_workflow_run_id` varchar(26) NOT NULL,\n `parent_workflow_instance_id` varchar(191) NOT NULL,\n `sequence` int(10) unsigned NOT NULL,\n `child_workflow_type` varchar(191) NOT NULL,\n `child_workflow_class` varchar(255) NOT NULL,\n `requested_child_id` varchar(191) DEFAULT NULL,\n `resolved_child_instance_id` varchar(191) DEFAULT NULL,\n `resolved_child_run_id` varchar(26) DEFAULT NULL,\n `parent_close_policy` varchar(32) NOT NULL DEFAULT 'abandon',\n `connection` varchar(191) DEFAULT NULL,\n `queue` varchar(191) DEFAULT NULL,\n `compatibility` varchar(191) DEFAULT NULL,\n `retry_policy` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`retry_policy`)),\n `timeout_policy` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`timeout_policy`)),\n `cancellation_propagation` tinyint(1) NOT NULL DEFAULT 0,\n `status` varchar(32) NOT NULL DEFAULT 'scheduled',\n `result_payload_reference` varchar(191) DEFAULT NULL,\n `failure_reference` varchar(191) DEFAULT NULL,\n `closed_reason` varchar(64) DEFAULT NULL,\n `scheduled_at` timestamp(6) NOT NULL,\n `started_at` timestamp(6) NULL DEFAULT NULL,\n `closed_at` timestamp(6) NULL DEFAULT NULL,\n `arguments` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`arguments`)),\n `metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`metadata`)),\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n KEY `child_calls_parent_seq` (`parent_workflow_run_id`,`sequence`),\n KEY `child_calls_parent_status` (`parent_workflow_run_id`,`status`),\n KEY `child_calls_child_parent` (`resolved_child_instance_id`,`parent_workflow_run_id`),\n KEY `workflow_child_calls_parent_workflow_run_id_index` (`parent_workflow_run_id`),\n KEY `workflow_child_calls_parent_workflow_instance_id_index` (`parent_workflow_instance_id`),\n KEY `workflow_child_calls_sequence_index` (`sequence`),\n KEY `workflow_child_calls_resolved_child_instance_id_index` (`resolved_child_instance_id`),\n KEY `workflow_child_calls_resolved_child_run_id_index` (`resolved_child_run_id`),\n KEY `workflow_child_calls_status_index` (`status`),\n CONSTRAINT `workflow_child_calls_parent_workflow_run_id_foreign` FOREIGN KEY (`parent_workflow_run_id`) REFERENCES `workflow_runs` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_child_projection_repairs", + "CREATE TABLE `workflow_child_projection_repairs` (\n `workflow_history_event_id` varchar(26) NOT NULL,\n `workflow_run_id` varchar(26) NOT NULL,\n `workflow_task_id` varchar(26) NOT NULL,\n `history_sequence` int(10) unsigned NOT NULL,\n `failure_id` varchar(26) DEFAULT NULL,\n `failed_child_counted_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`workflow_history_event_id`),\n KEY `workflow_child_projection_repairs_drain_idx` (`workflow_run_id`,`workflow_task_id`,`history_sequence`),\n KEY `workflow_child_projection_repairs_failure_idx` (`workflow_run_id`,`failure_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_commands", + "CREATE TABLE `workflow_commands` (\n `id` varchar(26) NOT NULL,\n `workflow_instance_id` varchar(191) DEFAULT NULL,\n `workflow_run_id` varchar(26) DEFAULT NULL,\n `requested_workflow_run_id` varchar(26) DEFAULT NULL,\n `resolved_workflow_run_id` varchar(26) DEFAULT NULL,\n `command_type` varchar(255) NOT NULL,\n `target_scope` varchar(255) NOT NULL DEFAULT 'instance',\n `source` varchar(255) NOT NULL DEFAULT 'php',\n `context` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`context`)),\n `request_id` varchar(191) DEFAULT NULL,\n `status` varchar(255) NOT NULL,\n `outcome` varchar(255) DEFAULT NULL,\n `workflow_class` varchar(255) DEFAULT NULL,\n `workflow_type` varchar(255) DEFAULT NULL,\n `payload_codec` varchar(255) DEFAULT NULL,\n `payload` longtext DEFAULT NULL,\n `rejection_reason` varchar(255) DEFAULT NULL,\n `command_sequence` int(10) unsigned DEFAULT NULL,\n `message_sequence` int(10) unsigned DEFAULT NULL,\n `accepted_at` timestamp(6) NULL DEFAULT NULL,\n `applied_at` timestamp(6) NULL DEFAULT NULL,\n `rejected_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_commands_request_lookup` (`workflow_instance_id`,`command_type`,`request_id`),\n KEY `workflow_commands_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_commands_workflow_run_id_index` (`workflow_run_id`),\n KEY `workflow_commands_requested_workflow_run_id_index` (`requested_workflow_run_id`),\n KEY `workflow_commands_resolved_workflow_run_id_index` (`resolved_workflow_run_id`),\n KEY `workflow_commands_command_type_index` (`command_type`),\n KEY `workflow_commands_source_index` (`source`),\n KEY `workflow_commands_status_index` (`status`),\n KEY `workflow_commands_command_sequence_index` (`command_sequence`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_durable_streams", + "CREATE TABLE `workflow_durable_streams` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n `namespace` varchar(128) NOT NULL,\n `workflow_instance_id` varchar(191) NOT NULL,\n `workflow_run_id` varchar(26) NOT NULL,\n `stream_name` varchar(191) NOT NULL,\n `status` varchar(16) NOT NULL DEFAULT 'open',\n `last_offset` bigint(20) NOT NULL DEFAULT -1,\n `total_items` bigint(20) unsigned NOT NULL DEFAULT 0,\n `retention_seconds` int(10) unsigned DEFAULT NULL,\n `opened_at` timestamp(6) NULL DEFAULT NULL,\n `last_appended_at` timestamp(6) NULL DEFAULT NULL,\n `closed_at` timestamp(6) NULL DEFAULT NULL,\n `error_reason` varchar(191) DEFAULT NULL,\n `pending_items` bigint(20) unsigned NOT NULL DEFAULT 0,\n `metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`metadata`)),\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `wf_durable_streams_run_name_unique` (`workflow_run_id`,`stream_name`),\n KEY `wf_durable_streams_ns_instance_name_idx` (`namespace`,`workflow_instance_id`,`stream_name`),\n KEY `wf_durable_streams_ns_status_idx` (`namespace`,`status`),\n KEY `workflow_durable_streams_namespace_index` (`namespace`),\n KEY `workflow_durable_streams_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_durable_streams_workflow_run_id_index` (`workflow_run_id`),\n KEY `workflow_durable_streams_status_index` (`status`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_durable_stream_items", + "CREATE TABLE `workflow_durable_stream_items` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n `stream_id` bigint(20) unsigned NOT NULL,\n `namespace` varchar(128) NOT NULL,\n `workflow_run_id` varchar(26) NOT NULL,\n `stream_name` varchar(191) NOT NULL,\n `offset` bigint(20) NOT NULL,\n `idempotency_key` varchar(191) DEFAULT NULL,\n `origin` varchar(64) NOT NULL DEFAULT 'workflow_command',\n `origin_reference` varchar(191) DEFAULT NULL,\n `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`payload`)),\n `payload_reference` varchar(191) DEFAULT NULL,\n `payload_codec` varchar(64) DEFAULT NULL,\n `item_type` varchar(64) DEFAULT NULL,\n `content_type` varchar(191) DEFAULT NULL,\n `emitted_at` timestamp(6) NOT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `wf_durable_stream_items_stream_offset_unique` (`stream_id`,`offset`),\n UNIQUE KEY `wf_durable_stream_items_idempotency_unique` (`stream_id`,`idempotency_key`),\n KEY `wf_durable_stream_items_run_name_offset_idx` (`workflow_run_id`,`stream_name`,`offset`),\n KEY `workflow_durable_stream_items_namespace_index` (`namespace`),\n KEY `workflow_durable_stream_items_workflow_run_id_index` (`workflow_run_id`),\n CONSTRAINT `workflow_durable_stream_items_stream_id_foreign` FOREIGN KEY (`stream_id`) REFERENCES `workflow_durable_streams` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_failures", + "CREATE TABLE `workflow_failures` (\n `id` varchar(26) NOT NULL,\n `workflow_run_id` varchar(26) NOT NULL,\n `source_kind` varchar(255) NOT NULL,\n `source_id` varchar(255) NOT NULL,\n `propagation_kind` varchar(255) NOT NULL,\n `failure_category` varchar(255) DEFAULT NULL,\n `non_retryable` tinyint(1) NOT NULL DEFAULT 0,\n `handled` tinyint(1) NOT NULL DEFAULT 0,\n `exception_class` varchar(255) NOT NULL,\n `message` text NOT NULL,\n `file` text NOT NULL,\n `line` int(10) unsigned DEFAULT NULL,\n `trace_preview` longtext DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n KEY `workflow_failures_source_kind_source_id_index` (`source_kind`,`source_id`),\n KEY `workflow_failures_workflow_run_id_index` (`workflow_run_id`),\n KEY `workflow_failures_failure_category_index` (`failure_category`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_history_events", + "CREATE TABLE `workflow_history_events` (\n `id` varchar(26) NOT NULL,\n `workflow_run_id` varchar(26) NOT NULL,\n `sequence` int(10) unsigned NOT NULL,\n `event_type` varchar(255) NOT NULL,\n `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`payload`)),\n `workflow_task_id` varchar(26) DEFAULT NULL,\n `workflow_command_id` varchar(26) DEFAULT NULL,\n `recorded_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n `recorded_at_utc` datetime(6) DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_history_events_workflow_run_id_sequence_unique` (`workflow_run_id`,`sequence`),\n KEY `workflow_history_events_workflow_run_id_index` (`workflow_run_id`),\n KEY `workflow_history_events_workflow_task_id_index` (`workflow_task_id`),\n KEY `workflow_history_events_workflow_command_id_index` (`workflow_command_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_inbound_streams", + "CREATE TABLE `workflow_inbound_streams` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n `namespace` varchar(128) NOT NULL,\n `workflow_instance_id` varchar(191) NOT NULL,\n `stream_name` varchar(128) NOT NULL,\n `last_position` bigint(20) unsigned NOT NULL DEFAULT 0,\n `cursor_position` bigint(20) unsigned NOT NULL DEFAULT 0,\n `cursor_checkpoint_run_id` varchar(26) DEFAULT NULL,\n `waiting_run_id` varchar(26) DEFAULT NULL,\n `waiting_after_position` bigint(20) unsigned DEFAULT NULL,\n `waiting_since` timestamp(6) NULL DEFAULT NULL,\n `duplicate_count` bigint(20) unsigned NOT NULL DEFAULT 0,\n `malformed_count` bigint(20) unsigned NOT NULL DEFAULT 0,\n `last_input_outcome` varchar(64) DEFAULT NULL,\n `last_input_message_id` varchar(191) DEFAULT NULL,\n `last_input_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n `cleanup_blocked_at` timestamp(6) NULL DEFAULT NULL,\n `cleanup_blocked_reason` varchar(64) DEFAULT NULL,\n `cleanup_blocked_run_id` varchar(26) DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `wf_inbound_streams_ns_instance_name_unique` (`namespace`,`workflow_instance_id`,`stream_name`),\n KEY `workflow_inbound_streams_namespace_index` (`namespace`),\n KEY `workflow_inbound_streams_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_inbound_streams_cursor_checkpoint_run_id_index` (`cursor_checkpoint_run_id`),\n KEY `workflow_inbound_streams_waiting_run_id_index` (`waiting_run_id`),\n KEY `workflow_inbound_streams_cleanup_blocked_run_id_index` (`cleanup_blocked_run_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_inbound_stream_items", + "CREATE TABLE `workflow_inbound_stream_items` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n `stream_id` bigint(20) unsigned NOT NULL,\n `namespace` varchar(128) NOT NULL,\n `workflow_instance_id` varchar(191) NOT NULL,\n `stream_name` varchar(128) NOT NULL,\n `message_id` varchar(191) NOT NULL,\n `position` bigint(20) unsigned NOT NULL,\n `payload_codec` varchar(32) NOT NULL,\n `payload_blob` longtext NOT NULL,\n `payload_hash` varchar(64) NOT NULL,\n `delivered_run_id` varchar(26) DEFAULT NULL,\n `workflow_command_id` varchar(26) DEFAULT NULL,\n `delivered_at` timestamp(6) NULL DEFAULT NULL,\n `consumed_run_id` varchar(26) DEFAULT NULL,\n `consumed_task_id` varchar(26) DEFAULT NULL,\n `consumed_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n `payload_released_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `wf_inbound_items_stream_message_unique` (`stream_id`,`message_id`),\n UNIQUE KEY `wf_inbound_items_stream_position_unique` (`stream_id`,`position`),\n KEY `wf_inbound_items_ns_instance_name_position_idx` (`namespace`,`workflow_instance_id`,`stream_name`,`position`),\n KEY `workflow_inbound_stream_items_namespace_index` (`namespace`),\n KEY `workflow_inbound_stream_items_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_inbound_stream_items_delivered_run_id_index` (`delivered_run_id`),\n KEY `workflow_inbound_stream_items_workflow_command_id_index` (`workflow_command_id`),\n KEY `workflow_inbound_stream_items_consumed_run_id_index` (`consumed_run_id`),\n KEY `workflow_inbound_stream_items_consumed_task_id_index` (`consumed_task_id`),\n KEY `workflow_inbound_stream_items_payload_released_at_index` (`payload_released_at`),\n CONSTRAINT `workflow_inbound_stream_items_stream_id_foreign` FOREIGN KEY (`stream_id`) REFERENCES `workflow_inbound_streams` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_instances", + "CREATE TABLE `workflow_instances` (\n `id` varchar(191) NOT NULL,\n `workflow_class` varchar(255) NOT NULL,\n `workflow_type` varchar(255) NOT NULL,\n `namespace` varchar(255) DEFAULT NULL,\n `business_key` varchar(191) DEFAULT NULL,\n `visibility_labels` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`visibility_labels`)),\n `memo` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`memo`)),\n `execution_timeout_seconds` int(10) unsigned DEFAULT NULL,\n `current_run_id` varchar(26) DEFAULT NULL,\n `run_count` int(10) unsigned NOT NULL DEFAULT 0,\n `last_message_sequence` int(10) unsigned NOT NULL DEFAULT 0,\n `reserved_at` timestamp(6) NULL DEFAULT NULL,\n `started_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n KEY `workflow_instances_namespace_index` (`namespace`),\n KEY `workflow_instances_business_key_index` (`business_key`),\n KEY `workflow_instances_current_run_id_index` (`current_run_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_links", + "CREATE TABLE `workflow_links` (\n `id` varchar(26) NOT NULL,\n `link_type` varchar(255) NOT NULL,\n `sequence` int(10) unsigned DEFAULT NULL,\n `parallel_group_path` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`parallel_group_path`)),\n `parent_workflow_instance_id` varchar(191) NOT NULL,\n `parent_workflow_run_id` varchar(26) NOT NULL,\n `child_workflow_instance_id` varchar(191) NOT NULL,\n `child_workflow_run_id` varchar(26) NOT NULL,\n `is_primary_parent` tinyint(1) NOT NULL DEFAULT 0,\n `parent_close_policy` varchar(255) NOT NULL DEFAULT 'abandon',\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_links_parent_child_type_unique` (`parent_workflow_run_id`,`child_workflow_run_id`,`link_type`),\n KEY `workflow_links_parent_sequence_type_index` (`parent_workflow_run_id`,`sequence`,`link_type`),\n KEY `workflow_links_parent_workflow_instance_id_index` (`parent_workflow_instance_id`),\n KEY `workflow_links_parent_workflow_run_id_index` (`parent_workflow_run_id`),\n KEY `workflow_links_child_workflow_instance_id_index` (`child_workflow_instance_id`),\n KEY `workflow_links_child_workflow_run_id_index` (`child_workflow_run_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_memos", + "CREATE TABLE `workflow_memos` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n `workflow_run_id` varchar(26) NOT NULL,\n `workflow_instance_id` varchar(191) NOT NULL,\n `key` varchar(191) NOT NULL,\n `value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`value`)),\n `upserted_at_sequence` int(10) unsigned NOT NULL,\n `inherited_from_parent` tinyint(1) NOT NULL DEFAULT 0,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n `portable_value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`portable_value`)),\n `portable_value_sequence` int(10) unsigned DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_memos_run_key_unique` (`workflow_run_id`,`key`),\n KEY `workflow_memos_instance_key` (`workflow_instance_id`,`key`),\n CONSTRAINT `workflow_memos_workflow_run_id_foreign` FOREIGN KEY (`workflow_run_id`) REFERENCES `workflow_runs` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_messages", + "CREATE TABLE `workflow_messages` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n `workflow_instance_id` varchar(191) NOT NULL,\n `workflow_run_id` varchar(26) DEFAULT NULL,\n `direction` varchar(16) NOT NULL,\n `channel` varchar(64) NOT NULL,\n `stream_key` varchar(191) NOT NULL,\n `sequence` bigint(20) unsigned NOT NULL,\n `source_workflow_instance_id` varchar(191) DEFAULT NULL,\n `source_workflow_run_id` varchar(26) DEFAULT NULL,\n `target_workflow_instance_id` varchar(191) DEFAULT NULL,\n `target_workflow_run_id` varchar(26) DEFAULT NULL,\n `correlation_id` varchar(191) DEFAULT NULL,\n `idempotency_key` varchar(191) DEFAULT NULL,\n `payload_reference` varchar(191) DEFAULT NULL,\n `consume_state` varchar(16) NOT NULL DEFAULT 'pending',\n `consumed_at` timestamp(6) NULL DEFAULT NULL,\n `consumed_by_sequence` int(10) unsigned DEFAULT NULL,\n `expires_at` timestamp(6) NULL DEFAULT NULL,\n `delivery_attempt_count` int(10) unsigned NOT NULL DEFAULT 0,\n `last_delivery_attempt_at` timestamp(6) NULL DEFAULT NULL,\n `last_delivery_error` text DEFAULT NULL,\n `metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`metadata`)),\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `wf_msgs_stream_seq_unique` (`workflow_instance_id`,`stream_key`,`sequence`),\n KEY `wf_msgs_instance_stream_seq` (`workflow_instance_id`,`stream_key`,`sequence`),\n KEY `wf_msgs_run_dir_state` (`workflow_run_id`,`direction`,`consume_state`),\n KEY `wf_msgs_stream_seq_state` (`stream_key`,`sequence`,`consume_state`),\n KEY `wf_msgs_target_state` (`target_workflow_instance_id`,`consume_state`),\n KEY `workflow_messages_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_messages_workflow_run_id_index` (`workflow_run_id`),\n KEY `workflow_messages_direction_index` (`direction`),\n KEY `workflow_messages_channel_index` (`channel`),\n KEY `workflow_messages_stream_key_index` (`stream_key`),\n KEY `workflow_messages_sequence_index` (`sequence`),\n KEY `workflow_messages_source_workflow_instance_id_index` (`source_workflow_instance_id`),\n KEY `workflow_messages_target_workflow_instance_id_index` (`target_workflow_instance_id`),\n KEY `workflow_messages_correlation_id_index` (`correlation_id`),\n KEY `workflow_messages_idempotency_key_index` (`idempotency_key`),\n KEY `workflow_messages_consume_state_index` (`consume_state`),\n CONSTRAINT `workflow_messages_workflow_run_id_foreign` FOREIGN KEY (`workflow_run_id`) REFERENCES `workflow_runs` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_namespaces", + "CREATE TABLE `workflow_namespaces` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n `name` varchar(128) NOT NULL,\n `description` varchar(1000) DEFAULT NULL,\n `retention_mode` varchar(32) NOT NULL DEFAULT 'bounded',\n `retention_days` int(10) unsigned DEFAULT 30,\n `status` varchar(32) NOT NULL DEFAULT 'active',\n `external_payload_storage` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`external_payload_storage`)),\n `created_at` timestamp NULL DEFAULT NULL,\n `updated_at` timestamp NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_namespaces_name_unique` (`name`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_runs", + "CREATE TABLE `workflow_runs` (\n `id` varchar(26) NOT NULL,\n `workflow_instance_id` varchar(191) NOT NULL,\n `run_number` int(10) unsigned NOT NULL,\n `workflow_class` varchar(255) NOT NULL,\n `workflow_type` varchar(255) NOT NULL,\n `namespace` varchar(255) DEFAULT NULL,\n `business_key` varchar(191) DEFAULT NULL,\n `visibility_labels` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`visibility_labels`)),\n `status` varchar(255) NOT NULL,\n `closed_reason` varchar(255) DEFAULT NULL,\n `compatibility` varchar(255) DEFAULT NULL,\n `payload_codec` varchar(255) DEFAULT NULL,\n `arguments` longtext DEFAULT NULL,\n `output` longtext DEFAULT NULL,\n `output_payload_codec` varchar(255) DEFAULT NULL,\n `connection` varchar(255) DEFAULT NULL,\n `queue` varchar(255) DEFAULT NULL,\n `priority` tinyint(3) unsigned NOT NULL DEFAULT 5,\n `fairness_key` varchar(64) DEFAULT NULL,\n `fairness_weight` smallint(5) unsigned NOT NULL DEFAULT 1,\n `sticky_worker_id` varchar(255) DEFAULT NULL,\n `sticky_until` timestamp(6) NULL DEFAULT NULL,\n `last_history_sequence` int(10) unsigned NOT NULL DEFAULT 0,\n `last_command_sequence` int(10) unsigned NOT NULL DEFAULT 0,\n `message_cursor_position` int(10) unsigned NOT NULL DEFAULT 0,\n `run_timeout_seconds` int(10) unsigned DEFAULT NULL,\n `execution_deadline_at` timestamp(6) NULL DEFAULT NULL,\n `run_deadline_at` timestamp(6) NULL DEFAULT NULL,\n `started_at` timestamp(6) NULL DEFAULT NULL,\n `closed_at` timestamp(6) NULL DEFAULT NULL,\n `archived_at` timestamp(6) NULL DEFAULT NULL,\n `archive_command_id` varchar(26) DEFAULT NULL,\n `archive_reason` varchar(255) DEFAULT NULL,\n `last_progress_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n `import_source` varchar(64) DEFAULT NULL,\n `import_id` varchar(64) DEFAULT NULL,\n `import_dedupe_key` varchar(191) DEFAULT NULL,\n `import_contract_version` smallint(5) unsigned DEFAULT NULL,\n `imported_at` timestamp(6) NULL DEFAULT NULL,\n `cancellation_request_command_id` varchar(26) DEFAULT NULL,\n `cancellation_requested_at` timestamp(6) NULL DEFAULT NULL,\n `cancellation_deadline_at` timestamp(6) NULL DEFAULT NULL,\n `cancellation_delivery_sequence` int(10) unsigned DEFAULT NULL,\n `cancellation_delivered_at` timestamp(6) NULL DEFAULT NULL,\n `details_pruned_at` timestamp(6) NULL DEFAULT NULL,\n `cancellation_scope_recovery_until` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_runs_workflow_instance_id_run_number_unique` (`workflow_instance_id`,`run_number`),\n KEY `workflow_runs_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_runs_namespace_index` (`namespace`),\n KEY `workflow_runs_business_key_index` (`business_key`),\n KEY `workflow_runs_sticky_worker_id_index` (`sticky_worker_id`),\n KEY `workflow_runs_sticky_until_index` (`sticky_until`),\n KEY `workflow_runs_archived_at_index` (`archived_at`),\n KEY `workflow_runs_archive_command_id_index` (`archive_command_id`),\n KEY `workflow_runs_import_source_index` (`import_source`),\n KEY `workflow_runs_import_id_index` (`import_id`),\n KEY `workflow_runs_import_dedupe_key_index` (`import_dedupe_key`),\n KEY `workflow_runs_imported_at_index` (`imported_at`),\n KEY `workflow_runs_prom_metrics_queue_idx` (`namespace`,`queue`),\n KEY `workflow_runs_namespace_status_quota_idx` (`namespace`,`status`),\n KEY `workflow_runs_cancellation_request_command_id_index` (`cancellation_request_command_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_run_lineage_entries", + "CREATE TABLE `workflow_run_lineage_entries` (\n `id` varchar(64) NOT NULL,\n `workflow_run_id` varchar(26) NOT NULL,\n `workflow_instance_id` varchar(191) NOT NULL,\n `direction` varchar(255) NOT NULL,\n `lineage_id` varchar(191) NOT NULL,\n `position` int(10) unsigned NOT NULL,\n `link_type` varchar(255) NOT NULL,\n `child_call_id` varchar(26) DEFAULT NULL,\n `sequence` int(10) unsigned DEFAULT NULL,\n `is_primary_parent` tinyint(1) NOT NULL DEFAULT 0,\n `related_workflow_instance_id` varchar(191) DEFAULT NULL,\n `related_workflow_run_id` varchar(26) DEFAULT NULL,\n `related_run_number` int(10) unsigned DEFAULT NULL,\n `related_workflow_type` varchar(191) DEFAULT NULL,\n `related_workflow_class` varchar(255) DEFAULT NULL,\n `status` varchar(255) DEFAULT NULL,\n `status_bucket` varchar(255) DEFAULT NULL,\n `closed_reason` varchar(255) DEFAULT NULL,\n `linked_at` timestamp(6) NULL DEFAULT NULL,\n `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`payload`)),\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_run_lineage_run_direction_lineage_unique` (`workflow_run_id`,`direction`,`lineage_id`),\n KEY `workflow_run_lineage_run_direction_position_index` (`workflow_run_id`,`direction`,`position`),\n KEY `workflow_run_lineage_instance_direction_type_index` (`workflow_instance_id`,`direction`,`link_type`),\n KEY `workflow_run_lineage_entries_workflow_run_id_index` (`workflow_run_id`),\n KEY `workflow_run_lineage_entries_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_run_lineage_entries_direction_index` (`direction`),\n KEY `workflow_run_lineage_entries_link_type_index` (`link_type`),\n KEY `workflow_run_lineage_entries_child_call_id_index` (`child_call_id`),\n KEY `workflow_run_lineage_entries_sequence_index` (`sequence`),\n KEY `workflow_run_lineage_entries_is_primary_parent_index` (`is_primary_parent`),\n KEY `workflow_run_lineage_entries_related_workflow_instance_id_index` (`related_workflow_instance_id`),\n KEY `workflow_run_lineage_entries_related_workflow_run_id_index` (`related_workflow_run_id`),\n KEY `workflow_run_lineage_entries_related_workflow_type_index` (`related_workflow_type`),\n KEY `workflow_run_lineage_entries_status_index` (`status`),\n KEY `workflow_run_lineage_entries_status_bucket_index` (`status_bucket`),\n KEY `workflow_run_lineage_entries_closed_reason_index` (`closed_reason`),\n KEY `workflow_run_lineage_entries_linked_at_index` (`linked_at`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_run_summaries", + "CREATE TABLE `workflow_run_summaries` (\n `id` varchar(26) NOT NULL,\n `workflow_instance_id` varchar(191) NOT NULL,\n `run_number` int(10) unsigned NOT NULL,\n `is_current_run` tinyint(1) NOT NULL DEFAULT 0,\n `engine_source` varchar(255) NOT NULL DEFAULT 'v2',\n `projection_schema_version` smallint(5) unsigned DEFAULT NULL,\n `class` varchar(255) NOT NULL,\n `workflow_type` varchar(255) NOT NULL,\n `namespace` varchar(255) DEFAULT NULL,\n `compatibility` varchar(255) DEFAULT NULL,\n `declared_entry_mode` varchar(255) DEFAULT NULL,\n `declared_contract_source` varchar(255) DEFAULT NULL,\n `business_key` varchar(191) DEFAULT NULL,\n `visibility_labels` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`visibility_labels`)),\n `status` varchar(255) NOT NULL,\n `status_bucket` varchar(255) NOT NULL,\n `closed_reason` varchar(255) DEFAULT NULL,\n `connection` varchar(255) DEFAULT NULL,\n `queue` varchar(255) DEFAULT NULL,\n `started_at` timestamp(6) NULL DEFAULT NULL,\n `sort_timestamp` timestamp(6) NULL DEFAULT NULL,\n `sort_key` varchar(64) DEFAULT NULL,\n `closed_at` timestamp(6) NULL DEFAULT NULL,\n `archived_at` timestamp(6) NULL DEFAULT NULL,\n `archive_command_id` varchar(26) DEFAULT NULL,\n `archive_reason` varchar(255) DEFAULT NULL,\n `duration_ms` bigint(20) DEFAULT NULL,\n `wait_kind` varchar(255) DEFAULT NULL,\n `wait_reason` text DEFAULT NULL,\n `wait_started_at` timestamp(6) NULL DEFAULT NULL,\n `wait_deadline_at` timestamp(6) NULL DEFAULT NULL,\n `open_wait_id` varchar(191) DEFAULT NULL,\n `resume_source_kind` varchar(255) DEFAULT NULL,\n `resume_source_id` varchar(191) DEFAULT NULL,\n `next_task_at` timestamp(6) NULL DEFAULT NULL,\n `liveness_state` varchar(255) DEFAULT NULL,\n `liveness_reason` text DEFAULT NULL,\n `repair_blocked_reason` varchar(255) DEFAULT NULL,\n `repair_attention` tinyint(1) NOT NULL DEFAULT 0,\n `task_problem` tinyint(1) NOT NULL DEFAULT 0,\n `next_task_id` varchar(26) DEFAULT NULL,\n `next_task_type` varchar(255) DEFAULT NULL,\n `next_task_status` varchar(255) DEFAULT NULL,\n `next_task_lease_expires_at` timestamp(6) NULL DEFAULT NULL,\n `exception_count` int(10) unsigned NOT NULL DEFAULT 0,\n `history_event_count` int(10) unsigned NOT NULL DEFAULT 0,\n `history_size_bytes` bigint(20) unsigned NOT NULL DEFAULT 0,\n `history_fan_out` int(10) unsigned NOT NULL DEFAULT 0,\n `continue_as_new_recommended` tinyint(1) NOT NULL DEFAULT 0,\n `history_budget_pressure` varchar(32) NOT NULL DEFAULT 'ok',\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n KEY `workflow_run_summaries_status_bucket_started_at_index` (`status_bucket`,`started_at`),\n KEY `workflow_run_summaries_sort_order_index` (`sort_timestamp`,`id`),\n KEY `wfrs_namespace_sort_idx` (`namespace`,`sort_timestamp`,`id`),\n KEY `wfrs_namespace_type_sort_idx` (`namespace`,`workflow_type`,`sort_timestamp`,`id`),\n KEY `wfrs_namespace_status_sort_idx` (`namespace`,`status_bucket`,`sort_timestamp`,`id`),\n KEY `workflow_run_summaries_sort_key_index` (`sort_key`),\n KEY `workflow_run_summaries_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_run_summaries_is_current_run_index` (`is_current_run`),\n KEY `workflow_run_summaries_projection_schema_version_index` (`projection_schema_version`),\n KEY `workflow_run_summaries_namespace_index` (`namespace`),\n KEY `wfrs_decl_entry_mode_idx` (`declared_entry_mode`),\n KEY `wfrs_decl_contract_source_idx` (`declared_contract_source`),\n KEY `workflow_run_summaries_business_key_index` (`business_key`),\n KEY `workflow_run_summaries_status_index` (`status`),\n KEY `workflow_run_summaries_status_bucket_index` (`status_bucket`),\n KEY `workflow_run_summaries_archived_at_index` (`archived_at`),\n KEY `workflow_run_summaries_archive_command_id_index` (`archive_command_id`),\n KEY `workflow_run_summaries_repair_blocked_reason_index` (`repair_blocked_reason`),\n KEY `workflow_run_summaries_repair_attention_index` (`repair_attention`),\n KEY `workflow_run_summaries_continue_as_new_recommended_index` (`continue_as_new_recommended`),\n KEY `workflow_run_summaries_history_budget_pressure_index` (`history_budget_pressure`),\n KEY `wfrs_prom_metrics_series_idx` (`namespace`,`queue`,`workflow_type`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_run_timeline_entries", + "CREATE TABLE `workflow_run_timeline_entries` (\n `id` varchar(64) NOT NULL,\n `workflow_run_id` varchar(26) NOT NULL,\n `workflow_instance_id` varchar(191) NOT NULL,\n `history_event_id` varchar(26) NOT NULL,\n `sequence` int(10) unsigned NOT NULL,\n `type` varchar(255) NOT NULL,\n `kind` varchar(255) NOT NULL,\n `entry_kind` varchar(255) NOT NULL DEFAULT 'point',\n `source_kind` varchar(255) DEFAULT NULL,\n `source_id` varchar(191) DEFAULT NULL,\n `summary` text DEFAULT NULL,\n `recorded_at` timestamp(6) NULL DEFAULT NULL,\n `command_id` varchar(26) DEFAULT NULL,\n `command_sequence` int(10) unsigned DEFAULT NULL,\n `task_id` varchar(26) DEFAULT NULL,\n `activity_execution_id` varchar(26) DEFAULT NULL,\n `timer_id` varchar(191) DEFAULT NULL,\n `failure_id` varchar(26) DEFAULT NULL,\n `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`payload`)),\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_run_timeline_run_event_unique` (`workflow_run_id`,`history_event_id`),\n KEY `workflow_run_timeline_run_sequence_index` (`workflow_run_id`,`sequence`),\n KEY `workflow_run_timeline_instance_kind_recorded_index` (`workflow_instance_id`,`kind`,`recorded_at`),\n KEY `workflow_run_timeline_entries_workflow_run_id_index` (`workflow_run_id`),\n KEY `workflow_run_timeline_entries_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_run_timeline_entries_history_event_id_index` (`history_event_id`),\n KEY `workflow_run_timeline_entries_sequence_index` (`sequence`),\n KEY `workflow_run_timeline_entries_type_index` (`type`),\n KEY `workflow_run_timeline_entries_kind_index` (`kind`),\n KEY `workflow_run_timeline_entries_source_kind_index` (`source_kind`),\n KEY `workflow_run_timeline_entries_source_id_index` (`source_id`),\n KEY `workflow_run_timeline_entries_recorded_at_index` (`recorded_at`),\n KEY `workflow_run_timeline_entries_command_id_index` (`command_id`),\n KEY `workflow_run_timeline_entries_command_sequence_index` (`command_sequence`),\n KEY `workflow_run_timeline_entries_task_id_index` (`task_id`),\n KEY `workflow_run_timeline_entries_activity_execution_id_index` (`activity_execution_id`),\n KEY `workflow_run_timeline_entries_timer_id_index` (`timer_id`),\n KEY `workflow_run_timeline_entries_failure_id_index` (`failure_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_run_timers", + "CREATE TABLE `workflow_run_timers` (\n `id` varchar(26) NOT NULL,\n `workflow_run_id` varchar(26) NOT NULL,\n `sequence` int(10) unsigned NOT NULL,\n `status` varchar(255) NOT NULL,\n `delay_seconds` bigint(20) unsigned NOT NULL,\n `fire_at` timestamp(6) NOT NULL,\n `fired_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_run_timers_workflow_run_id_sequence_unique` (`workflow_run_id`,`sequence`),\n KEY `workflow_run_timers_status_fire_at_index` (`status`,`fire_at`),\n KEY `workflow_run_timers_workflow_run_id_index` (`workflow_run_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_run_timer_entries", + "CREATE TABLE `workflow_run_timer_entries` (\n `id` varchar(64) NOT NULL,\n `workflow_run_id` varchar(26) NOT NULL,\n `workflow_instance_id` varchar(191) NOT NULL,\n `timer_id` varchar(191) NOT NULL,\n `schema_version` smallint(5) unsigned NOT NULL DEFAULT 1,\n `position` int(10) unsigned NOT NULL,\n `sequence` int(10) unsigned DEFAULT NULL,\n `status` varchar(255) NOT NULL,\n `source_status` varchar(255) DEFAULT NULL,\n `delay_seconds` int(11) DEFAULT NULL,\n `fire_at` timestamp(6) NULL DEFAULT NULL,\n `fired_at` timestamp(6) NULL DEFAULT NULL,\n `cancelled_at` timestamp(6) NULL DEFAULT NULL,\n `timer_kind` varchar(191) DEFAULT NULL,\n `condition_wait_id` varchar(191) DEFAULT NULL,\n `condition_key` varchar(191) DEFAULT NULL,\n `condition_definition_fingerprint` varchar(191) DEFAULT NULL,\n `history_authority` varchar(255) DEFAULT NULL,\n `history_unsupported_reason` varchar(255) DEFAULT NULL,\n `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`payload`)),\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_run_timer_entries_run_timer_unique` (`workflow_run_id`,`timer_id`),\n KEY `workflow_run_timer_entries_run_status_position_index` (`workflow_run_id`,`status`,`position`),\n KEY `workflow_run_timer_entries_instance_kind_status_index` (`workflow_instance_id`,`timer_kind`,`status`),\n KEY `workflow_run_timer_entries_workflow_run_id_index` (`workflow_run_id`),\n KEY `workflow_run_timer_entries_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_run_timer_entries_sequence_index` (`sequence`),\n KEY `workflow_run_timer_entries_status_index` (`status`),\n KEY `workflow_run_timer_entries_source_status_index` (`source_status`),\n KEY `workflow_run_timer_entries_timer_kind_index` (`timer_kind`),\n KEY `workflow_run_timer_entries_condition_wait_id_index` (`condition_wait_id`),\n KEY `workflow_run_timer_entries_condition_key_index` (`condition_key`),\n KEY `workflow_run_timer_entries_history_authority_index` (`history_authority`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_run_waits", + "CREATE TABLE `workflow_run_waits` (\n `id` varchar(64) NOT NULL,\n `workflow_run_id` varchar(26) NOT NULL,\n `workflow_instance_id` varchar(191) NOT NULL,\n `wait_id` varchar(191) NOT NULL,\n `position` int(10) unsigned NOT NULL,\n `kind` varchar(255) NOT NULL,\n `sequence` int(10) unsigned DEFAULT NULL,\n `status` varchar(255) NOT NULL,\n `source_status` varchar(255) DEFAULT NULL,\n `summary` text DEFAULT NULL,\n `opened_at` timestamp(6) NULL DEFAULT NULL,\n `deadline_at` timestamp(6) NULL DEFAULT NULL,\n `resolved_at` timestamp(6) NULL DEFAULT NULL,\n `target_name` varchar(191) DEFAULT NULL,\n `target_type` varchar(191) DEFAULT NULL,\n `task_backed` tinyint(1) NOT NULL DEFAULT 0,\n `external_only` tinyint(1) NOT NULL DEFAULT 0,\n `resume_source_kind` varchar(191) DEFAULT NULL,\n `resume_source_id` varchar(191) DEFAULT NULL,\n `task_id` varchar(26) DEFAULT NULL,\n `task_type` varchar(255) DEFAULT NULL,\n `task_status` varchar(255) DEFAULT NULL,\n `command_id` varchar(26) DEFAULT NULL,\n `command_sequence` int(10) unsigned DEFAULT NULL,\n `command_status` varchar(255) DEFAULT NULL,\n `command_outcome` varchar(255) DEFAULT NULL,\n `history_authority` varchar(255) DEFAULT NULL,\n `history_unsupported_reason` varchar(255) DEFAULT NULL,\n `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`payload`)),\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_run_waits_run_wait_unique` (`workflow_run_id`,`wait_id`),\n KEY `workflow_run_waits_run_status_position_index` (`workflow_run_id`,`status`,`position`),\n KEY `workflow_run_waits_instance_kind_status_index` (`workflow_instance_id`,`kind`,`status`),\n KEY `workflow_run_waits_workflow_run_id_index` (`workflow_run_id`),\n KEY `workflow_run_waits_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_run_waits_kind_index` (`kind`),\n KEY `workflow_run_waits_sequence_index` (`sequence`),\n KEY `workflow_run_waits_status_index` (`status`),\n KEY `workflow_run_waits_source_status_index` (`source_status`),\n KEY `workflow_run_waits_target_name_index` (`target_name`),\n KEY `workflow_run_waits_task_backed_index` (`task_backed`),\n KEY `workflow_run_waits_resume_source_kind_index` (`resume_source_kind`),\n KEY `workflow_run_waits_resume_source_id_index` (`resume_source_id`),\n KEY `workflow_run_waits_task_id_index` (`task_id`),\n KEY `workflow_run_waits_command_id_index` (`command_id`),\n KEY `workflow_run_waits_history_authority_index` (`history_authority`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_schedules", + "CREATE TABLE `workflow_schedules` (\n `id` varchar(26) NOT NULL,\n `schedule_id` varchar(255) NOT NULL,\n `namespace` varchar(255) DEFAULT NULL,\n `spec` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`spec`)),\n `action` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`action`)),\n `status` varchar(16) NOT NULL DEFAULT 'active',\n `overlap_policy` varchar(32) NOT NULL DEFAULT 'skip',\n `note` text DEFAULT NULL,\n `memo` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`memo`)),\n `search_attributes` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`search_attributes`)),\n `visibility_labels` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`visibility_labels`)),\n `jitter_seconds` int(10) unsigned NOT NULL DEFAULT 0,\n `max_runs` bigint(20) unsigned DEFAULT NULL,\n `remaining_actions` bigint(20) unsigned DEFAULT NULL,\n `fires_count` bigint(20) unsigned NOT NULL DEFAULT 0,\n `failures_count` bigint(20) unsigned NOT NULL DEFAULT 0,\n `recent_actions` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`recent_actions`)),\n `buffered_actions` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`buffered_actions`)),\n `last_fired_at` timestamp(6) NULL DEFAULT NULL,\n `next_fire_at` timestamp(6) NULL DEFAULT NULL,\n `latest_workflow_instance_id` varchar(191) DEFAULT NULL,\n `connection` varchar(255) DEFAULT NULL,\n `queue` varchar(255) DEFAULT NULL,\n `paused_at` timestamp(6) NULL DEFAULT NULL,\n `deleted_at` timestamp(6) NULL DEFAULT NULL,\n `last_skip_reason` varchar(64) DEFAULT NULL,\n `last_skipped_at` timestamp(6) NULL DEFAULT NULL,\n `skipped_trigger_count` bigint(20) unsigned NOT NULL DEFAULT 0,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n `dispatch_summary` text DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_schedules_namespace_schedule_id_unique` (`namespace`,`schedule_id`),\n KEY `workflow_schedules_status_next_fire_at_index` (`status`,`next_fire_at`),\n KEY `workflow_schedules_namespace_index` (`namespace`),\n KEY `workflow_schedules_latest_workflow_instance_id_index` (`latest_workflow_instance_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_schedule_history_events", + "CREATE TABLE `workflow_schedule_history_events` (\n `id` varchar(26) NOT NULL,\n `workflow_schedule_id` varchar(26) NOT NULL,\n `schedule_id` varchar(255) NOT NULL,\n `namespace` varchar(255) DEFAULT NULL,\n `sequence` int(10) unsigned NOT NULL,\n `event_type` varchar(255) NOT NULL,\n `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`payload`)),\n `workflow_instance_id` varchar(191) DEFAULT NULL,\n `workflow_run_id` varchar(26) DEFAULT NULL,\n `recorded_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n `occurrence_at_utc` varchar(26) DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `wf_schedule_history_schedule_sequence_unique` (`workflow_schedule_id`,`sequence`),\n KEY `wf_schedule_history_namespace_schedule_idx` (`namespace`,`schedule_id`),\n KEY `wf_schedule_history_event_recorded_idx` (`event_type`,`recorded_at`),\n KEY `wf_schedule_history_workflow_schedule_idx` (`workflow_schedule_id`),\n KEY `wf_schedule_history_schedule_idx` (`schedule_id`),\n KEY `wf_schedule_history_namespace_idx` (`namespace`),\n KEY `wf_schedule_history_instance_idx` (`workflow_instance_id`),\n KEY `wf_schedule_history_run_idx` (`workflow_run_id`),\n KEY `wf_schedule_history_occurrence_idx` (`workflow_schedule_id`,`event_type`,`occurrence_at_utc`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_search_attributes", + "CREATE TABLE `workflow_search_attributes` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n `workflow_run_id` varchar(26) NOT NULL,\n `workflow_instance_id` varchar(191) NOT NULL,\n `key` varchar(191) NOT NULL COMMENT 'Attribute name (e.g., \"customer_id\", \"priority\", \"region\")',\n `type` varchar(16) NOT NULL COMMENT 'Type: string, keyword, int, float, bool, datetime',\n `value_string` text DEFAULT NULL COMMENT 'For type=string (max 2048 chars enforced at app level)',\n `value_keyword` varchar(255) DEFAULT NULL COMMENT 'For type=keyword (exact match, indexed)',\n `value_keyword_list` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'For type=keyword_list (ordered exact-match values)' CHECK (json_valid(`value_keyword_list`)),\n `value_int` bigint(20) DEFAULT NULL COMMENT 'For type=int',\n `value_float` double DEFAULT NULL COMMENT 'For type=float',\n `value_bool` tinyint(1) DEFAULT NULL COMMENT 'For type=bool',\n `value_datetime` timestamp(6) NULL DEFAULT NULL COMMENT 'For type=datetime (microsecond precision)',\n `upserted_at_sequence` int(10) unsigned NOT NULL COMMENT 'History sequence when this attribute was last upserted',\n `inherited_from_parent` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'True if inherited via continue-as-new',\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_search_attrs_run_key_unique` (`workflow_run_id`,`key`),\n KEY `workflow_search_attrs_instance_key_type` (`workflow_instance_id`,`key`,`type`),\n KEY `workflow_search_attrs_key_keyword` (`key`,`value_keyword`),\n KEY `workflow_search_attrs_key_int` (`key`,`value_int`),\n KEY `workflow_search_attrs_key_float` (`key`,`value_float`),\n KEY `workflow_search_attrs_key_bool` (`key`,`value_bool`),\n KEY `workflow_search_attrs_key_datetime` (`key`,`value_datetime`),\n KEY `workflow_search_attributes_workflow_run_id_index` (`workflow_run_id`),\n KEY `workflow_search_attributes_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_search_attributes_value_keyword_index` (`value_keyword`),\n KEY `workflow_search_attributes_value_int_index` (`value_int`),\n KEY `workflow_search_attributes_value_float_index` (`value_float`),\n KEY `workflow_search_attributes_value_bool_index` (`value_bool`),\n KEY `workflow_search_attributes_value_datetime_index` (`value_datetime`),\n CONSTRAINT `workflow_search_attributes_workflow_run_id_foreign` FOREIGN KEY (`workflow_run_id`) REFERENCES `workflow_runs` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_services", + "CREATE TABLE `workflow_services` (\n `id` varchar(26) NOT NULL,\n `workflow_service_endpoint_id` varchar(26) NOT NULL,\n `namespace` varchar(255) DEFAULT NULL,\n `service_name` varchar(191) NOT NULL,\n `description` text DEFAULT NULL,\n `boundary_policy` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`boundary_policy`)),\n `metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`metadata`)),\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `wf_services_namespace_endpoint_name_unique` (`namespace`,`workflow_service_endpoint_id`,`service_name`),\n KEY `wf_services_namespace_name_idx` (`namespace`,`service_name`),\n KEY `wf_services_endpoint_idx` (`workflow_service_endpoint_id`),\n KEY `wf_services_namespace_idx` (`namespace`),\n KEY `wf_services_name_idx` (`service_name`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_service_calls", + "CREATE TABLE `workflow_service_calls` (\n `id` varchar(26) NOT NULL,\n `workflow_service_endpoint_id` varchar(26) DEFAULT NULL,\n `workflow_service_id` varchar(26) DEFAULT NULL,\n `workflow_service_operation_id` varchar(26) DEFAULT NULL,\n `namespace` varchar(255) DEFAULT NULL,\n `endpoint_name` varchar(191) NOT NULL,\n `service_name` varchar(191) NOT NULL,\n `operation_name` varchar(191) NOT NULL,\n `caller_namespace` varchar(255) DEFAULT NULL,\n `caller_workflow_instance_id` varchar(191) DEFAULT NULL,\n `caller_workflow_run_id` varchar(26) DEFAULT NULL,\n `target_namespace` varchar(255) DEFAULT NULL,\n `linked_workflow_instance_id` varchar(191) DEFAULT NULL,\n `linked_workflow_run_id` varchar(26) DEFAULT NULL,\n `linked_workflow_update_id` varchar(26) DEFAULT NULL,\n `status` varchar(32) NOT NULL,\n `outcome` varchar(64) DEFAULT NULL,\n `operation_mode` varchar(32) NOT NULL,\n `resolved_binding_kind` varchar(64) DEFAULT NULL,\n `resolved_target_reference` varchar(191) DEFAULT NULL,\n `payload_codec` varchar(255) DEFAULT NULL,\n `input_payload_reference` varchar(191) DEFAULT NULL,\n `output_payload_reference` varchar(191) DEFAULT NULL,\n `failure_payload_reference` varchar(191) DEFAULT NULL,\n `failure_message` text DEFAULT NULL,\n `idempotency_key` varchar(191) DEFAULT NULL,\n `deadline_policy` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`deadline_policy`)),\n `idempotency_policy` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`idempotency_policy`)),\n `cancellation_policy` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`cancellation_policy`)),\n `retry_policy` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`retry_policy`)),\n `boundary_policy` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`boundary_policy`)),\n `metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`metadata`)),\n `outcome_category` varchar(32) DEFAULT NULL,\n `outcome_reason` varchar(191) DEFAULT NULL,\n `outcome_message` text DEFAULT NULL,\n `outcome_metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`outcome_metadata`)),\n `policy_name` varchar(191) DEFAULT NULL,\n `retry_after_seconds` int(10) unsigned DEFAULT NULL,\n `caller_principal_subject` varchar(191) DEFAULT NULL,\n `caller_principal_method` varchar(64) DEFAULT NULL,\n `caller_principal_roles` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`caller_principal_roles`)),\n `caller_principal_tenant` varchar(191) DEFAULT NULL,\n `caller_principal_claims` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`caller_principal_claims`)),\n `accepted_at` timestamp(6) NULL DEFAULT NULL,\n `started_at` timestamp(6) NULL DEFAULT NULL,\n `completed_at` timestamp(6) NULL DEFAULT NULL,\n `failed_at` timestamp(6) NULL DEFAULT NULL,\n `cancelled_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n KEY `wf_service_calls_namespace_status_idx` (`namespace`,`status`),\n KEY `wf_service_calls_caller_status_idx` (`caller_namespace`,`status`),\n KEY `wf_service_calls_target_status_idx` (`target_namespace`,`status`),\n KEY `wf_service_calls_namespace_outcome_idx` (`namespace`,`outcome`),\n KEY `wf_service_calls_caller_outcome_idx` (`caller_namespace`,`outcome`),\n KEY `wf_service_calls_target_outcome_idx` (`target_namespace`,`outcome`),\n KEY `wf_service_calls_endpoint_idx` (`workflow_service_endpoint_id`),\n KEY `wf_service_calls_service_idx` (`workflow_service_id`),\n KEY `wf_service_calls_operation_idx` (`workflow_service_operation_id`),\n KEY `wf_service_calls_namespace_idx` (`namespace`),\n KEY `wf_service_calls_caller_namespace_idx` (`caller_namespace`),\n KEY `wf_service_calls_caller_instance_idx` (`caller_workflow_instance_id`),\n KEY `wf_service_calls_caller_run_idx` (`caller_workflow_run_id`),\n KEY `wf_service_calls_target_namespace_idx` (`target_namespace`),\n KEY `wf_service_calls_linked_instance_idx` (`linked_workflow_instance_id`),\n KEY `wf_service_calls_linked_run_idx` (`linked_workflow_run_id`),\n KEY `wf_service_calls_linked_update_idx` (`linked_workflow_update_id`),\n KEY `wf_service_calls_status_idx` (`status`),\n KEY `wf_service_calls_outcome_idx` (`outcome`),\n KEY `wf_service_calls_mode_idx` (`operation_mode`),\n KEY `wf_service_calls_binding_kind_idx` (`resolved_binding_kind`),\n KEY `wf_service_calls_idempotency_idx` (`idempotency_key`),\n KEY `wf_service_calls_outcome_category_idx` (`outcome_category`),\n KEY `wf_service_calls_policy_idx` (`policy_name`),\n KEY `wf_service_calls_principal_subject_idx` (`caller_principal_subject`),\n KEY `wf_service_calls_accepted_at_idx` (`accepted_at`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_service_endpoints", + "CREATE TABLE `workflow_service_endpoints` (\n `id` varchar(26) NOT NULL,\n `namespace` varchar(255) DEFAULT NULL,\n `endpoint_name` varchar(191) NOT NULL,\n `description` text DEFAULT NULL,\n `boundary_policy` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`boundary_policy`)),\n `metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`metadata`)),\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `wf_service_endpoints_namespace_name_unique` (`namespace`,`endpoint_name`),\n KEY `wf_service_endpoints_namespace_idx` (`namespace`),\n KEY `wf_service_endpoints_name_idx` (`endpoint_name`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_service_operations", + "CREATE TABLE `workflow_service_operations` (\n `id` varchar(26) NOT NULL,\n `workflow_service_endpoint_id` varchar(26) NOT NULL,\n `workflow_service_id` varchar(26) NOT NULL,\n `namespace` varchar(255) DEFAULT NULL,\n `operation_name` varchar(191) NOT NULL,\n `description` text DEFAULT NULL,\n `operation_mode` varchar(32) NOT NULL,\n `handler_binding_kind` varchar(64) NOT NULL,\n `handler_target_reference` varchar(191) DEFAULT NULL,\n `handler_binding` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`handler_binding`)),\n `deadline_policy` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`deadline_policy`)),\n `idempotency_policy` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`idempotency_policy`)),\n `cancellation_policy` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`cancellation_policy`)),\n `retry_policy` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`retry_policy`)),\n `boundary_policy` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`boundary_policy`)),\n `metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`metadata`)),\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `wf_service_ops_namespace_service_name_unique` (`namespace`,`workflow_service_id`,`operation_name`),\n KEY `wf_service_ops_namespace_name_idx` (`namespace`,`operation_name`),\n KEY `wf_service_ops_endpoint_idx` (`workflow_service_endpoint_id`),\n KEY `wf_service_ops_service_idx` (`workflow_service_id`),\n KEY `wf_service_ops_namespace_idx` (`namespace`),\n KEY `wf_service_ops_name_idx` (`operation_name`),\n KEY `wf_service_ops_mode_idx` (`operation_mode`),\n KEY `wf_service_ops_binding_kind_idx` (`handler_binding_kind`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_signal_records", + "CREATE TABLE `workflow_signal_records` (\n `id` varchar(26) NOT NULL,\n `workflow_command_id` varchar(26) NOT NULL,\n `workflow_instance_id` varchar(191) DEFAULT NULL,\n `workflow_run_id` varchar(26) DEFAULT NULL,\n `target_scope` varchar(255) NOT NULL DEFAULT 'instance',\n `requested_workflow_run_id` varchar(26) DEFAULT NULL,\n `resolved_workflow_run_id` varchar(26) DEFAULT NULL,\n `signal_name` varchar(255) NOT NULL,\n `signal_wait_id` varchar(255) DEFAULT NULL,\n `status` varchar(255) NOT NULL,\n `outcome` varchar(255) DEFAULT NULL,\n `command_sequence` int(10) unsigned DEFAULT NULL,\n `workflow_sequence` int(10) unsigned DEFAULT NULL,\n `payload_codec` varchar(255) DEFAULT NULL,\n `arguments` longtext DEFAULT NULL,\n `validation_errors` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`validation_errors`)),\n `rejection_reason` varchar(255) DEFAULT NULL,\n `received_at` timestamp(6) NULL DEFAULT NULL,\n `applied_at` timestamp(6) NULL DEFAULT NULL,\n `rejected_at` timestamp(6) NULL DEFAULT NULL,\n `closed_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_signal_records_workflow_command_id_unique` (`workflow_command_id`),\n KEY `workflow_signal_records_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_signal_records_workflow_run_id_index` (`workflow_run_id`),\n KEY `workflow_signal_records_requested_workflow_run_id_index` (`requested_workflow_run_id`),\n KEY `workflow_signal_records_resolved_workflow_run_id_index` (`resolved_workflow_run_id`),\n KEY `workflow_signal_records_signal_name_index` (`signal_name`),\n KEY `workflow_signal_records_signal_wait_id_index` (`signal_wait_id`),\n KEY `workflow_signal_records_status_index` (`status`),\n KEY `workflow_signal_records_outcome_index` (`outcome`),\n KEY `workflow_signal_records_command_sequence_index` (`command_sequence`),\n KEY `workflow_signal_records_workflow_sequence_index` (`workflow_sequence`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_tasks", + "CREATE TABLE `workflow_tasks` (\n `id` varchar(26) NOT NULL,\n `workflow_run_id` varchar(26) NOT NULL,\n `namespace` varchar(255) DEFAULT NULL,\n `task_type` varchar(255) NOT NULL,\n `status` varchar(255) NOT NULL,\n `compatibility` varchar(255) DEFAULT NULL,\n `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`payload`)),\n `connection` varchar(255) DEFAULT NULL,\n `queue` varchar(255) DEFAULT NULL,\n `priority` tinyint(3) unsigned NOT NULL DEFAULT 5,\n `fairness_key` varchar(64) DEFAULT NULL,\n `fairness_weight` smallint(5) unsigned NOT NULL DEFAULT 1,\n `sticky_worker_id` varchar(255) DEFAULT NULL,\n `sticky_until` timestamp(6) NULL DEFAULT NULL,\n `sticky_replay_mode` varchar(255) DEFAULT NULL,\n `sticky_claimed_at` timestamp(6) NULL DEFAULT NULL,\n `available_at` timestamp(6) NULL DEFAULT NULL,\n `leased_at` timestamp(6) NULL DEFAULT NULL,\n `lease_owner` varchar(255) DEFAULT NULL,\n `lease_expires_at` timestamp(6) NULL DEFAULT NULL,\n `attempt_count` int(10) unsigned NOT NULL DEFAULT 0,\n `last_dispatch_attempt_at` timestamp(6) NULL DEFAULT NULL,\n `last_dispatched_at` timestamp(6) NULL DEFAULT NULL,\n `last_dispatch_error` text DEFAULT NULL,\n `last_claim_failed_at` timestamp(6) NULL DEFAULT NULL,\n `last_claim_error` text DEFAULT NULL,\n `repair_count` int(10) unsigned NOT NULL DEFAULT 0,\n `repair_available_at` timestamp(6) NULL DEFAULT NULL,\n `last_error` text DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n `ready_origin_at` datetime(6) DEFAULT NULL,\n PRIMARY KEY (`id`),\n KEY `workflow_tasks_status_available_at_index` (`status`,`available_at`),\n KEY `workflow_tasks_workflow_run_id_index` (`workflow_run_id`),\n KEY `workflow_tasks_namespace_index` (`namespace`),\n KEY `workflow_tasks_sticky_worker_id_index` (`sticky_worker_id`),\n KEY `workflow_tasks_sticky_until_index` (`sticky_until`),\n KEY `workflow_tasks_sticky_replay_mode_index` (`sticky_replay_mode`),\n KEY `workflow_tasks_sticky_claimed_at_index` (`sticky_claimed_at`),\n KEY `workflow_tasks_dispatch_order_index` (`queue`,`status`,`priority`,`available_at`),\n KEY `workflow_tasks_namespace_queue_status_idx` (`namespace`,`queue`,`status`),\n KEY `workflow_tasks_fairness_class_index` (`queue`,`status`,`fairness_key`),\n KEY `workflow_tasks_prom_metrics_queue_idx` (`namespace`,`queue`),\n KEY `dw_workflow_tasks_poll` (`namespace`(64),`queue`(64),`task_type`(16),`status`(16),`available_at`),\n KEY `dw_workflow_tasks_scoped_dispatch` (`namespace`,`queue`,`task_type`(16),`status`(16),`priority`,`available_at`,`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_task_poll_cursors", + "CREATE TABLE `workflow_task_poll_cursors` (\n `namespace` varchar(128) NOT NULL,\n `task_queue` varchar(255) NOT NULL,\n `next_task_kind` varchar(32) NOT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`namespace`,`task_queue`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_updates", + "CREATE TABLE `workflow_updates` (\n `id` varchar(26) NOT NULL,\n `workflow_command_id` varchar(26) NOT NULL,\n `workflow_instance_id` varchar(191) DEFAULT NULL,\n `workflow_run_id` varchar(26) DEFAULT NULL,\n `target_scope` varchar(255) NOT NULL DEFAULT 'instance',\n `requested_workflow_run_id` varchar(26) DEFAULT NULL,\n `resolved_workflow_run_id` varchar(26) DEFAULT NULL,\n `update_name` varchar(255) NOT NULL,\n `status` varchar(255) NOT NULL,\n `outcome` varchar(255) DEFAULT NULL,\n `command_sequence` int(10) unsigned DEFAULT NULL,\n `workflow_sequence` int(10) unsigned DEFAULT NULL,\n `payload_codec` varchar(255) DEFAULT NULL,\n `arguments` longtext DEFAULT NULL,\n `result` longtext DEFAULT NULL,\n `validation_errors` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`validation_errors`)),\n `rejection_reason` varchar(255) DEFAULT NULL,\n `failure_id` varchar(26) DEFAULT NULL,\n `failure_message` text DEFAULT NULL,\n `accepted_at` timestamp(6) NULL DEFAULT NULL,\n `applied_at` timestamp(6) NULL DEFAULT NULL,\n `rejected_at` timestamp(6) NULL DEFAULT NULL,\n `closed_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_updates_workflow_command_id_unique` (`workflow_command_id`),\n KEY `workflow_updates_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_updates_workflow_run_id_index` (`workflow_run_id`),\n KEY `workflow_updates_requested_workflow_run_id_index` (`requested_workflow_run_id`),\n KEY `workflow_updates_resolved_workflow_run_id_index` (`resolved_workflow_run_id`),\n KEY `workflow_updates_update_name_index` (`update_name`),\n KEY `workflow_updates_status_index` (`status`),\n KEY `workflow_updates_outcome_index` (`outcome`),\n KEY `workflow_updates_command_sequence_index` (`command_sequence`),\n KEY `workflow_updates_workflow_sequence_index` (`workflow_sequence`),\n KEY `workflow_updates_failure_id_index` (`failure_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_update_validation_tasks", + "CREATE TABLE `workflow_update_validation_tasks` (\n `id` varchar(26) NOT NULL,\n `idempotency_key` varchar(64) NOT NULL,\n `namespace` varchar(255) NOT NULL,\n `workflow_instance_id` varchar(191) NOT NULL,\n `workflow_run_id` varchar(26) NOT NULL,\n `workflow_type` varchar(255) NOT NULL,\n `task_queue` varchar(255) NOT NULL,\n `compatibility` varchar(255) DEFAULT NULL,\n `workflow_definition_fingerprint` varchar(255) DEFAULT NULL,\n `update_name` varchar(255) NOT NULL,\n `request_id` varchar(255) NOT NULL,\n `input_hash` varchar(64) NOT NULL,\n `payload_codec` varchar(255) NOT NULL,\n `arguments` longtext NOT NULL,\n `command_context` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`command_context`)),\n `status` varchar(255) NOT NULL,\n `attempt_count` int(10) unsigned NOT NULL DEFAULT 0,\n `lease_owner` varchar(255) DEFAULT NULL,\n `lease_expires_at` timestamp(6) NULL DEFAULT NULL,\n `rejection_reason` varchar(255) DEFAULT NULL,\n `rejection_message` text DEFAULT NULL,\n `failure_type` varchar(255) DEFAULT NULL,\n `validation_errors` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`validation_errors`)),\n `approved_at` timestamp(6) NULL DEFAULT NULL,\n `rejected_at` timestamp(6) NULL DEFAULT NULL,\n `failed_at` timestamp(6) NULL DEFAULT NULL,\n `timed_out_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_update_validation_tasks_idempotency_key_unique` (`idempotency_key`),\n KEY `workflow_update_validation_poll_index` (`namespace`,`task_queue`,`status`,`created_at`),\n KEY `workflow_update_validation_tasks_namespace_index` (`namespace`),\n KEY `workflow_update_validation_tasks_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_update_validation_tasks_workflow_run_id_index` (`workflow_run_id`),\n KEY `workflow_update_validation_tasks_workflow_type_index` (`workflow_type`),\n KEY `workflow_update_validation_tasks_task_queue_index` (`task_queue`),\n KEY `workflow_update_validation_tasks_compatibility_index` (`compatibility`),\n KEY `workflow_update_validation_tasks_update_name_index` (`update_name`),\n KEY `workflow_update_validation_tasks_status_index` (`status`),\n KEY `workflow_update_validation_tasks_lease_owner_index` (`lease_owner`),\n KEY `workflow_update_validation_tasks_lease_expires_at_index` (`lease_expires_at`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_worker_build_id_rollouts", + "CREATE TABLE `workflow_worker_build_id_rollouts` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n `namespace` varchar(128) NOT NULL,\n `task_queue` varchar(255) NOT NULL,\n `build_id` varchar(255) NOT NULL DEFAULT '',\n `drain_intent` varchar(32) NOT NULL DEFAULT 'active',\n `drained_at` timestamp NULL DEFAULT NULL,\n `created_at` timestamp NULL DEFAULT NULL,\n `updated_at` timestamp NULL DEFAULT NULL,\n `promoted_at` timestamp NULL DEFAULT NULL,\n `rolled_back_at` timestamp NULL DEFAULT NULL,\n `required_compatibility` varchar(255) DEFAULT NULL,\n `recorded_fingerprint` varchar(255) DEFAULT NULL,\n `compatibility_policy` varchar(32) DEFAULT NULL,\n `workflow_types` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`workflow_types`)),\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_build_id_rollouts_scope_unique` (`namespace`,`task_queue`,`build_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_worker_compatibility_heartbeats", + "CREATE TABLE `workflow_worker_compatibility_heartbeats` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n `worker_id` varchar(255) NOT NULL,\n `scope_key` varchar(64) NOT NULL,\n `namespace` varchar(255) DEFAULT NULL,\n `host` varchar(255) DEFAULT NULL,\n `process_id` varchar(255) DEFAULT NULL,\n `connection` varchar(255) DEFAULT NULL,\n `queue` varchar(255) DEFAULT NULL,\n `supported` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`supported`)),\n `recorded_at` datetime(6) NOT NULL,\n `expires_at` datetime(6) NOT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_worker_compatibility_heartbeats_scope_unique` (`worker_id`,`scope_key`),\n KEY `workflow_worker_compatibility_heartbeats_namespace_index` (`namespace`),\n KEY `workflow_worker_compatibility_heartbeats_connection_index` (`connection`),\n KEY `workflow_worker_compatibility_heartbeats_queue_index` (`queue`),\n KEY `workflow_worker_compatibility_heartbeats_expires_at_index` (`expires_at`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_worker_registrations", + "CREATE TABLE `workflow_worker_registrations` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n `worker_id` varchar(255) NOT NULL,\n `namespace` varchar(128) NOT NULL,\n `task_queue` varchar(255) NOT NULL,\n `runtime` varchar(32) NOT NULL,\n `sdk_version` varchar(64) DEFAULT NULL,\n `build_id` varchar(255) DEFAULT NULL,\n `supported_workflow_types` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`supported_workflow_types`)),\n `workflow_definition_fingerprints` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`workflow_definition_fingerprints`)),\n `workflow_command_contracts` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`workflow_command_contracts`)),\n `supported_activity_types` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`supported_activity_types`)),\n `capabilities` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`capabilities`)),\n `capability_manifest` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`capability_manifest`)),\n `max_concurrent_workflow_tasks` int(10) unsigned NOT NULL DEFAULT 100,\n `max_concurrent_activity_tasks` int(10) unsigned NOT NULL DEFAULT 100,\n `max_concurrent_worker_sessions` int(10) unsigned NOT NULL DEFAULT 10,\n `available_workflow_slots` int(10) unsigned DEFAULT NULL,\n `available_activity_slots` int(10) unsigned DEFAULT NULL,\n `available_session_slots` int(10) unsigned DEFAULT NULL,\n `process_metrics` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`process_metrics`)),\n `heartbeat_interval_seconds` int(10) unsigned DEFAULT NULL,\n `last_heartbeat_at` timestamp NULL DEFAULT NULL,\n `status` varchar(32) NOT NULL DEFAULT 'active',\n `created_at` timestamp NULL DEFAULT NULL,\n `updated_at` timestamp NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_worker_registrations_worker_id_namespace_unique` (`worker_id`,`namespace`),\n KEY `workflow_worker_registrations_namespace_task_queue_status_index` (`namespace`,`task_queue`,`status`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_worker_sessions", + "CREATE TABLE `workflow_worker_sessions` (\n `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n `namespace` varchar(128) NOT NULL,\n `session_id` varchar(255) NOT NULL,\n `connection` varchar(255) DEFAULT NULL,\n `queue` varchar(255) DEFAULT NULL,\n `requirements` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`requirements`)),\n `status` varchar(32) NOT NULL DEFAULT 'active',\n `lease_owner` varchar(255) DEFAULT NULL,\n `lease_expires_at` timestamp NULL DEFAULT NULL,\n `ttl_expires_at` timestamp NULL DEFAULT NULL,\n `closed_at` timestamp NULL DEFAULT NULL,\n `failure_reason` varchar(128) DEFAULT NULL,\n `lease_seconds` int(10) unsigned NOT NULL DEFAULT 120,\n `ttl_seconds` int(10) unsigned NOT NULL DEFAULT 1800,\n `max_concurrent_activities` int(10) unsigned NOT NULL DEFAULT 1,\n `create_if_missing` tinyint(1) NOT NULL DEFAULT 1,\n `allow_reacquire_after_failure` tinyint(1) NOT NULL DEFAULT 1,\n `last_heartbeat_at` timestamp NULL DEFAULT NULL,\n `created_at` timestamp NULL DEFAULT NULL,\n `updated_at` timestamp NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_worker_sessions_namespace_session_id_unique` (`namespace`,`session_id`),\n KEY `workflow_worker_sessions_namespace_status_index` (`namespace`,`status`),\n KEY `workflow_worker_sessions_namespace_lease_owner_status_index` (`namespace`,`lease_owner`,`status`),\n KEY `workflow_worker_sessions_namespace_queue_status_index` (`namespace`,`queue`,`status`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "_sqlx_migrations", + "CREATE TABLE `_sqlx_migrations` (\n `version` bigint(20) NOT NULL,\n `description` text NOT NULL,\n `installed_on` timestamp NOT NULL DEFAULT current_timestamp(),\n `success` tinyint(1) NOT NULL,\n `checksum` blob NOT NULL,\n `execution_time` bigint(20) NOT NULL,\n PRIMARY KEY (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ] +] diff --git a/rust/migrations/mariadb/0015_schedule_dispatch_summary.sql b/rust/migrations/mariadb/0015_schedule_dispatch_summary.sql new file mode 100644 index 000000000..5d527f326 --- /dev/null +++ b/rust/migrations/mariadb/0015_schedule_dispatch_summary.sql @@ -0,0 +1,2 @@ +-- Bounded atomic dispatch authority. Legacy schedules remain unknown. +ALTER TABLE workflow_schedules ADD COLUMN dispatch_summary TEXT NULL; diff --git a/rust/migrations/mysql/0016_catalog.json b/rust/migrations/mysql/0016_catalog.json new file mode 100644 index 000000000..0336cd8e6 --- /dev/null +++ b/rust/migrations/mysql/0016_catalog.json @@ -0,0 +1,254 @@ +[ + [ + "_sqlx_migrations", + "CREATE TABLE `_sqlx_migrations` (\n `version` bigint NOT NULL,\n `description` text COLLATE utf8mb4_unicode_ci NOT NULL,\n `installed_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n `success` tinyint(1) NOT NULL,\n `checksum` blob NOT NULL,\n `execution_time` bigint NOT NULL,\n PRIMARY KEY (`version`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "activity_attempts", + "CREATE TABLE `activity_attempts` (\n `id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `activity_execution_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_task_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `worker_attempt_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `attempt_number` int unsigned NOT NULL,\n `status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `lease_owner` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `started_at` timestamp(6) NOT NULL,\n `last_heartbeat_at` timestamp(6) NULL DEFAULT NULL,\n `lease_expires_at` timestamp(6) NULL DEFAULT NULL,\n `closed_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `activity_attempts_activity_execution_id_attempt_number_unique` (`activity_execution_id`,`attempt_number`),\n KEY `activity_attempts_workflow_run_id_index` (`workflow_run_id`),\n KEY `activity_attempts_activity_execution_id_index` (`activity_execution_id`),\n KEY `activity_attempts_workflow_task_id_index` (`workflow_task_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "activity_executions", + "CREATE TABLE `activity_executions` (\n `id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `sequence` int unsigned NOT NULL,\n `activity_class` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `activity_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `payload_codec` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `arguments` longtext COLLATE utf8mb4_unicode_ci,\n `result` longtext COLLATE utf8mb4_unicode_ci,\n `exception` longtext COLLATE utf8mb4_unicode_ci,\n `connection` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `queue` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `attempt_count` int unsigned NOT NULL DEFAULT '1',\n `current_attempt_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `retry_policy` longtext COLLATE utf8mb4_bin,\n `parallel_group_path` longtext COLLATE utf8mb4_bin,\n `activity_options` longtext COLLATE utf8mb4_bin,\n `schedule_deadline_at` timestamp(6) NULL DEFAULT NULL,\n `close_deadline_at` timestamp(6) NULL DEFAULT NULL,\n `schedule_to_close_deadline_at` timestamp(6) NULL DEFAULT NULL,\n `heartbeat_deadline_at` timestamp(6) NULL DEFAULT NULL,\n `started_at` timestamp(6) NULL DEFAULT NULL,\n `closed_at` timestamp(6) NULL DEFAULT NULL,\n `last_heartbeat_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `activity_executions_workflow_run_id_sequence_unique` (`workflow_run_id`,`sequence`),\n KEY `activity_executions_workflow_run_id_index` (`workflow_run_id`),\n KEY `activity_exec_prom_metrics_series_idx` (`workflow_run_id`,`queue`,`activity_type`),\n CONSTRAINT `dw_json_text_5f011f3fc9ed1cbf3798` CHECK (json_valid(`activity_options`)),\n CONSTRAINT `dw_json_text_b0ad277df9011ce8dcd8` CHECK (json_valid(`parallel_group_path`)),\n CONSTRAINT `dw_json_text_da40cddf645f92a0f5d3` CHECK (json_valid(`retry_policy`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "dw_command_intents", + "CREATE TABLE `dw_command_intents` (\n `command_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `namespace` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `intent_digest` varchar(71) COLLATE utf8mb4_unicode_ci NOT NULL,\n PRIMARY KEY (`command_id`),\n KEY `dw_command_intents_namespace` (`namespace`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "dw_external_payload_deletions", + "CREATE TABLE `dw_external_payload_deletions` (\n `id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `namespace` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `storage_uri` text COLLATE utf8mb4_unicode_ci NOT NULL,\n `storage_uri_sha256` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n `storage_policy` longtext COLLATE utf8mb4_unicode_ci NOT NULL,\n `attempts` bigint NOT NULL DEFAULT '0',\n `failure_code` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `created_at` datetime(6) NOT NULL,\n `updated_at` datetime(6) NOT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `dw_external_payload_deletions_uri` (`namespace`,`storage_uri_sha256`),\n KEY `dw_external_payload_deletions_due` (`namespace`,`updated_at`,`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "dw_poll_receipts", + "CREATE TABLE `dw_poll_receipts` (\n `namespace` varchar(255) COLLATE utf8mb4_0900_bin NOT NULL,\n `worker_id` varchar(255) COLLATE utf8mb4_0900_bin NOT NULL,\n `kind` varchar(8) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,\n `request_id` varchar(255) COLLATE utf8mb4_0900_bin NOT NULL,\n `task_id` varchar(26) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,\n `attempt` bigint NOT NULL,\n `response` longtext COLLATE utf8mb4_bin NOT NULL,\n `expires_at` timestamp(6) NOT NULL,\n PRIMARY KEY (`namespace`,`worker_id`,`kind`,`request_id`),\n KEY `dw_poll_receipts_task` (`task_id`),\n KEY `dw_poll_receipts_expiration` (`expires_at`),\n CONSTRAINT `dw_poll_receipts_task` FOREIGN KEY (`task_id`) REFERENCES `workflow_tasks` (`id`) ON DELETE CASCADE,\n CONSTRAINT `dw_json_text_b5a74d059c497aac89e1` CHECK (json_valid(`response`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin" + ], + [ + "dw_query_cache", + "CREATE TABLE `dw_query_cache` (\n `key` varchar(64) COLLATE utf8mb4_bin NOT NULL,\n `value` longtext COLLATE utf8mb4_bin NOT NULL,\n `expiration` bigint NOT NULL,\n PRIMARY KEY (`key`),\n KEY `dw_query_cache_expiration` (`expiration`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin" + ], + [ + "dw_run_command_contracts", + "CREATE TABLE `dw_run_command_contracts` (\n `workflow_run_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `namespace` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `contract` longtext COLLATE utf8mb4_unicode_ci NOT NULL,\n `worker_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `workflow_task_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `bound_at` datetime(6) NOT NULL,\n PRIMARY KEY (`workflow_run_id`),\n KEY `dw_run_command_contracts_namespace` (`namespace`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "dw_server_schema", + "CREATE TABLE `dw_server_schema` (\n `engine` varchar(64) COLLATE utf8mb4_bin NOT NULL,\n `version` bigint NOT NULL,\n `bootstrap_checksum` varbinary(48) NOT NULL,\n PRIMARY KEY (`engine`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin" + ], + [ + "dw_service_admission_counters", + "CREATE TABLE `dw_service_admission_counters` (\n `cache_key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `amount` bigint NOT NULL,\n `expires_at` datetime(6) NOT NULL,\n PRIMARY KEY (`cache_key`),\n KEY `dw_service_admission_counters_expiry` (`expires_at`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "dw_service_call_deadlines", + "CREATE TABLE `dw_service_call_deadlines` (\n `service_call_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `namespace` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,\n `call_deadline_at` datetime(6) NOT NULL,\n PRIMARY KEY (`service_call_id`),\n KEY `dw_service_call_deadlines_due` (`call_deadline_at`,`service_call_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "dw_stream_reclaims", + "CREATE TABLE `dw_stream_reclaims` (\n `stream_id` bigint unsigned NOT NULL,\n `namespace` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `reclaim_at` datetime(6) NOT NULL,\n PRIMARY KEY (`stream_id`),\n KEY `dw_stream_reclaims_due` (`namespace`,`reclaim_at`,`stream_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "dw_task_completions", + "CREATE TABLE `dw_task_completions` (\n `task_id` varchar(26) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,\n `receipt` longtext COLLATE utf8mb4_bin NOT NULL,\n PRIMARY KEY (`task_id`),\n CONSTRAINT `dw_task_completions_task` FOREIGN KEY (`task_id`) REFERENCES `workflow_tasks` (`id`) ON DELETE CASCADE,\n CONSTRAINT `dw_json_text_49816cb4519d3d981518` CHECK (json_valid(`receipt`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "dw_task_queue_pauses", + "CREATE TABLE `dw_task_queue_pauses` (\n `namespace` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,\n `task_queue` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,\n `reason` text COLLATE utf8mb4_unicode_ci,\n `paused_by` text COLLATE utf8mb4_unicode_ci,\n `paused_at` datetime(6) NOT NULL,\n `resumed_by` text COLLATE utf8mb4_unicode_ci,\n `resumed_at` datetime(6) DEFAULT NULL,\n PRIMARY KEY (`namespace`,`task_queue`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "dw_worker_registration_incarnations", + "CREATE TABLE `dw_worker_registration_incarnations` (\n `token` char(32) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,\n `namespace` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `worker_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `status` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL,\n `recovered_workflow_task_count` bigint DEFAULT NULL,\n `finished_at` datetime(6) DEFAULT NULL,\n `created_at` datetime(6) NOT NULL,\n `updated_at` datetime(6) NOT NULL,\n PRIMARY KEY (`token`),\n KEY `dw_worker_incarnation_authority` (`namespace`,`worker_id`,`status`),\n KEY `dw_worker_incarnation_retention` (`status`,`finished_at`),\n CONSTRAINT `dw_worker_incarnation_state` CHECK ((((`status` = _utf8mb4'active') and (`finished_at` is null) and (`recovered_workflow_task_count` is null)) or ((`status` = _utf8mb4'superseded') and (`finished_at` is not null) and (`recovered_workflow_task_count` is null)) or ((`status` = _utf8mb4'deregistered') and (`finished_at` is not null) and (`recovered_workflow_task_count` is not null) and (`recovered_workflow_task_count` >= 0))))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "dw_worker_session_holders", + "CREATE TABLE `dw_worker_session_holders` (\n `namespace` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,\n `session_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `incarnation` char(64) COLLATE ascii_bin NOT NULL,\n `updated_at` datetime(6) NOT NULL,\n PRIMARY KEY (`namespace`,`session_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "failed_jobs", + "CREATE TABLE `failed_jobs` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,\n `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,\n `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,\n `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,\n `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n PRIMARY KEY (`id`),\n UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "jobs", + "CREATE TABLE `jobs` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `queue` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,\n `attempts` tinyint unsigned NOT NULL,\n `reserved_at` int unsigned DEFAULT NULL,\n `available_at` int unsigned NOT NULL,\n `created_at` int unsigned NOT NULL,\n PRIMARY KEY (`id`),\n KEY `jobs_queue_index` (`queue`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "migrations", + "CREATE TABLE `migrations` (\n `id` int unsigned NOT NULL AUTO_INCREMENT,\n `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `batch` int NOT NULL,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "runtime_credentials", + "CREATE TABLE `runtime_credentials` (\n `id` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `subject` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `roles` longtext COLLATE utf8mb4_bin NOT NULL,\n `tenant` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,\n `claims` longtext COLLATE utf8mb4_bin,\n `token_prefix` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL,\n `token_hash` char(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n `expires_at` timestamp NULL DEFAULT NULL,\n `revoked_at` timestamp NULL DEFAULT NULL,\n `rotated_at` timestamp NULL DEFAULT NULL,\n `created_at` timestamp NULL DEFAULT NULL,\n `updated_at` timestamp NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `runtime_credentials_token_hash_unique` (`token_hash`),\n KEY `runtime_credentials_tenant_index` (`tenant`),\n KEY `runtime_credentials_expires_at_index` (`expires_at`),\n KEY `runtime_credentials_revoked_at_index` (`revoked_at`),\n CONSTRAINT `dw_json_text_075fecde0a757510fdf7` CHECK (json_valid(`roles`)),\n CONSTRAINT `dw_json_text_5f7fdbad00226a90f331` CHECK (json_valid(`claims`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "runtime_external_payload_backup_hold", + "CREATE TABLE `runtime_external_payload_backup_hold` (\n `id` tinyint unsigned NOT NULL,\n `owner` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `acquired_at` timestamp NULL DEFAULT NULL,\n `expires_at` timestamp NULL DEFAULT NULL,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "runtime_external_payload_cleanup_stats", + "CREATE TABLE `runtime_external_payload_cleanup_stats` (\n `namespace` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,\n `passes_total` bigint unsigned NOT NULL DEFAULT '0',\n `deleted_references_total` bigint unsigned NOT NULL DEFAULT '0',\n `deleted_backing_objects_total` bigint unsigned NOT NULL DEFAULT '0',\n `shared_objects_preserved_total` bigint unsigned NOT NULL DEFAULT '0',\n `blocked_outcomes_total` bigint unsigned NOT NULL DEFAULT '0',\n `storage_driver_failures_total` bigint unsigned NOT NULL DEFAULT '0',\n `last_processed` int unsigned NOT NULL DEFAULT '0',\n `last_deleted_references` int unsigned NOT NULL DEFAULT '0',\n `last_deleted_backing_objects` int unsigned NOT NULL DEFAULT '0',\n `last_shared_objects_preserved` int unsigned NOT NULL DEFAULT '0',\n `last_blocked_outcomes` int unsigned NOT NULL DEFAULT '0',\n `last_storage_driver_failures` int unsigned NOT NULL DEFAULT '0',\n `last_pass_status` varchar(16) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `last_completed_at` timestamp NULL DEFAULT NULL,\n `last_storage_failure_at` timestamp NULL DEFAULT NULL,\n `created_at` timestamp NULL DEFAULT NULL,\n `updated_at` timestamp NULL DEFAULT NULL,\n PRIMARY KEY (`namespace`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "runtime_external_payload_object_locks", + "CREATE TABLE `runtime_external_payload_object_locks` (\n `bucket` smallint unsigned NOT NULL,\n PRIMARY KEY (`bucket`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "runtime_external_payloads", + "CREATE TABLE `runtime_external_payloads` (\n `id` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n `namespace` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,\n `storage_uri` text COLLATE utf8mb4_unicode_ci NOT NULL,\n `storage_uri_sha256` char(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n `codec` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n `sha256` char(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n `size_bytes` bigint unsigned NOT NULL,\n `upload_status` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'ready',\n `retained_at` timestamp NULL DEFAULT NULL,\n `expires_at` timestamp NULL DEFAULT NULL,\n `last_fetched_at` timestamp NULL DEFAULT NULL,\n `created_at` timestamp NULL DEFAULT NULL,\n `updated_at` timestamp NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `runtime_external_payloads_namespace_uri_unique` (`namespace`,`storage_uri_sha256`),\n KEY `runtime_external_payloads_namespace_index` (`namespace`),\n KEY `runtime_external_payloads_expires_at_index` (`expires_at`),\n KEY `runtime_external_payloads_reclamation_idx` (`retained_at`,`expires_at`,`upload_status`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "runtime_payload_completion_budgets", + "CREATE TABLE `runtime_payload_completion_budgets` (\n `id` char(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n `namespace` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,\n `context` longtext COLLATE utf8mb4_bin NOT NULL,\n `slots` longtext COLLATE utf8mb4_bin NOT NULL,\n `objects` longtext COLLATE utf8mb4_bin NOT NULL,\n `expires_at` timestamp NOT NULL,\n `created_at` timestamp NULL DEFAULT NULL,\n `updated_at` timestamp NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n KEY `runtime_payload_completion_budgets_namespace_index` (`namespace`),\n KEY `runtime_payload_completion_budgets_expires_at_index` (`expires_at`),\n CONSTRAINT `dw_json_text_4077efaae491546bebc7` CHECK (json_valid(`slots`)),\n CONSTRAINT `dw_json_text_c185060f2dbee09c5a6a` CHECK (json_valid(`objects`)),\n CONSTRAINT `dw_json_text_d1bf52994d698d7d04ed` CHECK (json_valid(`context`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "search_attribute_definitions", + "CREATE TABLE `search_attribute_definitions` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `namespace` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,\n `name` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,\n `type` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL,\n `created_at` timestamp NULL DEFAULT NULL,\n `updated_at` timestamp NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `search_attribute_definitions_namespace_name_unique` (`namespace`,`name`),\n KEY `search_attribute_definitions_namespace_index` (`namespace`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_child_calls", + "CREATE TABLE `workflow_child_calls` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `parent_workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `parent_workflow_instance_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `sequence` int unsigned NOT NULL,\n `child_workflow_type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `child_workflow_class` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `requested_child_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `resolved_child_instance_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `resolved_child_run_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `parent_close_policy` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'abandon',\n `connection` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `queue` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `compatibility` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `retry_policy` longtext COLLATE utf8mb4_bin,\n `timeout_policy` longtext COLLATE utf8mb4_bin,\n `cancellation_propagation` tinyint(1) NOT NULL DEFAULT '0',\n `status` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'scheduled',\n `result_payload_reference` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `failure_reference` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `closed_reason` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `scheduled_at` timestamp(6) NOT NULL,\n `started_at` timestamp(6) NULL DEFAULT NULL,\n `closed_at` timestamp(6) NULL DEFAULT NULL,\n `arguments` longtext COLLATE utf8mb4_bin,\n `metadata` longtext COLLATE utf8mb4_bin,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n KEY `child_calls_parent_seq` (`parent_workflow_run_id`,`sequence`),\n KEY `child_calls_parent_status` (`parent_workflow_run_id`,`status`),\n KEY `child_calls_child_parent` (`resolved_child_instance_id`,`parent_workflow_run_id`),\n KEY `workflow_child_calls_parent_workflow_run_id_index` (`parent_workflow_run_id`),\n KEY `workflow_child_calls_parent_workflow_instance_id_index` (`parent_workflow_instance_id`),\n KEY `workflow_child_calls_sequence_index` (`sequence`),\n KEY `workflow_child_calls_resolved_child_instance_id_index` (`resolved_child_instance_id`),\n KEY `workflow_child_calls_resolved_child_run_id_index` (`resolved_child_run_id`),\n KEY `workflow_child_calls_status_index` (`status`),\n CONSTRAINT `workflow_child_calls_parent_workflow_run_id_foreign` FOREIGN KEY (`parent_workflow_run_id`) REFERENCES `workflow_runs` (`id`) ON DELETE CASCADE,\n CONSTRAINT `dw_json_text_016208f3b76c51671353` CHECK (json_valid(`metadata`)),\n CONSTRAINT `dw_json_text_40e45e4f94944c511ab5` CHECK (json_valid(`timeout_policy`)),\n CONSTRAINT `dw_json_text_55a3cac14b0a3feca840` CHECK (json_valid(`retry_policy`)),\n CONSTRAINT `dw_json_text_9c078ba0f6c256bb7d9c` CHECK (json_valid(`arguments`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_child_projection_repairs", + "CREATE TABLE `workflow_child_projection_repairs` (\n `workflow_history_event_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_task_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `history_sequence` int unsigned NOT NULL,\n `failure_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `failed_child_counted_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`workflow_history_event_id`),\n KEY `workflow_child_projection_repairs_drain_idx` (`workflow_run_id`,`workflow_task_id`,`history_sequence`),\n KEY `workflow_child_projection_repairs_failure_idx` (`workflow_run_id`,`failure_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_commands", + "CREATE TABLE `workflow_commands` (\n `id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_instance_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `requested_workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `resolved_workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `command_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `target_scope` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'instance',\n `source` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'php',\n `context` longtext COLLATE utf8mb4_bin,\n `request_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `outcome` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `workflow_class` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `workflow_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `payload_codec` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `payload` longtext COLLATE utf8mb4_unicode_ci,\n `rejection_reason` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `command_sequence` int unsigned DEFAULT NULL,\n `message_sequence` int unsigned DEFAULT NULL,\n `accepted_at` timestamp(6) NULL DEFAULT NULL,\n `applied_at` timestamp(6) NULL DEFAULT NULL,\n `rejected_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_commands_request_lookup` (`workflow_instance_id`,`command_type`,`request_id`),\n KEY `workflow_commands_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_commands_workflow_run_id_index` (`workflow_run_id`),\n KEY `workflow_commands_requested_workflow_run_id_index` (`requested_workflow_run_id`),\n KEY `workflow_commands_resolved_workflow_run_id_index` (`resolved_workflow_run_id`),\n KEY `workflow_commands_command_type_index` (`command_type`),\n KEY `workflow_commands_source_index` (`source`),\n KEY `workflow_commands_status_index` (`status`),\n KEY `workflow_commands_command_sequence_index` (`command_sequence`),\n CONSTRAINT `dw_json_text_1365410084c0cd12ed37` CHECK (json_valid(`context`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_durable_stream_items", + "CREATE TABLE `workflow_durable_stream_items` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `stream_id` bigint unsigned NOT NULL,\n `namespace` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `stream_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `offset` bigint NOT NULL,\n `idempotency_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `origin` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'workflow_command',\n `origin_reference` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `payload` longtext COLLATE utf8mb4_bin,\n `payload_reference` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `payload_codec` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `item_type` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `content_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `emitted_at` timestamp(6) NOT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `wf_durable_stream_items_stream_offset_unique` (`stream_id`,`offset`),\n UNIQUE KEY `wf_durable_stream_items_idempotency_unique` (`stream_id`,`idempotency_key`),\n KEY `wf_durable_stream_items_run_name_offset_idx` (`workflow_run_id`,`stream_name`,`offset`),\n KEY `workflow_durable_stream_items_namespace_index` (`namespace`),\n KEY `workflow_durable_stream_items_workflow_run_id_index` (`workflow_run_id`),\n CONSTRAINT `workflow_durable_stream_items_stream_id_foreign` FOREIGN KEY (`stream_id`) REFERENCES `workflow_durable_streams` (`id`) ON DELETE CASCADE,\n CONSTRAINT `dw_json_text_9d624f24054e91d9250f` CHECK (json_valid(`payload`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_durable_streams", + "CREATE TABLE `workflow_durable_streams` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `namespace` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_instance_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `stream_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `status` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'open',\n `last_offset` bigint NOT NULL DEFAULT '-1',\n `total_items` bigint unsigned NOT NULL DEFAULT '0',\n `retention_seconds` int unsigned DEFAULT NULL,\n `opened_at` timestamp(6) NULL DEFAULT NULL,\n `last_appended_at` timestamp(6) NULL DEFAULT NULL,\n `closed_at` timestamp(6) NULL DEFAULT NULL,\n `error_reason` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `pending_items` bigint unsigned NOT NULL DEFAULT '0',\n `metadata` longtext COLLATE utf8mb4_bin,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `wf_durable_streams_run_name_unique` (`workflow_run_id`,`stream_name`),\n KEY `wf_durable_streams_ns_instance_name_idx` (`namespace`,`workflow_instance_id`,`stream_name`),\n KEY `wf_durable_streams_ns_status_idx` (`namespace`,`status`),\n KEY `workflow_durable_streams_namespace_index` (`namespace`),\n KEY `workflow_durable_streams_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_durable_streams_workflow_run_id_index` (`workflow_run_id`),\n KEY `workflow_durable_streams_status_index` (`status`),\n CONSTRAINT `dw_json_text_da0f067f234347705b1c` CHECK (json_valid(`metadata`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_failures", + "CREATE TABLE `workflow_failures` (\n `id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `source_kind` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `source_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `propagation_kind` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `failure_category` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `non_retryable` tinyint(1) NOT NULL DEFAULT '0',\n `handled` tinyint(1) NOT NULL DEFAULT '0',\n `exception_class` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `message` text COLLATE utf8mb4_unicode_ci NOT NULL,\n `file` text COLLATE utf8mb4_unicode_ci NOT NULL,\n `line` int unsigned DEFAULT NULL,\n `trace_preview` longtext COLLATE utf8mb4_unicode_ci,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n KEY `workflow_failures_source_kind_source_id_index` (`source_kind`,`source_id`),\n KEY `workflow_failures_workflow_run_id_index` (`workflow_run_id`),\n KEY `workflow_failures_failure_category_index` (`failure_category`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_history_events", + "CREATE TABLE `workflow_history_events` (\n `id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `sequence` int unsigned NOT NULL,\n `event_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `payload` longtext COLLATE utf8mb4_bin,\n `workflow_task_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `workflow_command_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `recorded_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n `recorded_at_utc` datetime(6) DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_history_events_workflow_run_id_sequence_unique` (`workflow_run_id`,`sequence`),\n KEY `workflow_history_events_workflow_run_id_index` (`workflow_run_id`),\n KEY `workflow_history_events_workflow_task_id_index` (`workflow_task_id`),\n KEY `workflow_history_events_workflow_command_id_index` (`workflow_command_id`),\n CONSTRAINT `dw_json_text_186a93a5a54b983f2444` CHECK (json_valid(`payload`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_inbound_stream_items", + "CREATE TABLE `workflow_inbound_stream_items` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `stream_id` bigint unsigned NOT NULL,\n `namespace` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_instance_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `stream_name` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,\n `message_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `position` bigint unsigned NOT NULL,\n `payload_codec` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL,\n `payload_blob` longtext COLLATE utf8mb4_unicode_ci NOT NULL,\n `payload_hash` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n `delivered_run_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `workflow_command_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `delivered_at` timestamp(6) NULL DEFAULT NULL,\n `consumed_run_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `consumed_task_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `consumed_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n `payload_released_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `wf_inbound_items_stream_message_unique` (`stream_id`,`message_id`),\n UNIQUE KEY `wf_inbound_items_stream_position_unique` (`stream_id`,`position`),\n KEY `wf_inbound_items_ns_instance_name_position_idx` (`namespace`,`workflow_instance_id`,`stream_name`,`position`),\n KEY `workflow_inbound_stream_items_namespace_index` (`namespace`),\n KEY `workflow_inbound_stream_items_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_inbound_stream_items_delivered_run_id_index` (`delivered_run_id`),\n KEY `workflow_inbound_stream_items_workflow_command_id_index` (`workflow_command_id`),\n KEY `workflow_inbound_stream_items_consumed_run_id_index` (`consumed_run_id`),\n KEY `workflow_inbound_stream_items_consumed_task_id_index` (`consumed_task_id`),\n KEY `workflow_inbound_stream_items_payload_released_at_index` (`payload_released_at`),\n CONSTRAINT `workflow_inbound_stream_items_stream_id_foreign` FOREIGN KEY (`stream_id`) REFERENCES `workflow_inbound_streams` (`id`) ON DELETE CASCADE\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_inbound_streams", + "CREATE TABLE `workflow_inbound_streams` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `namespace` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_instance_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `stream_name` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,\n `last_position` bigint unsigned NOT NULL DEFAULT '0',\n `cursor_position` bigint unsigned NOT NULL DEFAULT '0',\n `cursor_checkpoint_run_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `waiting_run_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `waiting_after_position` bigint unsigned DEFAULT NULL,\n `waiting_since` timestamp(6) NULL DEFAULT NULL,\n `duplicate_count` bigint unsigned NOT NULL DEFAULT '0',\n `malformed_count` bigint unsigned NOT NULL DEFAULT '0',\n `last_input_outcome` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `last_input_message_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `last_input_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n `cleanup_blocked_at` timestamp(6) NULL DEFAULT NULL,\n `cleanup_blocked_reason` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `cleanup_blocked_run_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `wf_inbound_streams_ns_instance_name_unique` (`namespace`,`workflow_instance_id`,`stream_name`),\n KEY `workflow_inbound_streams_namespace_index` (`namespace`),\n KEY `workflow_inbound_streams_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_inbound_streams_cursor_checkpoint_run_id_index` (`cursor_checkpoint_run_id`),\n KEY `workflow_inbound_streams_waiting_run_id_index` (`waiting_run_id`),\n KEY `workflow_inbound_streams_cleanup_blocked_run_id_index` (`cleanup_blocked_run_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_instances", + "CREATE TABLE `workflow_instances` (\n `id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_class` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `namespace` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `business_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `visibility_labels` longtext COLLATE utf8mb4_bin,\n `memo` longtext COLLATE utf8mb4_bin,\n `execution_timeout_seconds` int unsigned DEFAULT NULL,\n `current_run_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `run_count` int unsigned NOT NULL DEFAULT '0',\n `last_message_sequence` int unsigned NOT NULL DEFAULT '0',\n `reserved_at` timestamp(6) NULL DEFAULT NULL,\n `started_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n KEY `workflow_instances_namespace_index` (`namespace`),\n KEY `workflow_instances_business_key_index` (`business_key`),\n KEY `workflow_instances_current_run_id_index` (`current_run_id`),\n CONSTRAINT `dw_json_text_4d686a7e3879bc8d7c6c` CHECK (json_valid(`memo`)),\n CONSTRAINT `dw_json_text_5dec5cdd6359edc700f2` CHECK (json_valid(`visibility_labels`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_links", + "CREATE TABLE `workflow_links` (\n `id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `link_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `sequence` int unsigned DEFAULT NULL,\n `parallel_group_path` longtext COLLATE utf8mb4_bin,\n `parent_workflow_instance_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `parent_workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `child_workflow_instance_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `child_workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `is_primary_parent` tinyint(1) NOT NULL DEFAULT '0',\n `parent_close_policy` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'abandon',\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_links_parent_child_type_unique` (`parent_workflow_run_id`,`child_workflow_run_id`,`link_type`),\n KEY `workflow_links_parent_sequence_type_index` (`parent_workflow_run_id`,`sequence`,`link_type`),\n KEY `workflow_links_parent_workflow_instance_id_index` (`parent_workflow_instance_id`),\n KEY `workflow_links_parent_workflow_run_id_index` (`parent_workflow_run_id`),\n KEY `workflow_links_child_workflow_instance_id_index` (`child_workflow_instance_id`),\n KEY `workflow_links_child_workflow_run_id_index` (`child_workflow_run_id`),\n CONSTRAINT `dw_json_text_c6fec96f4176ab012436` CHECK (json_valid(`parallel_group_path`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_memos", + "CREATE TABLE `workflow_memos` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_instance_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `value` longtext COLLATE utf8mb4_bin NOT NULL,\n `upserted_at_sequence` int unsigned NOT NULL,\n `inherited_from_parent` tinyint(1) NOT NULL DEFAULT '0',\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n `portable_value` longtext COLLATE utf8mb4_bin,\n `portable_value_sequence` int unsigned DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_memos_run_key_unique` (`workflow_run_id`,`key`),\n KEY `workflow_memos_instance_key` (`workflow_instance_id`,`key`),\n CONSTRAINT `workflow_memos_workflow_run_id_foreign` FOREIGN KEY (`workflow_run_id`) REFERENCES `workflow_runs` (`id`) ON DELETE CASCADE,\n CONSTRAINT `dw_json_text_71688955589bdaf8f5c4` CHECK (json_valid(`portable_value`)),\n CONSTRAINT `dw_json_text_fcdcfa03c1ad3583628c` CHECK (json_valid(`value`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_messages", + "CREATE TABLE `workflow_messages` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `workflow_instance_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `direction` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL,\n `channel` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n `stream_key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `sequence` bigint unsigned NOT NULL,\n `source_workflow_instance_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `source_workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `target_workflow_instance_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `target_workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `correlation_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `idempotency_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `payload_reference` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `consume_state` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',\n `consumed_at` timestamp(6) NULL DEFAULT NULL,\n `consumed_by_sequence` int unsigned DEFAULT NULL,\n `expires_at` timestamp(6) NULL DEFAULT NULL,\n `delivery_attempt_count` int unsigned NOT NULL DEFAULT '0',\n `last_delivery_attempt_at` timestamp(6) NULL DEFAULT NULL,\n `last_delivery_error` text COLLATE utf8mb4_unicode_ci,\n `metadata` longtext COLLATE utf8mb4_bin,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `wf_msgs_stream_seq_unique` (`workflow_instance_id`,`stream_key`,`sequence`),\n KEY `wf_msgs_instance_stream_seq` (`workflow_instance_id`,`stream_key`,`sequence`),\n KEY `wf_msgs_run_dir_state` (`workflow_run_id`,`direction`,`consume_state`),\n KEY `wf_msgs_stream_seq_state` (`stream_key`,`sequence`,`consume_state`),\n KEY `wf_msgs_target_state` (`target_workflow_instance_id`,`consume_state`),\n KEY `workflow_messages_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_messages_workflow_run_id_index` (`workflow_run_id`),\n KEY `workflow_messages_direction_index` (`direction`),\n KEY `workflow_messages_channel_index` (`channel`),\n KEY `workflow_messages_stream_key_index` (`stream_key`),\n KEY `workflow_messages_sequence_index` (`sequence`),\n KEY `workflow_messages_source_workflow_instance_id_index` (`source_workflow_instance_id`),\n KEY `workflow_messages_target_workflow_instance_id_index` (`target_workflow_instance_id`),\n KEY `workflow_messages_correlation_id_index` (`correlation_id`),\n KEY `workflow_messages_idempotency_key_index` (`idempotency_key`),\n KEY `workflow_messages_consume_state_index` (`consume_state`),\n CONSTRAINT `workflow_messages_workflow_run_id_foreign` FOREIGN KEY (`workflow_run_id`) REFERENCES `workflow_runs` (`id`) ON DELETE CASCADE,\n CONSTRAINT `dw_json_text_b0a2ae51e86f4f80b9fb` CHECK (json_valid(`metadata`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_namespaces", + "CREATE TABLE `workflow_namespaces` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `name` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,\n `description` varchar(1000) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `retention_mode` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'bounded',\n `retention_days` int unsigned DEFAULT '30',\n `status` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'active',\n `external_payload_storage` longtext COLLATE utf8mb4_bin,\n `created_at` timestamp NULL DEFAULT NULL,\n `updated_at` timestamp NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_namespaces_name_unique` (`name`),\n CONSTRAINT `dw_json_text_4281ef3e52494643312f` CHECK (json_valid(`external_payload_storage`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_run_lineage_entries", + "CREATE TABLE `workflow_run_lineage_entries` (\n `id` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_instance_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `direction` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `lineage_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `position` int unsigned NOT NULL,\n `link_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `child_call_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `sequence` int unsigned DEFAULT NULL,\n `is_primary_parent` tinyint(1) NOT NULL DEFAULT '0',\n `related_workflow_instance_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `related_workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `related_run_number` int unsigned DEFAULT NULL,\n `related_workflow_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `related_workflow_class` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `status` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `status_bucket` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `closed_reason` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `linked_at` timestamp(6) NULL DEFAULT NULL,\n `payload` longtext COLLATE utf8mb4_bin,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_run_lineage_run_direction_lineage_unique` (`workflow_run_id`,`direction`,`lineage_id`),\n KEY `workflow_run_lineage_run_direction_position_index` (`workflow_run_id`,`direction`,`position`),\n KEY `workflow_run_lineage_instance_direction_type_index` (`workflow_instance_id`,`direction`,`link_type`),\n KEY `workflow_run_lineage_entries_workflow_run_id_index` (`workflow_run_id`),\n KEY `workflow_run_lineage_entries_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_run_lineage_entries_direction_index` (`direction`),\n KEY `workflow_run_lineage_entries_link_type_index` (`link_type`),\n KEY `workflow_run_lineage_entries_child_call_id_index` (`child_call_id`),\n KEY `workflow_run_lineage_entries_sequence_index` (`sequence`),\n KEY `workflow_run_lineage_entries_is_primary_parent_index` (`is_primary_parent`),\n KEY `workflow_run_lineage_entries_related_workflow_instance_id_index` (`related_workflow_instance_id`),\n KEY `workflow_run_lineage_entries_related_workflow_run_id_index` (`related_workflow_run_id`),\n KEY `workflow_run_lineage_entries_related_workflow_type_index` (`related_workflow_type`),\n KEY `workflow_run_lineage_entries_status_index` (`status`),\n KEY `workflow_run_lineage_entries_status_bucket_index` (`status_bucket`),\n KEY `workflow_run_lineage_entries_closed_reason_index` (`closed_reason`),\n KEY `workflow_run_lineage_entries_linked_at_index` (`linked_at`),\n CONSTRAINT `dw_json_text_1874a82e6e4c5698bc68` CHECK (json_valid(`payload`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_run_summaries", + "CREATE TABLE `workflow_run_summaries` (\n `id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_instance_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `run_number` int unsigned NOT NULL,\n `is_current_run` tinyint(1) NOT NULL DEFAULT '0',\n `engine_source` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'v2',\n `projection_schema_version` smallint unsigned DEFAULT NULL,\n `class` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `namespace` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `compatibility` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `declared_entry_mode` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `declared_contract_source` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `business_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `visibility_labels` longtext COLLATE utf8mb4_bin,\n `status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `status_bucket` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `closed_reason` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `connection` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `queue` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `started_at` timestamp(6) NULL DEFAULT NULL,\n `sort_timestamp` timestamp(6) NULL DEFAULT NULL,\n `sort_key` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `closed_at` timestamp(6) NULL DEFAULT NULL,\n `archived_at` timestamp(6) NULL DEFAULT NULL,\n `archive_command_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `archive_reason` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `duration_ms` bigint DEFAULT NULL,\n `wait_kind` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `wait_reason` text COLLATE utf8mb4_unicode_ci,\n `wait_started_at` timestamp(6) NULL DEFAULT NULL,\n `wait_deadline_at` timestamp(6) NULL DEFAULT NULL,\n `open_wait_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `resume_source_kind` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `resume_source_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `next_task_at` timestamp(6) NULL DEFAULT NULL,\n `liveness_state` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `liveness_reason` text COLLATE utf8mb4_unicode_ci,\n `repair_blocked_reason` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `repair_attention` tinyint(1) NOT NULL DEFAULT '0',\n `task_problem` tinyint(1) NOT NULL DEFAULT '0',\n `next_task_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `next_task_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `next_task_status` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `next_task_lease_expires_at` timestamp(6) NULL DEFAULT NULL,\n `exception_count` int unsigned NOT NULL DEFAULT '0',\n `history_event_count` int unsigned NOT NULL DEFAULT '0',\n `history_size_bytes` bigint unsigned NOT NULL DEFAULT '0',\n `history_fan_out` int unsigned NOT NULL DEFAULT '0',\n `continue_as_new_recommended` tinyint(1) NOT NULL DEFAULT '0',\n `history_budget_pressure` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'ok',\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n KEY `workflow_run_summaries_status_bucket_started_at_index` (`status_bucket`,`started_at`),\n KEY `workflow_run_summaries_sort_order_index` (`sort_timestamp`,`id`),\n KEY `wfrs_namespace_sort_idx` (`namespace`,`sort_timestamp`,`id`),\n KEY `wfrs_namespace_type_sort_idx` (`namespace`,`workflow_type`,`sort_timestamp`,`id`),\n KEY `wfrs_namespace_status_sort_idx` (`namespace`,`status_bucket`,`sort_timestamp`,`id`),\n KEY `workflow_run_summaries_sort_key_index` (`sort_key`),\n KEY `workflow_run_summaries_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_run_summaries_is_current_run_index` (`is_current_run`),\n KEY `workflow_run_summaries_projection_schema_version_index` (`projection_schema_version`),\n KEY `workflow_run_summaries_namespace_index` (`namespace`),\n KEY `wfrs_decl_entry_mode_idx` (`declared_entry_mode`),\n KEY `wfrs_decl_contract_source_idx` (`declared_contract_source`),\n KEY `workflow_run_summaries_business_key_index` (`business_key`),\n KEY `workflow_run_summaries_status_index` (`status`),\n KEY `workflow_run_summaries_status_bucket_index` (`status_bucket`),\n KEY `workflow_run_summaries_archived_at_index` (`archived_at`),\n KEY `workflow_run_summaries_archive_command_id_index` (`archive_command_id`),\n KEY `workflow_run_summaries_repair_blocked_reason_index` (`repair_blocked_reason`),\n KEY `workflow_run_summaries_repair_attention_index` (`repair_attention`),\n KEY `workflow_run_summaries_continue_as_new_recommended_index` (`continue_as_new_recommended`),\n KEY `workflow_run_summaries_history_budget_pressure_index` (`history_budget_pressure`),\n KEY `wfrs_prom_metrics_series_idx` (`namespace`,`queue`,`workflow_type`),\n CONSTRAINT `dw_json_text_accf32ee2c1a832ab845` CHECK (json_valid(`visibility_labels`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_run_timeline_entries", + "CREATE TABLE `workflow_run_timeline_entries` (\n `id` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_instance_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `history_event_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `sequence` int unsigned NOT NULL,\n `type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `kind` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `entry_kind` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'point',\n `source_kind` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `source_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `summary` text COLLATE utf8mb4_unicode_ci,\n `recorded_at` timestamp(6) NULL DEFAULT NULL,\n `command_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `command_sequence` int unsigned DEFAULT NULL,\n `task_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `activity_execution_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `timer_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `failure_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `payload` longtext COLLATE utf8mb4_bin,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_run_timeline_run_event_unique` (`workflow_run_id`,`history_event_id`),\n KEY `workflow_run_timeline_run_sequence_index` (`workflow_run_id`,`sequence`),\n KEY `workflow_run_timeline_instance_kind_recorded_index` (`workflow_instance_id`,`kind`,`recorded_at`),\n KEY `workflow_run_timeline_entries_workflow_run_id_index` (`workflow_run_id`),\n KEY `workflow_run_timeline_entries_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_run_timeline_entries_history_event_id_index` (`history_event_id`),\n KEY `workflow_run_timeline_entries_sequence_index` (`sequence`),\n KEY `workflow_run_timeline_entries_type_index` (`type`),\n KEY `workflow_run_timeline_entries_kind_index` (`kind`),\n KEY `workflow_run_timeline_entries_source_kind_index` (`source_kind`),\n KEY `workflow_run_timeline_entries_source_id_index` (`source_id`),\n KEY `workflow_run_timeline_entries_recorded_at_index` (`recorded_at`),\n KEY `workflow_run_timeline_entries_command_id_index` (`command_id`),\n KEY `workflow_run_timeline_entries_command_sequence_index` (`command_sequence`),\n KEY `workflow_run_timeline_entries_task_id_index` (`task_id`),\n KEY `workflow_run_timeline_entries_activity_execution_id_index` (`activity_execution_id`),\n KEY `workflow_run_timeline_entries_timer_id_index` (`timer_id`),\n KEY `workflow_run_timeline_entries_failure_id_index` (`failure_id`),\n CONSTRAINT `dw_json_text_4a34bf0686f5464d6b56` CHECK (json_valid(`payload`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_run_timer_entries", + "CREATE TABLE `workflow_run_timer_entries` (\n `id` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_instance_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `timer_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `schema_version` smallint unsigned NOT NULL DEFAULT '1',\n `position` int unsigned NOT NULL,\n `sequence` int unsigned DEFAULT NULL,\n `status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `source_status` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `delay_seconds` int DEFAULT NULL,\n `fire_at` timestamp(6) NULL DEFAULT NULL,\n `fired_at` timestamp(6) NULL DEFAULT NULL,\n `cancelled_at` timestamp(6) NULL DEFAULT NULL,\n `timer_kind` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `condition_wait_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `condition_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `condition_definition_fingerprint` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `history_authority` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `history_unsupported_reason` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `payload` longtext COLLATE utf8mb4_bin,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_run_timer_entries_run_timer_unique` (`workflow_run_id`,`timer_id`),\n KEY `workflow_run_timer_entries_run_status_position_index` (`workflow_run_id`,`status`,`position`),\n KEY `workflow_run_timer_entries_instance_kind_status_index` (`workflow_instance_id`,`timer_kind`,`status`),\n KEY `workflow_run_timer_entries_workflow_run_id_index` (`workflow_run_id`),\n KEY `workflow_run_timer_entries_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_run_timer_entries_sequence_index` (`sequence`),\n KEY `workflow_run_timer_entries_status_index` (`status`),\n KEY `workflow_run_timer_entries_source_status_index` (`source_status`),\n KEY `workflow_run_timer_entries_timer_kind_index` (`timer_kind`),\n KEY `workflow_run_timer_entries_condition_wait_id_index` (`condition_wait_id`),\n KEY `workflow_run_timer_entries_condition_key_index` (`condition_key`),\n KEY `workflow_run_timer_entries_history_authority_index` (`history_authority`),\n CONSTRAINT `dw_json_text_cb1a9145e9dc22308d3d` CHECK (json_valid(`payload`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_run_timers", + "CREATE TABLE `workflow_run_timers` (\n `id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `sequence` int unsigned NOT NULL,\n `status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `delay_seconds` bigint unsigned NOT NULL,\n `fire_at` timestamp(6) NOT NULL,\n `fired_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_run_timers_workflow_run_id_sequence_unique` (`workflow_run_id`,`sequence`),\n KEY `workflow_run_timers_status_fire_at_index` (`status`,`fire_at`),\n KEY `workflow_run_timers_workflow_run_id_index` (`workflow_run_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_run_waits", + "CREATE TABLE `workflow_run_waits` (\n `id` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_instance_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `wait_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `position` int unsigned NOT NULL,\n `kind` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `sequence` int unsigned DEFAULT NULL,\n `status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `source_status` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `summary` text COLLATE utf8mb4_unicode_ci,\n `opened_at` timestamp(6) NULL DEFAULT NULL,\n `deadline_at` timestamp(6) NULL DEFAULT NULL,\n `resolved_at` timestamp(6) NULL DEFAULT NULL,\n `target_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `target_type` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `task_backed` tinyint(1) NOT NULL DEFAULT '0',\n `external_only` tinyint(1) NOT NULL DEFAULT '0',\n `resume_source_kind` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `resume_source_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `task_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `task_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `task_status` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `command_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `command_sequence` int unsigned DEFAULT NULL,\n `command_status` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `command_outcome` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `history_authority` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `history_unsupported_reason` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `payload` longtext COLLATE utf8mb4_bin,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_run_waits_run_wait_unique` (`workflow_run_id`,`wait_id`),\n KEY `workflow_run_waits_run_status_position_index` (`workflow_run_id`,`status`,`position`),\n KEY `workflow_run_waits_instance_kind_status_index` (`workflow_instance_id`,`kind`,`status`),\n KEY `workflow_run_waits_workflow_run_id_index` (`workflow_run_id`),\n KEY `workflow_run_waits_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_run_waits_kind_index` (`kind`),\n KEY `workflow_run_waits_sequence_index` (`sequence`),\n KEY `workflow_run_waits_status_index` (`status`),\n KEY `workflow_run_waits_source_status_index` (`source_status`),\n KEY `workflow_run_waits_target_name_index` (`target_name`),\n KEY `workflow_run_waits_task_backed_index` (`task_backed`),\n KEY `workflow_run_waits_resume_source_kind_index` (`resume_source_kind`),\n KEY `workflow_run_waits_resume_source_id_index` (`resume_source_id`),\n KEY `workflow_run_waits_task_id_index` (`task_id`),\n KEY `workflow_run_waits_command_id_index` (`command_id`),\n KEY `workflow_run_waits_history_authority_index` (`history_authority`),\n CONSTRAINT `dw_json_text_e331c14bcddf551ccfdd` CHECK (json_valid(`payload`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_runs", + "CREATE TABLE `workflow_runs` (\n `id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_instance_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `run_number` int unsigned NOT NULL,\n `workflow_class` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `namespace` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `business_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `visibility_labels` longtext COLLATE utf8mb4_bin,\n `status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `closed_reason` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `compatibility` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `payload_codec` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `arguments` longtext COLLATE utf8mb4_unicode_ci,\n `output` longtext COLLATE utf8mb4_unicode_ci,\n `output_payload_codec` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `connection` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `queue` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `priority` tinyint unsigned NOT NULL DEFAULT '5',\n `fairness_key` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `fairness_weight` smallint unsigned NOT NULL DEFAULT '1',\n `sticky_worker_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `sticky_until` timestamp(6) NULL DEFAULT NULL,\n `last_history_sequence` int unsigned NOT NULL DEFAULT '0',\n `last_command_sequence` int unsigned NOT NULL DEFAULT '0',\n `message_cursor_position` int unsigned NOT NULL DEFAULT '0',\n `run_timeout_seconds` int unsigned DEFAULT NULL,\n `execution_deadline_at` timestamp(6) NULL DEFAULT NULL,\n `run_deadline_at` timestamp(6) NULL DEFAULT NULL,\n `started_at` timestamp(6) NULL DEFAULT NULL,\n `closed_at` timestamp(6) NULL DEFAULT NULL,\n `archived_at` timestamp(6) NULL DEFAULT NULL,\n `archive_command_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `archive_reason` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `last_progress_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n `import_source` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `import_id` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `import_dedupe_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `import_contract_version` smallint unsigned DEFAULT NULL,\n `imported_at` timestamp(6) NULL DEFAULT NULL,\n `cancellation_request_command_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `cancellation_requested_at` timestamp(6) NULL DEFAULT NULL,\n `cancellation_deadline_at` timestamp(6) NULL DEFAULT NULL,\n `cancellation_delivery_sequence` int unsigned DEFAULT NULL,\n `cancellation_delivered_at` timestamp(6) NULL DEFAULT NULL,\n `details_pruned_at` timestamp(6) NULL DEFAULT NULL,\n `cancellation_scope_recovery_until` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_runs_workflow_instance_id_run_number_unique` (`workflow_instance_id`,`run_number`),\n KEY `workflow_runs_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_runs_namespace_index` (`namespace`),\n KEY `workflow_runs_business_key_index` (`business_key`),\n KEY `workflow_runs_sticky_worker_id_index` (`sticky_worker_id`),\n KEY `workflow_runs_sticky_until_index` (`sticky_until`),\n KEY `workflow_runs_archived_at_index` (`archived_at`),\n KEY `workflow_runs_archive_command_id_index` (`archive_command_id`),\n KEY `workflow_runs_import_source_index` (`import_source`),\n KEY `workflow_runs_import_id_index` (`import_id`),\n KEY `workflow_runs_import_dedupe_key_index` (`import_dedupe_key`),\n KEY `workflow_runs_imported_at_index` (`imported_at`),\n KEY `workflow_runs_prom_metrics_queue_idx` (`namespace`,`queue`),\n KEY `workflow_runs_namespace_status_quota_idx` (`namespace`,`status`),\n KEY `workflow_runs_cancellation_request_command_id_index` (`cancellation_request_command_id`),\n CONSTRAINT `dw_json_text_0cabe9701a2ae7cb549e` CHECK (json_valid(`visibility_labels`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_schedule_history_events", + "CREATE TABLE `workflow_schedule_history_events` (\n `id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_schedule_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `schedule_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `namespace` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `sequence` int unsigned NOT NULL,\n `event_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `payload` longtext COLLATE utf8mb4_bin,\n `workflow_instance_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `recorded_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n `occurrence_at_utc` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `wf_schedule_history_schedule_sequence_unique` (`workflow_schedule_id`,`sequence`),\n KEY `wf_schedule_history_namespace_schedule_idx` (`namespace`,`schedule_id`),\n KEY `wf_schedule_history_event_recorded_idx` (`event_type`,`recorded_at`),\n KEY `wf_schedule_history_workflow_schedule_idx` (`workflow_schedule_id`),\n KEY `wf_schedule_history_schedule_idx` (`schedule_id`),\n KEY `wf_schedule_history_namespace_idx` (`namespace`),\n KEY `wf_schedule_history_instance_idx` (`workflow_instance_id`),\n KEY `wf_schedule_history_run_idx` (`workflow_run_id`),\n KEY `wf_schedule_history_occurrence_idx` (`workflow_schedule_id`,`event_type`,`occurrence_at_utc`),\n CONSTRAINT `dw_json_text_5c5faf594e8d31ebe991` CHECK (json_valid(`payload`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_schedules", + "CREATE TABLE `workflow_schedules` (\n `id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `schedule_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `namespace` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `spec` longtext COLLATE utf8mb4_bin,\n `action` longtext COLLATE utf8mb4_bin,\n `status` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'active',\n `overlap_policy` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'skip',\n `note` text COLLATE utf8mb4_unicode_ci,\n `memo` longtext COLLATE utf8mb4_bin,\n `search_attributes` longtext COLLATE utf8mb4_bin,\n `visibility_labels` longtext COLLATE utf8mb4_bin,\n `jitter_seconds` int unsigned NOT NULL DEFAULT '0',\n `max_runs` bigint unsigned DEFAULT NULL,\n `remaining_actions` bigint unsigned DEFAULT NULL,\n `fires_count` bigint unsigned NOT NULL DEFAULT '0',\n `failures_count` bigint unsigned NOT NULL DEFAULT '0',\n `recent_actions` longtext COLLATE utf8mb4_bin,\n `buffered_actions` longtext COLLATE utf8mb4_bin,\n `last_fired_at` timestamp(6) NULL DEFAULT NULL,\n `next_fire_at` timestamp(6) NULL DEFAULT NULL,\n `latest_workflow_instance_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `connection` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `queue` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `paused_at` timestamp(6) NULL DEFAULT NULL,\n `deleted_at` timestamp(6) NULL DEFAULT NULL,\n `last_skip_reason` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `last_skipped_at` timestamp(6) NULL DEFAULT NULL,\n `skipped_trigger_count` bigint unsigned NOT NULL DEFAULT '0',\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n `dispatch_summary` text COLLATE utf8mb4_unicode_ci,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_schedules_namespace_schedule_id_unique` (`namespace`,`schedule_id`),\n KEY `workflow_schedules_status_next_fire_at_index` (`status`,`next_fire_at`),\n KEY `workflow_schedules_namespace_index` (`namespace`),\n KEY `workflow_schedules_latest_workflow_instance_id_index` (`latest_workflow_instance_id`),\n CONSTRAINT `dw_json_text_023daf97483a6925003e` CHECK (json_valid(`recent_actions`)),\n CONSTRAINT `dw_json_text_0779e5110faa8bb3a1ce` CHECK (json_valid(`action`)),\n CONSTRAINT `dw_json_text_127f3a5484eae46b4296` CHECK (json_valid(`memo`)),\n CONSTRAINT `dw_json_text_260b502951aabe6967a2` CHECK (json_valid(`visibility_labels`)),\n CONSTRAINT `dw_json_text_348ceaaa72578f94b30d` CHECK (json_valid(`search_attributes`)),\n CONSTRAINT `dw_json_text_d7aa273e112ccdb9bce4` CHECK (json_valid(`spec`)),\n CONSTRAINT `dw_json_text_fcbf8efdd61dbed85da4` CHECK (json_valid(`buffered_actions`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_search_attributes", + "CREATE TABLE `workflow_search_attributes` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_instance_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `key` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Attribute name (e.g., \"customer_id\", \"priority\", \"region\")',\n `type` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Type: string, keyword, int, float, bool, datetime',\n `value_string` text COLLATE utf8mb4_unicode_ci COMMENT 'For type=string (max 2048 chars enforced at app level)',\n `value_keyword` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'For type=keyword (exact match, indexed)',\n `value_keyword_list` longtext COLLATE utf8mb4_bin COMMENT 'For type=keyword_list (ordered exact-match values)',\n `value_int` bigint DEFAULT NULL COMMENT 'For type=int',\n `value_float` double DEFAULT NULL COMMENT 'For type=float',\n `value_bool` tinyint(1) DEFAULT NULL COMMENT 'For type=bool',\n `value_datetime` timestamp(6) NULL DEFAULT NULL COMMENT 'For type=datetime (microsecond precision)',\n `upserted_at_sequence` int unsigned NOT NULL COMMENT 'History sequence when this attribute was last upserted',\n `inherited_from_parent` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'True if inherited via continue-as-new',\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_search_attrs_run_key_unique` (`workflow_run_id`,`key`),\n KEY `workflow_search_attrs_instance_key_type` (`workflow_instance_id`,`key`,`type`),\n KEY `workflow_search_attrs_key_keyword` (`key`,`value_keyword`),\n KEY `workflow_search_attrs_key_int` (`key`,`value_int`),\n KEY `workflow_search_attrs_key_float` (`key`,`value_float`),\n KEY `workflow_search_attrs_key_bool` (`key`,`value_bool`),\n KEY `workflow_search_attrs_key_datetime` (`key`,`value_datetime`),\n KEY `workflow_search_attributes_workflow_run_id_index` (`workflow_run_id`),\n KEY `workflow_search_attributes_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_search_attributes_value_keyword_index` (`value_keyword`),\n KEY `workflow_search_attributes_value_int_index` (`value_int`),\n KEY `workflow_search_attributes_value_float_index` (`value_float`),\n KEY `workflow_search_attributes_value_bool_index` (`value_bool`),\n KEY `workflow_search_attributes_value_datetime_index` (`value_datetime`),\n CONSTRAINT `workflow_search_attributes_workflow_run_id_foreign` FOREIGN KEY (`workflow_run_id`) REFERENCES `workflow_runs` (`id`) ON DELETE CASCADE,\n CONSTRAINT `dw_json_text_df0541f7f01fef92919f` CHECK (json_valid(`value_keyword_list`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_service_calls", + "CREATE TABLE `workflow_service_calls` (\n `id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_service_endpoint_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `workflow_service_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `workflow_service_operation_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `namespace` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `endpoint_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `service_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `operation_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `caller_namespace` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `caller_workflow_instance_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `caller_workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `target_namespace` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `linked_workflow_instance_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `linked_workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `linked_workflow_update_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `status` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL,\n `outcome` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `operation_mode` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL,\n `resolved_binding_kind` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `resolved_target_reference` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `payload_codec` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `input_payload_reference` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `output_payload_reference` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `failure_payload_reference` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `failure_message` text COLLATE utf8mb4_unicode_ci,\n `idempotency_key` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `deadline_policy` longtext COLLATE utf8mb4_bin,\n `idempotency_policy` longtext COLLATE utf8mb4_bin,\n `cancellation_policy` longtext COLLATE utf8mb4_bin,\n `retry_policy` longtext COLLATE utf8mb4_bin,\n `boundary_policy` longtext COLLATE utf8mb4_bin,\n `metadata` longtext COLLATE utf8mb4_bin,\n `outcome_category` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `outcome_reason` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `outcome_message` text COLLATE utf8mb4_unicode_ci,\n `outcome_metadata` longtext COLLATE utf8mb4_bin,\n `policy_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `retry_after_seconds` int unsigned DEFAULT NULL,\n `caller_principal_subject` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `caller_principal_method` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `caller_principal_roles` longtext COLLATE utf8mb4_bin,\n `caller_principal_tenant` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `caller_principal_claims` longtext COLLATE utf8mb4_bin,\n `accepted_at` timestamp(6) NULL DEFAULT NULL,\n `started_at` timestamp(6) NULL DEFAULT NULL,\n `completed_at` timestamp(6) NULL DEFAULT NULL,\n `failed_at` timestamp(6) NULL DEFAULT NULL,\n `cancelled_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n KEY `wf_service_calls_namespace_status_idx` (`namespace`,`status`),\n KEY `wf_service_calls_caller_status_idx` (`caller_namespace`,`status`),\n KEY `wf_service_calls_target_status_idx` (`target_namespace`,`status`),\n KEY `wf_service_calls_namespace_outcome_idx` (`namespace`,`outcome`),\n KEY `wf_service_calls_caller_outcome_idx` (`caller_namespace`,`outcome`),\n KEY `wf_service_calls_target_outcome_idx` (`target_namespace`,`outcome`),\n KEY `wf_service_calls_endpoint_idx` (`workflow_service_endpoint_id`),\n KEY `wf_service_calls_service_idx` (`workflow_service_id`),\n KEY `wf_service_calls_operation_idx` (`workflow_service_operation_id`),\n KEY `wf_service_calls_namespace_idx` (`namespace`),\n KEY `wf_service_calls_caller_namespace_idx` (`caller_namespace`),\n KEY `wf_service_calls_caller_instance_idx` (`caller_workflow_instance_id`),\n KEY `wf_service_calls_caller_run_idx` (`caller_workflow_run_id`),\n KEY `wf_service_calls_target_namespace_idx` (`target_namespace`),\n KEY `wf_service_calls_linked_instance_idx` (`linked_workflow_instance_id`),\n KEY `wf_service_calls_linked_run_idx` (`linked_workflow_run_id`),\n KEY `wf_service_calls_linked_update_idx` (`linked_workflow_update_id`),\n KEY `wf_service_calls_status_idx` (`status`),\n KEY `wf_service_calls_outcome_idx` (`outcome`),\n KEY `wf_service_calls_mode_idx` (`operation_mode`),\n KEY `wf_service_calls_binding_kind_idx` (`resolved_binding_kind`),\n KEY `wf_service_calls_idempotency_idx` (`idempotency_key`),\n KEY `wf_service_calls_outcome_category_idx` (`outcome_category`),\n KEY `wf_service_calls_policy_idx` (`policy_name`),\n KEY `wf_service_calls_principal_subject_idx` (`caller_principal_subject`),\n KEY `wf_service_calls_accepted_at_idx` (`accepted_at`),\n CONSTRAINT `dw_json_text_4a6c5e40752d4ed0bdb4` CHECK (json_valid(`metadata`)),\n CONSTRAINT `dw_json_text_5a480bd9165f2eb68e43` CHECK (json_valid(`caller_principal_roles`)),\n CONSTRAINT `dw_json_text_718533c1e82804b31504` CHECK (json_valid(`deadline_policy`)),\n CONSTRAINT `dw_json_text_77a64a96c9d03d965701` CHECK (json_valid(`cancellation_policy`)),\n CONSTRAINT `dw_json_text_89af2bddb6216607276e` CHECK (json_valid(`idempotency_policy`)),\n CONSTRAINT `dw_json_text_89f01ea9712aa07575bf` CHECK (json_valid(`retry_policy`)),\n CONSTRAINT `dw_json_text_b4ffcdd589152c314969` CHECK (json_valid(`outcome_metadata`)),\n CONSTRAINT `dw_json_text_cb4fc45f46fe05d68f99` CHECK (json_valid(`caller_principal_claims`)),\n CONSTRAINT `dw_json_text_e06e9f587b4efc8ce3e9` CHECK (json_valid(`boundary_policy`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_service_endpoints", + "CREATE TABLE `workflow_service_endpoints` (\n `id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `namespace` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `endpoint_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `description` text COLLATE utf8mb4_unicode_ci,\n `boundary_policy` longtext COLLATE utf8mb4_bin,\n `metadata` longtext COLLATE utf8mb4_bin,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `wf_service_endpoints_namespace_name_unique` (`namespace`,`endpoint_name`),\n KEY `wf_service_endpoints_namespace_idx` (`namespace`),\n KEY `wf_service_endpoints_name_idx` (`endpoint_name`),\n CONSTRAINT `dw_json_text_3c3c6c7139ec6ffc9fd5` CHECK (json_valid(`metadata`)),\n CONSTRAINT `dw_json_text_6e65cde38938c5bf2752` CHECK (json_valid(`boundary_policy`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_service_operations", + "CREATE TABLE `workflow_service_operations` (\n `id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_service_endpoint_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_service_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `namespace` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `operation_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `description` text COLLATE utf8mb4_unicode_ci,\n `operation_mode` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL,\n `handler_binding_kind` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n `handler_target_reference` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `handler_binding` longtext COLLATE utf8mb4_bin,\n `deadline_policy` longtext COLLATE utf8mb4_bin,\n `idempotency_policy` longtext COLLATE utf8mb4_bin,\n `cancellation_policy` longtext COLLATE utf8mb4_bin,\n `retry_policy` longtext COLLATE utf8mb4_bin,\n `boundary_policy` longtext COLLATE utf8mb4_bin,\n `metadata` longtext COLLATE utf8mb4_bin,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `wf_service_ops_namespace_service_name_unique` (`namespace`,`workflow_service_id`,`operation_name`),\n KEY `wf_service_ops_namespace_name_idx` (`namespace`,`operation_name`),\n KEY `wf_service_ops_endpoint_idx` (`workflow_service_endpoint_id`),\n KEY `wf_service_ops_service_idx` (`workflow_service_id`),\n KEY `wf_service_ops_namespace_idx` (`namespace`),\n KEY `wf_service_ops_name_idx` (`operation_name`),\n KEY `wf_service_ops_mode_idx` (`operation_mode`),\n KEY `wf_service_ops_binding_kind_idx` (`handler_binding_kind`),\n CONSTRAINT `dw_json_text_05dd84f339d72c2ea677` CHECK (json_valid(`boundary_policy`)),\n CONSTRAINT `dw_json_text_13e161b371e6bd18c390` CHECK (json_valid(`cancellation_policy`)),\n CONSTRAINT `dw_json_text_2409229a6279aa76321a` CHECK (json_valid(`retry_policy`)),\n CONSTRAINT `dw_json_text_818561935c015a8f258c` CHECK (json_valid(`metadata`)),\n CONSTRAINT `dw_json_text_aaf235f8970ff7618e0c` CHECK (json_valid(`deadline_policy`)),\n CONSTRAINT `dw_json_text_e844533982a5ba5f974a` CHECK (json_valid(`handler_binding`)),\n CONSTRAINT `dw_json_text_e9b84c12c63f3f05d4f8` CHECK (json_valid(`idempotency_policy`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_services", + "CREATE TABLE `workflow_services` (\n `id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_service_endpoint_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `namespace` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `service_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `description` text COLLATE utf8mb4_unicode_ci,\n `boundary_policy` longtext COLLATE utf8mb4_bin,\n `metadata` longtext COLLATE utf8mb4_bin,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `wf_services_namespace_endpoint_name_unique` (`namespace`,`workflow_service_endpoint_id`,`service_name`),\n KEY `wf_services_namespace_name_idx` (`namespace`,`service_name`),\n KEY `wf_services_endpoint_idx` (`workflow_service_endpoint_id`),\n KEY `wf_services_namespace_idx` (`namespace`),\n KEY `wf_services_name_idx` (`service_name`),\n CONSTRAINT `dw_json_text_1af5bae7acfe0b9d3f11` CHECK (json_valid(`boundary_policy`)),\n CONSTRAINT `dw_json_text_4e612803d0ef9c0cfcaa` CHECK (json_valid(`metadata`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_signal_records", + "CREATE TABLE `workflow_signal_records` (\n `id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_command_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_instance_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `target_scope` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'instance',\n `requested_workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `resolved_workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `signal_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `signal_wait_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `outcome` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `command_sequence` int unsigned DEFAULT NULL,\n `workflow_sequence` int unsigned DEFAULT NULL,\n `payload_codec` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `arguments` longtext COLLATE utf8mb4_unicode_ci,\n `validation_errors` longtext COLLATE utf8mb4_bin,\n `rejection_reason` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `received_at` timestamp(6) NULL DEFAULT NULL,\n `applied_at` timestamp(6) NULL DEFAULT NULL,\n `rejected_at` timestamp(6) NULL DEFAULT NULL,\n `closed_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_signal_records_workflow_command_id_unique` (`workflow_command_id`),\n KEY `workflow_signal_records_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_signal_records_workflow_run_id_index` (`workflow_run_id`),\n KEY `workflow_signal_records_requested_workflow_run_id_index` (`requested_workflow_run_id`),\n KEY `workflow_signal_records_resolved_workflow_run_id_index` (`resolved_workflow_run_id`),\n KEY `workflow_signal_records_signal_name_index` (`signal_name`),\n KEY `workflow_signal_records_signal_wait_id_index` (`signal_wait_id`),\n KEY `workflow_signal_records_status_index` (`status`),\n KEY `workflow_signal_records_outcome_index` (`outcome`),\n KEY `workflow_signal_records_command_sequence_index` (`command_sequence`),\n KEY `workflow_signal_records_workflow_sequence_index` (`workflow_sequence`),\n CONSTRAINT `dw_json_text_87990e1e6c171fd7edb3` CHECK (json_valid(`validation_errors`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_task_poll_cursors", + "CREATE TABLE `workflow_task_poll_cursors` (\n `namespace` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,\n `task_queue` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `next_task_kind` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`namespace`,`task_queue`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_tasks", + "CREATE TABLE `workflow_tasks` (\n `id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `namespace` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `task_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `compatibility` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `payload` longtext COLLATE utf8mb4_bin,\n `connection` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `queue` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `priority` tinyint unsigned NOT NULL DEFAULT '5',\n `fairness_key` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `fairness_weight` smallint unsigned NOT NULL DEFAULT '1',\n `sticky_worker_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `sticky_until` timestamp(6) NULL DEFAULT NULL,\n `sticky_replay_mode` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `sticky_claimed_at` timestamp(6) NULL DEFAULT NULL,\n `available_at` timestamp(6) NULL DEFAULT NULL,\n `leased_at` timestamp(6) NULL DEFAULT NULL,\n `lease_owner` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `lease_expires_at` timestamp(6) NULL DEFAULT NULL,\n `attempt_count` int unsigned NOT NULL DEFAULT '0',\n `last_dispatch_attempt_at` timestamp(6) NULL DEFAULT NULL,\n `last_dispatched_at` timestamp(6) NULL DEFAULT NULL,\n `last_dispatch_error` text COLLATE utf8mb4_unicode_ci,\n `last_claim_failed_at` timestamp(6) NULL DEFAULT NULL,\n `last_claim_error` text COLLATE utf8mb4_unicode_ci,\n `repair_count` int unsigned NOT NULL DEFAULT '0',\n `repair_available_at` timestamp(6) NULL DEFAULT NULL,\n `last_error` text COLLATE utf8mb4_unicode_ci,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n `ready_origin_at` datetime(6) DEFAULT NULL,\n PRIMARY KEY (`id`),\n KEY `workflow_tasks_status_available_at_index` (`status`,`available_at`),\n KEY `workflow_tasks_workflow_run_id_index` (`workflow_run_id`),\n KEY `workflow_tasks_namespace_index` (`namespace`),\n KEY `workflow_tasks_sticky_worker_id_index` (`sticky_worker_id`),\n KEY `workflow_tasks_sticky_until_index` (`sticky_until`),\n KEY `workflow_tasks_sticky_replay_mode_index` (`sticky_replay_mode`),\n KEY `workflow_tasks_sticky_claimed_at_index` (`sticky_claimed_at`),\n KEY `workflow_tasks_dispatch_order_index` (`queue`,`status`,`priority`,`available_at`),\n KEY `workflow_tasks_namespace_queue_status_idx` (`namespace`,`queue`,`status`),\n KEY `workflow_tasks_fairness_class_index` (`queue`,`status`,`fairness_key`),\n KEY `workflow_tasks_prom_metrics_queue_idx` (`namespace`,`queue`),\n KEY `dw_workflow_tasks_poll` (`namespace`(64),`queue`(64),`task_type`(16),`status`(16),`available_at`),\n KEY `dw_workflow_tasks_scoped_dispatch` (`namespace`,`queue`,`task_type`(16),`status`(16),`priority`,`available_at`,`id`),\n CONSTRAINT `dw_json_text_edce43b6b7b815300bd1` CHECK (json_valid(`payload`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_update_validation_tasks", + "CREATE TABLE `workflow_update_validation_tasks` (\n `id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `idempotency_key` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n `namespace` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_instance_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `task_queue` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `compatibility` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `workflow_definition_fingerprint` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `update_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `request_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `input_hash` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n `payload_codec` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `arguments` longtext COLLATE utf8mb4_unicode_ci NOT NULL,\n `command_context` longtext COLLATE utf8mb4_bin,\n `status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `attempt_count` int unsigned NOT NULL DEFAULT '0',\n `lease_owner` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `lease_expires_at` timestamp(6) NULL DEFAULT NULL,\n `rejection_reason` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `rejection_message` text COLLATE utf8mb4_unicode_ci,\n `failure_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `validation_errors` longtext COLLATE utf8mb4_bin,\n `approved_at` timestamp(6) NULL DEFAULT NULL,\n `rejected_at` timestamp(6) NULL DEFAULT NULL,\n `failed_at` timestamp(6) NULL DEFAULT NULL,\n `timed_out_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_update_validation_tasks_idempotency_key_unique` (`idempotency_key`),\n KEY `workflow_update_validation_poll_index` (`namespace`,`task_queue`,`status`,`created_at`),\n KEY `workflow_update_validation_tasks_namespace_index` (`namespace`),\n KEY `workflow_update_validation_tasks_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_update_validation_tasks_workflow_run_id_index` (`workflow_run_id`),\n KEY `workflow_update_validation_tasks_workflow_type_index` (`workflow_type`),\n KEY `workflow_update_validation_tasks_task_queue_index` (`task_queue`),\n KEY `workflow_update_validation_tasks_compatibility_index` (`compatibility`),\n KEY `workflow_update_validation_tasks_update_name_index` (`update_name`),\n KEY `workflow_update_validation_tasks_status_index` (`status`),\n KEY `workflow_update_validation_tasks_lease_owner_index` (`lease_owner`),\n KEY `workflow_update_validation_tasks_lease_expires_at_index` (`lease_expires_at`),\n CONSTRAINT `dw_json_text_8648c83f3febc7faec99` CHECK (json_valid(`command_context`)),\n CONSTRAINT `dw_json_text_fc8e8804602cda328168` CHECK (json_valid(`validation_errors`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_updates", + "CREATE TABLE `workflow_updates` (\n `id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_command_id` varchar(26) COLLATE utf8mb4_unicode_ci NOT NULL,\n `workflow_instance_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `target_scope` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'instance',\n `requested_workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `resolved_workflow_run_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `update_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `outcome` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `command_sequence` int unsigned DEFAULT NULL,\n `workflow_sequence` int unsigned DEFAULT NULL,\n `payload_codec` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `arguments` longtext COLLATE utf8mb4_unicode_ci,\n `result` longtext COLLATE utf8mb4_unicode_ci,\n `validation_errors` longtext COLLATE utf8mb4_bin,\n `rejection_reason` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `failure_id` varchar(26) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `failure_message` text COLLATE utf8mb4_unicode_ci,\n `accepted_at` timestamp(6) NULL DEFAULT NULL,\n `applied_at` timestamp(6) NULL DEFAULT NULL,\n `rejected_at` timestamp(6) NULL DEFAULT NULL,\n `closed_at` timestamp(6) NULL DEFAULT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_updates_workflow_command_id_unique` (`workflow_command_id`),\n KEY `workflow_updates_workflow_instance_id_index` (`workflow_instance_id`),\n KEY `workflow_updates_workflow_run_id_index` (`workflow_run_id`),\n KEY `workflow_updates_requested_workflow_run_id_index` (`requested_workflow_run_id`),\n KEY `workflow_updates_resolved_workflow_run_id_index` (`resolved_workflow_run_id`),\n KEY `workflow_updates_update_name_index` (`update_name`),\n KEY `workflow_updates_status_index` (`status`),\n KEY `workflow_updates_outcome_index` (`outcome`),\n KEY `workflow_updates_command_sequence_index` (`command_sequence`),\n KEY `workflow_updates_workflow_sequence_index` (`workflow_sequence`),\n KEY `workflow_updates_failure_id_index` (`failure_id`),\n CONSTRAINT `dw_json_text_efe19529950144852322` CHECK (json_valid(`validation_errors`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_worker_build_id_rollouts", + "CREATE TABLE `workflow_worker_build_id_rollouts` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `namespace` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,\n `task_queue` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `build_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',\n `drain_intent` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'active',\n `drained_at` timestamp NULL DEFAULT NULL,\n `created_at` timestamp NULL DEFAULT NULL,\n `updated_at` timestamp NULL DEFAULT NULL,\n `promoted_at` timestamp NULL DEFAULT NULL,\n `rolled_back_at` timestamp NULL DEFAULT NULL,\n `required_compatibility` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `recorded_fingerprint` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `compatibility_policy` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `workflow_types` longtext COLLATE utf8mb4_bin,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_build_id_rollouts_scope_unique` (`namespace`,`task_queue`,`build_id`),\n CONSTRAINT `dw_json_text_19de9b23ee283257b769` CHECK (json_valid(`workflow_types`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_worker_compatibility_heartbeats", + "CREATE TABLE `workflow_worker_compatibility_heartbeats` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `worker_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `scope_key` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,\n `namespace` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `host` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `process_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `connection` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `queue` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `supported` longtext COLLATE utf8mb4_bin NOT NULL,\n `recorded_at` datetime(6) NOT NULL,\n `expires_at` datetime(6) NOT NULL,\n `created_at` timestamp(6) NULL DEFAULT NULL,\n `updated_at` timestamp(6) NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_worker_compatibility_heartbeats_scope_unique` (`worker_id`,`scope_key`),\n KEY `workflow_worker_compatibility_heartbeats_namespace_index` (`namespace`),\n KEY `workflow_worker_compatibility_heartbeats_connection_index` (`connection`),\n KEY `workflow_worker_compatibility_heartbeats_queue_index` (`queue`),\n KEY `workflow_worker_compatibility_heartbeats_expires_at_index` (`expires_at`),\n CONSTRAINT `dw_json_text_c9c8573bb83f23ce864d` CHECK (json_valid(`supported`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_worker_registrations", + "CREATE TABLE `workflow_worker_registrations` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `worker_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `namespace` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,\n `task_queue` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `runtime` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL,\n `sdk_version` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `build_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `supported_workflow_types` longtext COLLATE utf8mb4_bin,\n `workflow_definition_fingerprints` longtext COLLATE utf8mb4_bin,\n `workflow_command_contracts` longtext COLLATE utf8mb4_bin,\n `supported_activity_types` longtext COLLATE utf8mb4_bin,\n `capabilities` longtext COLLATE utf8mb4_bin,\n `capability_manifest` longtext COLLATE utf8mb4_bin,\n `max_concurrent_workflow_tasks` int unsigned NOT NULL DEFAULT '100',\n `max_concurrent_activity_tasks` int unsigned NOT NULL DEFAULT '100',\n `max_concurrent_worker_sessions` int unsigned NOT NULL DEFAULT '10',\n `available_workflow_slots` int unsigned DEFAULT NULL,\n `available_activity_slots` int unsigned DEFAULT NULL,\n `available_session_slots` int unsigned DEFAULT NULL,\n `process_metrics` longtext COLLATE utf8mb4_bin,\n `heartbeat_interval_seconds` int unsigned DEFAULT NULL,\n `last_heartbeat_at` timestamp NULL DEFAULT NULL,\n `status` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'active',\n `created_at` timestamp NULL DEFAULT NULL,\n `updated_at` timestamp NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_worker_registrations_worker_id_namespace_unique` (`worker_id`,`namespace`),\n KEY `workflow_worker_registrations_namespace_task_queue_status_index` (`namespace`,`task_queue`,`status`),\n CONSTRAINT `dw_json_text_34d29bf4c212ababa706` CHECK (json_valid(`process_metrics`)),\n CONSTRAINT `dw_json_text_4d23abbe7d6f10d67024` CHECK (json_valid(`supported_activity_types`)),\n CONSTRAINT `dw_json_text_4f49aa63cb080bc75d50` CHECK (json_valid(`workflow_definition_fingerprints`)),\n CONSTRAINT `dw_json_text_5db648194e26be45f445` CHECK (json_valid(`capabilities`)),\n CONSTRAINT `dw_json_text_5ff38312fcf7d855445d` CHECK (json_valid(`workflow_command_contracts`)),\n CONSTRAINT `dw_json_text_9e5445d614888bb3661c` CHECK (json_valid(`supported_workflow_types`)),\n CONSTRAINT `dw_json_text_d1357dfe1fe52c7b2691` CHECK (json_valid(`capability_manifest`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ], + [ + "workflow_worker_sessions", + "CREATE TABLE `workflow_worker_sessions` (\n `id` bigint unsigned NOT NULL AUTO_INCREMENT,\n `namespace` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,\n `session_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\n `connection` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `queue` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `requirements` longtext COLLATE utf8mb4_bin,\n `status` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'active',\n `lease_owner` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `lease_expires_at` timestamp NULL DEFAULT NULL,\n `ttl_expires_at` timestamp NULL DEFAULT NULL,\n `closed_at` timestamp NULL DEFAULT NULL,\n `failure_reason` varchar(128) COLLATE utf8mb4_unicode_ci DEFAULT NULL,\n `lease_seconds` int unsigned NOT NULL DEFAULT '120',\n `ttl_seconds` int unsigned NOT NULL DEFAULT '1800',\n `max_concurrent_activities` int unsigned NOT NULL DEFAULT '1',\n `create_if_missing` tinyint(1) NOT NULL DEFAULT '1',\n `allow_reacquire_after_failure` tinyint(1) NOT NULL DEFAULT '1',\n `last_heartbeat_at` timestamp NULL DEFAULT NULL,\n `created_at` timestamp NULL DEFAULT NULL,\n `updated_at` timestamp NULL DEFAULT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `workflow_worker_sessions_namespace_session_id_unique` (`namespace`,`session_id`),\n KEY `workflow_worker_sessions_namespace_status_index` (`namespace`,`status`),\n KEY `workflow_worker_sessions_namespace_lease_owner_status_index` (`namespace`,`lease_owner`,`status`),\n KEY `workflow_worker_sessions_namespace_queue_status_index` (`namespace`,`queue`,`status`),\n CONSTRAINT `dw_json_text_177d4c6e72d9b9fdebda` CHECK (json_valid(`requirements`))\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" + ] +] diff --git a/rust/migrations/mysql/0016_schedule_dispatch_summary.sql b/rust/migrations/mysql/0016_schedule_dispatch_summary.sql new file mode 100644 index 000000000..5d527f326 --- /dev/null +++ b/rust/migrations/mysql/0016_schedule_dispatch_summary.sql @@ -0,0 +1,2 @@ +-- Bounded atomic dispatch authority. Legacy schedules remain unknown. +ALTER TABLE workflow_schedules ADD COLUMN dispatch_summary TEXT NULL; diff --git a/rust/migrations/postgres/0015_catalog.json b/rust/migrations/postgres/0015_catalog.json new file mode 100644 index 000000000..2e9f44cc6 --- /dev/null +++ b/rust/migrations/postgres/0015_catalog.json @@ -0,0 +1,19410 @@ +[ + [ + "column", + "_sqlx_migrations.1", + { + "name": "version", + "type": "bigint", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "_sqlx_migrations.2", + { + "name": "description", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "_sqlx_migrations.3", + { + "name": "installed_on", + "type": "timestamp with time zone", + "default": "now()", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "_sqlx_migrations.4", + { + "name": "success", + "type": "boolean", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "_sqlx_migrations.5", + { + "name": "checksum", + "type": "bytea", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "_sqlx_migrations.6", + { + "name": "execution_time", + "type": "bigint", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "activity_attempts.1", + { + "name": "id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "activity_attempts.10", + { + "name": "lease_expires_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "activity_attempts.11", + { + "name": "closed_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "activity_attempts.12", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "activity_attempts.13", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "activity_attempts.14", + { + "name": "worker_attempt_id", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "activity_attempts.2", + { + "name": "workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "activity_attempts.3", + { + "name": "activity_execution_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "activity_attempts.4", + { + "name": "workflow_task_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "activity_attempts.5", + { + "name": "attempt_number", + "type": "integer", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "activity_attempts.6", + { + "name": "status", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "activity_attempts.7", + { + "name": "lease_owner", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "activity_attempts.8", + { + "name": "started_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "activity_attempts.9", + { + "name": "last_heartbeat_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "activity_executions.1", + { + "name": "id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "activity_executions.10", + { + "name": "exception", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "activity_executions.11", + { + "name": "connection", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "activity_executions.12", + { + "name": "queue", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "activity_executions.13", + { + "name": "attempt_count", + "type": "integer", + "default": "1", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "activity_executions.14", + { + "name": "current_attempt_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "activity_executions.15", + { + "name": "retry_policy", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "activity_executions.16", + { + "name": "parallel_group_path", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "activity_executions.17", + { + "name": "activity_options", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "activity_executions.18", + { + "name": "schedule_deadline_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "activity_executions.19", + { + "name": "close_deadline_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "activity_executions.2", + { + "name": "workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "activity_executions.20", + { + "name": "schedule_to_close_deadline_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "activity_executions.21", + { + "name": "heartbeat_deadline_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "activity_executions.22", + { + "name": "started_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "activity_executions.23", + { + "name": "closed_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "activity_executions.24", + { + "name": "last_heartbeat_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "activity_executions.25", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "activity_executions.26", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "activity_executions.3", + { + "name": "sequence", + "type": "integer", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "activity_executions.4", + { + "name": "activity_class", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "activity_executions.5", + { + "name": "activity_type", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "activity_executions.6", + { + "name": "status", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "activity_executions.7", + { + "name": "payload_codec", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "activity_executions.8", + { + "name": "arguments", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "activity_executions.9", + { + "name": "result", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_command_intents.1", + { + "collation": "default", + "default": null, + "generated": "", + "identity": "", + "name": "command_id", + "not_null": true, + "type": "character varying(26)" + } + ], + [ + "column", + "dw_command_intents.2", + { + "collation": "default", + "default": null, + "generated": "", + "identity": "", + "name": "namespace", + "not_null": true, + "type": "text" + } + ], + [ + "column", + "dw_command_intents.3", + { + "collation": "default", + "default": null, + "generated": "", + "identity": "", + "name": "intent_digest", + "not_null": true, + "type": "character varying(71)" + } + ], + [ + "column", + "dw_external_payload_deletions.1", + { + "name": "id", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_external_payload_deletions.2", + { + "name": "namespace", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_external_payload_deletions.3", + { + "name": "storage_uri", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_external_payload_deletions.4", + { + "name": "storage_uri_sha256", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_external_payload_deletions.5", + { + "name": "storage_policy", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_external_payload_deletions.6", + { + "name": "attempts", + "type": "bigint", + "default": "0", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "dw_external_payload_deletions.7", + { + "name": "failure_code", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_external_payload_deletions.8", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "dw_external_payload_deletions.9", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "dw_poll_receipts.1", + { + "name": "namespace", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_poll_receipts.2", + { + "name": "worker_id", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_poll_receipts.3", + { + "name": "kind", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_poll_receipts.4", + { + "name": "request_id", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_poll_receipts.5", + { + "name": "task_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_poll_receipts.6", + { + "name": "attempt", + "type": "bigint", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "dw_poll_receipts.7", + { + "name": "response", + "type": "jsonb", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "dw_poll_receipts.8", + { + "name": "expires_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "dw_query_cache.1", + { + "name": "key", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_query_cache.2", + { + "name": "value", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_query_cache.3", + { + "name": "expiration", + "type": "bigint", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "dw_run_command_contracts.1", + { + "name": "workflow_run_id", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_run_command_contracts.2", + { + "name": "namespace", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_run_command_contracts.3", + { + "name": "workflow_type", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_run_command_contracts.4", + { + "name": "contract", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_run_command_contracts.5", + { + "name": "worker_id", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_run_command_contracts.6", + { + "name": "workflow_task_id", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_run_command_contracts.7", + { + "name": "bound_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "dw_server_schema.1", + { + "name": "engine", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_server_schema.2", + { + "name": "version", + "type": "bigint", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "dw_service_admission_counters.1", + { + "collation": "default", + "default": null, + "generated": "", + "identity": "", + "name": "cache_key", + "not_null": true, + "type": "text" + } + ], + [ + "column", + "dw_service_admission_counters.2", + { + "collation": null, + "default": null, + "generated": "", + "identity": "", + "name": "amount", + "not_null": true, + "type": "bigint" + } + ], + [ + "column", + "dw_service_admission_counters.3", + { + "collation": null, + "default": null, + "generated": "", + "identity": "", + "name": "expires_at", + "not_null": true, + "type": "timestamp(6) without time zone" + } + ], + [ + "column", + "dw_service_call_deadlines.1", + { + "collation": "default", + "default": null, + "generated": "", + "identity": "", + "name": "service_call_id", + "not_null": true, + "type": "text" + } + ], + [ + "column", + "dw_service_call_deadlines.2", + { + "collation": "default", + "default": null, + "generated": "", + "identity": "", + "name": "namespace", + "not_null": true, + "type": "text" + } + ], + [ + "column", + "dw_service_call_deadlines.3", + { + "collation": null, + "default": null, + "generated": "", + "identity": "", + "name": "call_deadline_at", + "not_null": true, + "type": "timestamp(6) without time zone" + } + ], + [ + "column", + "dw_stream_reclaims.1", + { + "collation": null, + "default": null, + "generated": "", + "identity": "", + "name": "stream_id", + "not_null": true, + "type": "bigint" + } + ], + [ + "column", + "dw_stream_reclaims.2", + { + "collation": "default", + "default": null, + "generated": "", + "identity": "", + "name": "namespace", + "not_null": true, + "type": "text" + } + ], + [ + "column", + "dw_stream_reclaims.3", + { + "collation": "default", + "default": null, + "generated": "", + "identity": "", + "name": "workflow_run_id", + "not_null": true, + "type": "text" + } + ], + [ + "column", + "dw_stream_reclaims.4", + { + "collation": null, + "default": null, + "generated": "", + "identity": "", + "name": "reclaim_at", + "not_null": true, + "type": "timestamp(6) without time zone" + } + ], + [ + "column", + "dw_task_completions.1", + { + "name": "task_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_task_completions.2", + { + "name": "receipt", + "type": "jsonb", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "dw_task_queue_pauses.1", + { + "name": "namespace", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_task_queue_pauses.2", + { + "name": "task_queue", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_task_queue_pauses.3", + { + "name": "reason", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_task_queue_pauses.4", + { + "name": "paused_by", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_task_queue_pauses.5", + { + "name": "paused_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "dw_task_queue_pauses.6", + { + "name": "resumed_by", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_task_queue_pauses.7", + { + "name": "resumed_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "dw_worker_registration_incarnations.1", + { + "name": "token", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_worker_registration_incarnations.2", + { + "name": "namespace", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_worker_registration_incarnations.3", + { + "name": "worker_id", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_worker_registration_incarnations.4", + { + "name": "status", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_worker_registration_incarnations.5", + { + "name": "recovered_workflow_task_count", + "type": "bigint", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "dw_worker_registration_incarnations.6", + { + "name": "finished_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "dw_worker_registration_incarnations.7", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "dw_worker_registration_incarnations.8", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "dw_worker_session_holders.1", + { + "name": "namespace", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_worker_session_holders.2", + { + "name": "session_id", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_worker_session_holders.3", + { + "name": "incarnation", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "dw_worker_session_holders.4", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "failed_jobs.1", + { + "name": "id", + "type": "bigint", + "default": "nextval('failed_jobs_id_seq'::regclass)", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "failed_jobs.2", + { + "name": "uuid", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "failed_jobs.3", + { + "name": "connection", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "failed_jobs.4", + { + "name": "queue", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "failed_jobs.5", + { + "name": "payload", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "failed_jobs.6", + { + "name": "exception", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "failed_jobs.7", + { + "name": "failed_at", + "type": "timestamp(0) without time zone", + "default": "CURRENT_TIMESTAMP", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "jobs.1", + { + "name": "id", + "type": "bigint", + "default": "nextval('jobs_id_seq'::regclass)", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "jobs.2", + { + "name": "queue", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "jobs.3", + { + "name": "payload", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "jobs.4", + { + "name": "attempts", + "type": "smallint", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "jobs.5", + { + "name": "reserved_at", + "type": "integer", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "jobs.6", + { + "name": "available_at", + "type": "integer", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "jobs.7", + { + "name": "created_at", + "type": "integer", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "migrations.1", + { + "name": "id", + "type": "integer", + "default": "nextval('migrations_id_seq'::regclass)", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "migrations.2", + { + "name": "migration", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "migrations.3", + { + "name": "batch", + "type": "integer", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_credentials.1", + { + "name": "id", + "type": "character varying(64)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "runtime_credentials.10", + { + "name": "revoked_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_credentials.11", + { + "name": "rotated_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_credentials.12", + { + "name": "created_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_credentials.13", + { + "name": "updated_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_credentials.2", + { + "name": "name", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "runtime_credentials.3", + { + "name": "subject", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "runtime_credentials.4", + { + "name": "roles", + "type": "json", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_credentials.5", + { + "name": "tenant", + "type": "character varying(128)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "runtime_credentials.6", + { + "name": "claims", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_credentials.7", + { + "name": "token_prefix", + "type": "character varying(16)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "runtime_credentials.8", + { + "name": "token_hash", + "type": "character(64)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "runtime_credentials.9", + { + "name": "expires_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_external_payload_backup_hold.1", + { + "name": "id", + "type": "smallint", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_external_payload_backup_hold.2", + { + "name": "owner", + "type": "uuid", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_external_payload_backup_hold.3", + { + "name": "acquired_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_external_payload_backup_hold.4", + { + "name": "expires_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_external_payload_cleanup_stats.1", + { + "name": "namespace", + "type": "character varying(128)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "runtime_external_payload_cleanup_stats.10", + { + "name": "last_deleted_backing_objects", + "type": "integer", + "default": "0", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_external_payload_cleanup_stats.11", + { + "name": "last_shared_objects_preserved", + "type": "integer", + "default": "0", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_external_payload_cleanup_stats.12", + { + "name": "last_blocked_outcomes", + "type": "integer", + "default": "0", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_external_payload_cleanup_stats.13", + { + "name": "last_storage_driver_failures", + "type": "integer", + "default": "0", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_external_payload_cleanup_stats.14", + { + "name": "last_pass_status", + "type": "character varying(16)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "runtime_external_payload_cleanup_stats.15", + { + "name": "last_completed_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_external_payload_cleanup_stats.16", + { + "name": "last_storage_failure_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_external_payload_cleanup_stats.17", + { + "name": "created_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_external_payload_cleanup_stats.18", + { + "name": "updated_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_external_payload_cleanup_stats.2", + { + "name": "passes_total", + "type": "bigint", + "default": "'0'::bigint", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_external_payload_cleanup_stats.3", + { + "name": "deleted_references_total", + "type": "bigint", + "default": "'0'::bigint", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_external_payload_cleanup_stats.4", + { + "name": "deleted_backing_objects_total", + "type": "bigint", + "default": "'0'::bigint", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_external_payload_cleanup_stats.5", + { + "name": "shared_objects_preserved_total", + "type": "bigint", + "default": "'0'::bigint", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_external_payload_cleanup_stats.6", + { + "name": "blocked_outcomes_total", + "type": "bigint", + "default": "'0'::bigint", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_external_payload_cleanup_stats.7", + { + "name": "storage_driver_failures_total", + "type": "bigint", + "default": "'0'::bigint", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_external_payload_cleanup_stats.8", + { + "name": "last_processed", + "type": "integer", + "default": "0", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_external_payload_cleanup_stats.9", + { + "name": "last_deleted_references", + "type": "integer", + "default": "0", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_external_payload_object_locks.1", + { + "name": "bucket", + "type": "smallint", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_external_payloads.1", + { + "name": "id", + "type": "character varying(64)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "runtime_external_payloads.10", + { + "name": "last_fetched_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_external_payloads.11", + { + "name": "created_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_external_payloads.12", + { + "name": "updated_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_external_payloads.13", + { + "name": "upload_status", + "type": "character varying(16)", + "default": "'ready'::character varying", + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "runtime_external_payloads.2", + { + "name": "namespace", + "type": "character varying(128)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "runtime_external_payloads.3", + { + "name": "storage_uri", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "runtime_external_payloads.4", + { + "name": "storage_uri_sha256", + "type": "character(64)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "runtime_external_payloads.5", + { + "name": "codec", + "type": "character varying(64)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "runtime_external_payloads.6", + { + "name": "sha256", + "type": "character(64)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "runtime_external_payloads.7", + { + "name": "size_bytes", + "type": "bigint", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_external_payloads.8", + { + "name": "retained_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_external_payloads.9", + { + "name": "expires_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_payload_completion_budgets.1", + { + "name": "id", + "type": "character(64)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "runtime_payload_completion_budgets.2", + { + "name": "namespace", + "type": "character varying(128)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "runtime_payload_completion_budgets.3", + { + "name": "context", + "type": "json", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_payload_completion_budgets.4", + { + "name": "slots", + "type": "json", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_payload_completion_budgets.5", + { + "name": "objects", + "type": "json", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_payload_completion_budgets.6", + { + "name": "expires_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_payload_completion_budgets.7", + { + "name": "created_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "runtime_payload_completion_budgets.8", + { + "name": "updated_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "search_attribute_definitions.1", + { + "name": "id", + "type": "bigint", + "default": "nextval('search_attribute_definitions_id_seq'::regclass)", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "search_attribute_definitions.2", + { + "name": "namespace", + "type": "character varying(128)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "search_attribute_definitions.3", + { + "name": "name", + "type": "character varying(128)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "search_attribute_definitions.4", + { + "name": "type", + "type": "character varying(32)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "search_attribute_definitions.5", + { + "name": "created_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "search_attribute_definitions.6", + { + "name": "updated_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_child_calls.1", + { + "name": "id", + "type": "bigint", + "default": "nextval('workflow_child_calls_id_seq'::regclass)", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_child_calls.10", + { + "name": "parent_close_policy", + "type": "character varying(32)", + "default": "'abandon'::character varying", + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_child_calls.11", + { + "name": "connection", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_child_calls.12", + { + "name": "queue", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_child_calls.13", + { + "name": "compatibility", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_child_calls.14", + { + "name": "retry_policy", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_child_calls.15", + { + "name": "timeout_policy", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_child_calls.16", + { + "name": "cancellation_propagation", + "type": "boolean", + "default": "false", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_child_calls.17", + { + "name": "status", + "type": "character varying(32)", + "default": "'scheduled'::character varying", + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_child_calls.18", + { + "name": "result_payload_reference", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_child_calls.19", + { + "name": "failure_reference", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_child_calls.2", + { + "name": "parent_workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_child_calls.20", + { + "name": "closed_reason", + "type": "character varying(64)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_child_calls.21", + { + "name": "scheduled_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_child_calls.22", + { + "name": "started_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_child_calls.23", + { + "name": "closed_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_child_calls.24", + { + "name": "arguments", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_child_calls.25", + { + "name": "metadata", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_child_calls.26", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_child_calls.27", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_child_calls.3", + { + "name": "parent_workflow_instance_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_child_calls.4", + { + "name": "sequence", + "type": "integer", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_child_calls.5", + { + "name": "child_workflow_type", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_child_calls.6", + { + "name": "child_workflow_class", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_child_calls.7", + { + "name": "requested_child_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_child_calls.8", + { + "name": "resolved_child_instance_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_child_calls.9", + { + "name": "resolved_child_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_child_projection_repairs.1", + { + "name": "workflow_history_event_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_child_projection_repairs.2", + { + "name": "workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_child_projection_repairs.3", + { + "name": "workflow_task_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_child_projection_repairs.4", + { + "name": "history_sequence", + "type": "integer", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_child_projection_repairs.5", + { + "name": "failure_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_child_projection_repairs.6", + { + "name": "failed_child_counted_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_child_projection_repairs.7", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_child_projection_repairs.8", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_commands.1", + { + "name": "id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_commands.10", + { + "name": "request_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_commands.11", + { + "name": "status", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_commands.12", + { + "name": "outcome", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_commands.13", + { + "name": "workflow_class", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_commands.14", + { + "name": "workflow_type", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_commands.15", + { + "name": "payload_codec", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_commands.16", + { + "name": "payload", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_commands.17", + { + "name": "rejection_reason", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_commands.18", + { + "name": "command_sequence", + "type": "integer", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_commands.19", + { + "name": "message_sequence", + "type": "integer", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_commands.2", + { + "name": "workflow_instance_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_commands.20", + { + "name": "accepted_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_commands.21", + { + "name": "applied_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_commands.22", + { + "name": "rejected_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_commands.23", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_commands.24", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_commands.3", + { + "name": "workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_commands.4", + { + "name": "requested_workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_commands.5", + { + "name": "resolved_workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_commands.6", + { + "name": "command_type", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_commands.7", + { + "name": "target_scope", + "type": "character varying(255)", + "default": "'instance'::character varying", + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_commands.8", + { + "name": "source", + "type": "character varying(255)", + "default": "'php'::character varying", + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_commands.9", + { + "name": "context", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_durable_stream_items.1", + { + "name": "id", + "type": "bigint", + "default": "nextval('workflow_durable_stream_items_id_seq'::regclass)", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_durable_stream_items.10", + { + "name": "payload", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_durable_stream_items.11", + { + "name": "payload_reference", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_durable_stream_items.12", + { + "name": "payload_codec", + "type": "character varying(64)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_durable_stream_items.13", + { + "name": "item_type", + "type": "character varying(64)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_durable_stream_items.14", + { + "name": "content_type", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_durable_stream_items.15", + { + "name": "emitted_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_durable_stream_items.16", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_durable_stream_items.17", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_durable_stream_items.2", + { + "name": "stream_id", + "type": "bigint", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_durable_stream_items.3", + { + "name": "namespace", + "type": "character varying(128)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_durable_stream_items.4", + { + "name": "workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_durable_stream_items.5", + { + "name": "stream_name", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_durable_stream_items.6", + { + "name": "offset", + "type": "bigint", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_durable_stream_items.7", + { + "name": "idempotency_key", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_durable_stream_items.8", + { + "name": "origin", + "type": "character varying(64)", + "default": "'workflow_command'::character varying", + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_durable_stream_items.9", + { + "name": "origin_reference", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_durable_streams.1", + { + "name": "id", + "type": "bigint", + "default": "nextval('workflow_durable_streams_id_seq'::regclass)", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_durable_streams.10", + { + "name": "opened_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_durable_streams.11", + { + "name": "last_appended_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_durable_streams.12", + { + "name": "closed_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_durable_streams.13", + { + "name": "error_reason", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_durable_streams.14", + { + "name": "pending_items", + "type": "bigint", + "default": "'0'::bigint", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_durable_streams.15", + { + "name": "metadata", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_durable_streams.16", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_durable_streams.17", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_durable_streams.2", + { + "name": "namespace", + "type": "character varying(128)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_durable_streams.3", + { + "name": "workflow_instance_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_durable_streams.4", + { + "name": "workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_durable_streams.5", + { + "name": "stream_name", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_durable_streams.6", + { + "name": "status", + "type": "character varying(16)", + "default": "'open'::character varying", + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_durable_streams.7", + { + "name": "last_offset", + "type": "bigint", + "default": "'-1'::bigint", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_durable_streams.8", + { + "name": "total_items", + "type": "bigint", + "default": "'0'::bigint", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_durable_streams.9", + { + "name": "retention_seconds", + "type": "integer", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_failures.1", + { + "name": "id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_failures.10", + { + "name": "message", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_failures.11", + { + "name": "file", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_failures.12", + { + "name": "line", + "type": "integer", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_failures.13", + { + "name": "trace_preview", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_failures.14", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_failures.15", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_failures.2", + { + "name": "workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_failures.3", + { + "name": "source_kind", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_failures.4", + { + "name": "source_id", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_failures.5", + { + "name": "propagation_kind", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_failures.6", + { + "name": "failure_category", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_failures.7", + { + "name": "non_retryable", + "type": "boolean", + "default": "false", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_failures.8", + { + "name": "handled", + "type": "boolean", + "default": "false", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_failures.9", + { + "name": "exception_class", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_history_events.1", + { + "name": "id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_history_events.10", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_history_events.11", + { + "name": "recorded_at_utc", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_history_events.2", + { + "name": "workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_history_events.3", + { + "name": "sequence", + "type": "integer", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_history_events.4", + { + "name": "event_type", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_history_events.5", + { + "name": "payload", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_history_events.6", + { + "name": "workflow_task_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_history_events.7", + { + "name": "workflow_command_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_history_events.8", + { + "name": "recorded_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_history_events.9", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_inbound_stream_items.1", + { + "name": "id", + "type": "bigint", + "default": "nextval('workflow_inbound_stream_items_id_seq'::regclass)", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_inbound_stream_items.10", + { + "name": "payload_hash", + "type": "character varying(64)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_inbound_stream_items.11", + { + "name": "delivered_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_inbound_stream_items.12", + { + "name": "workflow_command_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_inbound_stream_items.13", + { + "name": "delivered_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_inbound_stream_items.14", + { + "name": "consumed_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_inbound_stream_items.15", + { + "name": "consumed_task_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_inbound_stream_items.16", + { + "name": "consumed_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_inbound_stream_items.17", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_inbound_stream_items.18", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_inbound_stream_items.19", + { + "name": "payload_released_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_inbound_stream_items.2", + { + "name": "stream_id", + "type": "bigint", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_inbound_stream_items.3", + { + "name": "namespace", + "type": "character varying(128)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_inbound_stream_items.4", + { + "name": "workflow_instance_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_inbound_stream_items.5", + { + "name": "stream_name", + "type": "character varying(128)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_inbound_stream_items.6", + { + "name": "message_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_inbound_stream_items.7", + { + "name": "position", + "type": "bigint", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_inbound_stream_items.8", + { + "name": "payload_codec", + "type": "character varying(32)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_inbound_stream_items.9", + { + "name": "payload_blob", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_inbound_streams.1", + { + "name": "id", + "type": "bigint", + "default": "nextval('workflow_inbound_streams_id_seq'::regclass)", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_inbound_streams.10", + { + "name": "waiting_since", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_inbound_streams.11", + { + "name": "duplicate_count", + "type": "bigint", + "default": "'0'::bigint", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_inbound_streams.12", + { + "name": "malformed_count", + "type": "bigint", + "default": "'0'::bigint", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_inbound_streams.13", + { + "name": "last_input_outcome", + "type": "character varying(64)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_inbound_streams.14", + { + "name": "last_input_message_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_inbound_streams.15", + { + "name": "last_input_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_inbound_streams.16", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_inbound_streams.17", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_inbound_streams.18", + { + "name": "cleanup_blocked_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_inbound_streams.19", + { + "name": "cleanup_blocked_reason", + "type": "character varying(64)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_inbound_streams.2", + { + "name": "namespace", + "type": "character varying(128)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_inbound_streams.20", + { + "name": "cleanup_blocked_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_inbound_streams.3", + { + "name": "workflow_instance_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_inbound_streams.4", + { + "name": "stream_name", + "type": "character varying(128)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_inbound_streams.5", + { + "name": "last_position", + "type": "bigint", + "default": "'0'::bigint", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_inbound_streams.6", + { + "name": "cursor_position", + "type": "bigint", + "default": "'0'::bigint", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_inbound_streams.7", + { + "name": "cursor_checkpoint_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_inbound_streams.8", + { + "name": "waiting_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_inbound_streams.9", + { + "name": "waiting_after_position", + "type": "bigint", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_instances.1", + { + "name": "id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_instances.10", + { + "name": "run_count", + "type": "integer", + "default": "0", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_instances.11", + { + "name": "last_message_sequence", + "type": "integer", + "default": "0", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_instances.12", + { + "name": "reserved_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_instances.13", + { + "name": "started_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_instances.14", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_instances.15", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_instances.2", + { + "name": "workflow_class", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_instances.3", + { + "name": "workflow_type", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_instances.4", + { + "name": "namespace", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_instances.5", + { + "name": "business_key", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_instances.6", + { + "name": "visibility_labels", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_instances.7", + { + "name": "memo", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_instances.8", + { + "name": "execution_timeout_seconds", + "type": "integer", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_instances.9", + { + "name": "current_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_links.1", + { + "name": "id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_links.10", + { + "name": "parent_close_policy", + "type": "character varying(255)", + "default": "'abandon'::character varying", + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_links.11", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_links.12", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_links.2", + { + "name": "link_type", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_links.3", + { + "name": "sequence", + "type": "integer", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_links.4", + { + "name": "parallel_group_path", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_links.5", + { + "name": "parent_workflow_instance_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_links.6", + { + "name": "parent_workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_links.7", + { + "name": "child_workflow_instance_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_links.8", + { + "name": "child_workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_links.9", + { + "name": "is_primary_parent", + "type": "boolean", + "default": "false", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_memos.1", + { + "name": "id", + "type": "bigint", + "default": "nextval('workflow_memos_id_seq'::regclass)", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_memos.10", + { + "name": "portable_value", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_memos.11", + { + "name": "portable_value_sequence", + "type": "integer", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_memos.2", + { + "name": "workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_memos.3", + { + "name": "workflow_instance_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_memos.4", + { + "name": "key", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_memos.5", + { + "name": "value", + "type": "json", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_memos.6", + { + "name": "upserted_at_sequence", + "type": "integer", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_memos.7", + { + "name": "inherited_from_parent", + "type": "boolean", + "default": "false", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_memos.8", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_memos.9", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_messages.1", + { + "name": "id", + "type": "bigint", + "default": "nextval('workflow_messages_id_seq'::regclass)", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_messages.10", + { + "name": "target_workflow_instance_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_messages.11", + { + "name": "target_workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_messages.12", + { + "name": "correlation_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_messages.13", + { + "name": "idempotency_key", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_messages.14", + { + "name": "payload_reference", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_messages.15", + { + "name": "consume_state", + "type": "character varying(16)", + "default": "'pending'::character varying", + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_messages.16", + { + "name": "consumed_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_messages.17", + { + "name": "consumed_by_sequence", + "type": "integer", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_messages.18", + { + "name": "expires_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_messages.19", + { + "name": "delivery_attempt_count", + "type": "integer", + "default": "0", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_messages.2", + { + "name": "workflow_instance_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_messages.20", + { + "name": "last_delivery_attempt_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_messages.21", + { + "name": "last_delivery_error", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_messages.22", + { + "name": "metadata", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_messages.23", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_messages.24", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_messages.3", + { + "name": "workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_messages.4", + { + "name": "direction", + "type": "character varying(16)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_messages.5", + { + "name": "channel", + "type": "character varying(64)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_messages.6", + { + "name": "stream_key", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_messages.7", + { + "name": "sequence", + "type": "bigint", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_messages.8", + { + "name": "source_workflow_instance_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_messages.9", + { + "name": "source_workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_namespaces.1", + { + "name": "id", + "type": "bigint", + "default": "nextval('workflow_namespaces_id_seq'::regclass)", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_namespaces.2", + { + "name": "name", + "type": "character varying(128)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_namespaces.3", + { + "name": "description", + "type": "character varying(1000)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_namespaces.4", + { + "name": "retention_days", + "type": "integer", + "default": "30", + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_namespaces.5", + { + "name": "status", + "type": "character varying(32)", + "default": "'active'::character varying", + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_namespaces.6", + { + "name": "created_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_namespaces.7", + { + "name": "updated_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_namespaces.8", + { + "name": "external_payload_storage", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_namespaces.9", + { + "name": "retention_mode", + "type": "character varying(32)", + "default": "'bounded'::character varying", + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_lineage_entries.1", + { + "name": "id", + "type": "character varying(64)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_lineage_entries.10", + { + "name": "is_primary_parent", + "type": "boolean", + "default": "false", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_lineage_entries.11", + { + "name": "related_workflow_instance_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_lineage_entries.12", + { + "name": "related_workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_lineage_entries.13", + { + "name": "related_run_number", + "type": "integer", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_lineage_entries.14", + { + "name": "related_workflow_type", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_lineage_entries.15", + { + "name": "related_workflow_class", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_lineage_entries.16", + { + "name": "status", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_lineage_entries.17", + { + "name": "status_bucket", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_lineage_entries.18", + { + "name": "closed_reason", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_lineage_entries.19", + { + "name": "linked_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_lineage_entries.2", + { + "name": "workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_lineage_entries.20", + { + "name": "payload", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_lineage_entries.21", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_lineage_entries.22", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_lineage_entries.3", + { + "name": "workflow_instance_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_lineage_entries.4", + { + "name": "direction", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_lineage_entries.5", + { + "name": "lineage_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_lineage_entries.6", + { + "name": "position", + "type": "integer", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_lineage_entries.7", + { + "name": "link_type", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_lineage_entries.8", + { + "name": "child_call_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_lineage_entries.9", + { + "name": "sequence", + "type": "integer", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.1", + { + "name": "id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.10", + { + "name": "compatibility", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.11", + { + "name": "declared_entry_mode", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.12", + { + "name": "declared_contract_source", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.13", + { + "name": "business_key", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.14", + { + "name": "visibility_labels", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.15", + { + "name": "status", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.16", + { + "name": "status_bucket", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.17", + { + "name": "closed_reason", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.18", + { + "name": "connection", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.19", + { + "name": "queue", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.2", + { + "name": "workflow_instance_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.20", + { + "name": "started_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.21", + { + "name": "sort_timestamp", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.22", + { + "name": "sort_key", + "type": "character varying(64)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.23", + { + "name": "closed_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.24", + { + "name": "archived_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.25", + { + "name": "archive_command_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.26", + { + "name": "archive_reason", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.27", + { + "name": "duration_ms", + "type": "bigint", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.28", + { + "name": "wait_kind", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.29", + { + "name": "wait_reason", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.3", + { + "name": "run_number", + "type": "integer", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.30", + { + "name": "wait_started_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.31", + { + "name": "wait_deadline_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.32", + { + "name": "open_wait_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.33", + { + "name": "resume_source_kind", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.34", + { + "name": "resume_source_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.35", + { + "name": "next_task_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.36", + { + "name": "liveness_state", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.37", + { + "name": "liveness_reason", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.38", + { + "name": "repair_blocked_reason", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.39", + { + "name": "repair_attention", + "type": "boolean", + "default": "false", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.4", + { + "name": "is_current_run", + "type": "boolean", + "default": "false", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.40", + { + "name": "task_problem", + "type": "boolean", + "default": "false", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.41", + { + "name": "next_task_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.42", + { + "name": "next_task_type", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.43", + { + "name": "next_task_status", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.44", + { + "name": "next_task_lease_expires_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.45", + { + "name": "exception_count", + "type": "integer", + "default": "0", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.46", + { + "name": "history_event_count", + "type": "integer", + "default": "0", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.47", + { + "name": "history_size_bytes", + "type": "bigint", + "default": "'0'::bigint", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.48", + { + "name": "continue_as_new_recommended", + "type": "boolean", + "default": "false", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.49", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.5", + { + "name": "engine_source", + "type": "character varying(255)", + "default": "'v2'::character varying", + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.50", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.51", + { + "name": "history_fan_out", + "type": "integer", + "default": "0", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.52", + { + "name": "history_budget_pressure", + "type": "character varying(32)", + "default": "'ok'::character varying", + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.6", + { + "name": "projection_schema_version", + "type": "smallint", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.7", + { + "name": "class", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.8", + { + "name": "workflow_type", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_summaries.9", + { + "name": "namespace", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timeline_entries.1", + { + "name": "id", + "type": "character varying(64)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timeline_entries.10", + { + "name": "source_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timeline_entries.11", + { + "name": "summary", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timeline_entries.12", + { + "name": "recorded_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_timeline_entries.13", + { + "name": "command_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timeline_entries.14", + { + "name": "command_sequence", + "type": "integer", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_timeline_entries.15", + { + "name": "task_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timeline_entries.16", + { + "name": "activity_execution_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timeline_entries.17", + { + "name": "timer_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timeline_entries.18", + { + "name": "failure_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timeline_entries.19", + { + "name": "payload", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_timeline_entries.2", + { + "name": "workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timeline_entries.20", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_timeline_entries.21", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_timeline_entries.3", + { + "name": "workflow_instance_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timeline_entries.4", + { + "name": "history_event_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timeline_entries.5", + { + "name": "sequence", + "type": "integer", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_timeline_entries.6", + { + "name": "type", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timeline_entries.7", + { + "name": "kind", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timeline_entries.8", + { + "name": "entry_kind", + "type": "character varying(255)", + "default": "'point'::character varying", + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timeline_entries.9", + { + "name": "source_kind", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timer_entries.1", + { + "name": "id", + "type": "character varying(64)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timer_entries.10", + { + "name": "delay_seconds", + "type": "integer", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_timer_entries.11", + { + "name": "fire_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_timer_entries.12", + { + "name": "fired_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_timer_entries.13", + { + "name": "cancelled_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_timer_entries.14", + { + "name": "timer_kind", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timer_entries.15", + { + "name": "condition_wait_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timer_entries.16", + { + "name": "condition_key", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timer_entries.17", + { + "name": "condition_definition_fingerprint", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timer_entries.18", + { + "name": "history_authority", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timer_entries.19", + { + "name": "history_unsupported_reason", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timer_entries.2", + { + "name": "workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timer_entries.20", + { + "name": "payload", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_timer_entries.21", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_timer_entries.22", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_timer_entries.3", + { + "name": "workflow_instance_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timer_entries.4", + { + "name": "timer_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timer_entries.5", + { + "name": "schema_version", + "type": "smallint", + "default": "'1'::smallint", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_timer_entries.6", + { + "name": "position", + "type": "integer", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_timer_entries.7", + { + "name": "sequence", + "type": "integer", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_timer_entries.8", + { + "name": "status", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timer_entries.9", + { + "name": "source_status", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timers.1", + { + "name": "id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timers.2", + { + "name": "workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timers.3", + { + "name": "sequence", + "type": "integer", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_timers.4", + { + "name": "status", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_timers.5", + { + "name": "delay_seconds", + "type": "bigint", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_timers.6", + { + "name": "fire_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_timers.7", + { + "name": "fired_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_timers.8", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_timers.9", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.1", + { + "name": "id", + "type": "character varying(64)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.10", + { + "name": "summary", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.11", + { + "name": "opened_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.12", + { + "name": "deadline_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.13", + { + "name": "resolved_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.14", + { + "name": "target_name", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.15", + { + "name": "target_type", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.16", + { + "name": "task_backed", + "type": "boolean", + "default": "false", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.17", + { + "name": "external_only", + "type": "boolean", + "default": "false", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.18", + { + "name": "resume_source_kind", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.19", + { + "name": "resume_source_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.2", + { + "name": "workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.20", + { + "name": "task_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.21", + { + "name": "task_type", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.22", + { + "name": "task_status", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.23", + { + "name": "command_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.24", + { + "name": "command_sequence", + "type": "integer", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.25", + { + "name": "command_status", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.26", + { + "name": "command_outcome", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.27", + { + "name": "history_authority", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.28", + { + "name": "history_unsupported_reason", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.29", + { + "name": "payload", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.3", + { + "name": "workflow_instance_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.30", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.31", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.4", + { + "name": "wait_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.5", + { + "name": "position", + "type": "integer", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.6", + { + "name": "kind", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.7", + { + "name": "sequence", + "type": "integer", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.8", + { + "name": "status", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_run_waits.9", + { + "name": "source_status", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_runs.1", + { + "name": "id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_runs.10", + { + "name": "closed_reason", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_runs.11", + { + "name": "compatibility", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_runs.12", + { + "name": "payload_codec", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_runs.13", + { + "name": "arguments", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_runs.14", + { + "name": "output", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_runs.15", + { + "name": "output_payload_codec", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_runs.16", + { + "name": "connection", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_runs.17", + { + "name": "queue", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_runs.18", + { + "name": "sticky_worker_id", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_runs.19", + { + "name": "sticky_until", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_runs.2", + { + "name": "workflow_instance_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_runs.20", + { + "name": "last_history_sequence", + "type": "integer", + "default": "0", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_runs.21", + { + "name": "last_command_sequence", + "type": "integer", + "default": "0", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_runs.22", + { + "name": "message_cursor_position", + "type": "integer", + "default": "0", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_runs.23", + { + "name": "run_timeout_seconds", + "type": "integer", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_runs.24", + { + "name": "execution_deadline_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_runs.25", + { + "name": "run_deadline_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_runs.26", + { + "name": "started_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_runs.27", + { + "name": "closed_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_runs.28", + { + "name": "archived_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_runs.29", + { + "name": "archive_command_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_runs.3", + { + "name": "run_number", + "type": "integer", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_runs.30", + { + "name": "archive_reason", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_runs.31", + { + "name": "last_progress_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_runs.32", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_runs.33", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_runs.34", + { + "name": "import_source", + "type": "character varying(64)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_runs.35", + { + "name": "import_id", + "type": "character varying(64)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_runs.36", + { + "name": "import_dedupe_key", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_runs.37", + { + "name": "import_contract_version", + "type": "smallint", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_runs.38", + { + "name": "imported_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_runs.39", + { + "name": "priority", + "type": "smallint", + "default": "'5'::smallint", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_runs.4", + { + "name": "workflow_class", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_runs.40", + { + "name": "fairness_key", + "type": "character varying(64)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_runs.41", + { + "name": "fairness_weight", + "type": "smallint", + "default": "'1'::smallint", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_runs.42", + { + "name": "cancellation_request_command_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_runs.43", + { + "name": "cancellation_requested_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_runs.44", + { + "name": "cancellation_deadline_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_runs.45", + { + "name": "cancellation_delivery_sequence", + "type": "integer", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_runs.46", + { + "name": "cancellation_delivered_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_runs.47", + { + "name": "details_pruned_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_runs.48", + { + "name": "cancellation_scope_recovery_until", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_runs.5", + { + "name": "workflow_type", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_runs.6", + { + "name": "namespace", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_runs.7", + { + "name": "business_key", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_runs.8", + { + "name": "visibility_labels", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_runs.9", + { + "name": "status", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_schedule_history_events.1", + { + "name": "id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_schedule_history_events.10", + { + "name": "recorded_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_schedule_history_events.11", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_schedule_history_events.12", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_schedule_history_events.13", + { + "name": "occurrence_at_utc", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_schedule_history_events.2", + { + "name": "workflow_schedule_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_schedule_history_events.3", + { + "name": "schedule_id", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_schedule_history_events.4", + { + "name": "namespace", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_schedule_history_events.5", + { + "name": "sequence", + "type": "integer", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_schedule_history_events.6", + { + "name": "event_type", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_schedule_history_events.7", + { + "name": "payload", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_schedule_history_events.8", + { + "name": "workflow_instance_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_schedule_history_events.9", + { + "name": "workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_schedules.1", + { + "name": "id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_schedules.10", + { + "name": "search_attributes", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_schedules.11", + { + "name": "visibility_labels", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_schedules.12", + { + "name": "jitter_seconds", + "type": "integer", + "default": "0", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_schedules.13", + { + "name": "max_runs", + "type": "bigint", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_schedules.14", + { + "name": "remaining_actions", + "type": "bigint", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_schedules.15", + { + "name": "fires_count", + "type": "bigint", + "default": "'0'::bigint", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_schedules.16", + { + "name": "failures_count", + "type": "bigint", + "default": "'0'::bigint", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_schedules.17", + { + "name": "recent_actions", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_schedules.18", + { + "name": "buffered_actions", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_schedules.19", + { + "name": "last_fired_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_schedules.2", + { + "name": "schedule_id", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_schedules.20", + { + "name": "next_fire_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_schedules.21", + { + "name": "latest_workflow_instance_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_schedules.22", + { + "name": "connection", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_schedules.23", + { + "name": "queue", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_schedules.24", + { + "name": "paused_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_schedules.25", + { + "name": "deleted_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_schedules.26", + { + "name": "last_skip_reason", + "type": "character varying(64)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_schedules.27", + { + "name": "last_skipped_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_schedules.28", + { + "name": "skipped_trigger_count", + "type": "bigint", + "default": "'0'::bigint", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_schedules.29", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_schedules.3", + { + "name": "namespace", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_schedules.30", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_schedules.31", + { + "name": "dispatch_summary", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_schedules.4", + { + "name": "spec", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_schedules.5", + { + "name": "action", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_schedules.6", + { + "name": "status", + "type": "character varying(16)", + "default": "'active'::character varying", + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_schedules.7", + { + "name": "overlap_policy", + "type": "character varying(32)", + "default": "'skip'::character varying", + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_schedules.8", + { + "name": "note", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_schedules.9", + { + "name": "memo", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_search_attributes.1", + { + "name": "id", + "type": "bigint", + "default": "nextval('workflow_search_attributes_id_seq'::regclass)", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_search_attributes.10", + { + "name": "value_bool", + "type": "boolean", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_search_attributes.11", + { + "name": "value_datetime", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_search_attributes.12", + { + "name": "upserted_at_sequence", + "type": "integer", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_search_attributes.13", + { + "name": "inherited_from_parent", + "type": "boolean", + "default": "false", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_search_attributes.14", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_search_attributes.15", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_search_attributes.16", + { + "name": "value_keyword_list", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_search_attributes.2", + { + "name": "workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_search_attributes.3", + { + "name": "workflow_instance_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_search_attributes.4", + { + "name": "key", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_search_attributes.5", + { + "name": "type", + "type": "character varying(16)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_search_attributes.6", + { + "name": "value_string", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_search_attributes.7", + { + "name": "value_keyword", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_search_attributes.8", + { + "name": "value_int", + "type": "bigint", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_search_attributes.9", + { + "name": "value_float", + "type": "double precision", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.1", + { + "name": "id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.10", + { + "name": "caller_workflow_instance_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.11", + { + "name": "caller_workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.12", + { + "name": "target_namespace", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.13", + { + "name": "linked_workflow_instance_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.14", + { + "name": "linked_workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.15", + { + "name": "linked_workflow_update_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.16", + { + "name": "status", + "type": "character varying(32)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.17", + { + "name": "outcome", + "type": "character varying(64)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.18", + { + "name": "operation_mode", + "type": "character varying(32)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.19", + { + "name": "resolved_binding_kind", + "type": "character varying(64)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.2", + { + "name": "workflow_service_endpoint_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.20", + { + "name": "resolved_target_reference", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.21", + { + "name": "payload_codec", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.22", + { + "name": "input_payload_reference", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.23", + { + "name": "output_payload_reference", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.24", + { + "name": "failure_payload_reference", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.25", + { + "name": "failure_message", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.26", + { + "name": "idempotency_key", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.27", + { + "name": "deadline_policy", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.28", + { + "name": "idempotency_policy", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.29", + { + "name": "cancellation_policy", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.3", + { + "name": "workflow_service_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.30", + { + "name": "retry_policy", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.31", + { + "name": "boundary_policy", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.32", + { + "name": "metadata", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.33", + { + "name": "outcome_category", + "type": "character varying(32)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.34", + { + "name": "outcome_reason", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.35", + { + "name": "outcome_message", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.36", + { + "name": "outcome_metadata", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.37", + { + "name": "policy_name", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.38", + { + "name": "retry_after_seconds", + "type": "integer", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.39", + { + "name": "caller_principal_subject", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.4", + { + "name": "workflow_service_operation_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.40", + { + "name": "caller_principal_method", + "type": "character varying(64)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.41", + { + "name": "caller_principal_roles", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.42", + { + "name": "caller_principal_tenant", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.43", + { + "name": "caller_principal_claims", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.44", + { + "name": "accepted_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.45", + { + "name": "started_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.46", + { + "name": "completed_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.47", + { + "name": "failed_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.48", + { + "name": "cancelled_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.49", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.5", + { + "name": "namespace", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.50", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.6", + { + "name": "endpoint_name", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.7", + { + "name": "service_name", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.8", + { + "name": "operation_name", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_calls.9", + { + "name": "caller_namespace", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_endpoints.1", + { + "name": "id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_endpoints.2", + { + "name": "namespace", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_endpoints.3", + { + "name": "endpoint_name", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_endpoints.4", + { + "name": "description", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_endpoints.5", + { + "name": "boundary_policy", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_endpoints.6", + { + "name": "metadata", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_endpoints.7", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_endpoints.8", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_operations.1", + { + "name": "id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_operations.10", + { + "name": "handler_binding", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_operations.11", + { + "name": "deadline_policy", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_operations.12", + { + "name": "idempotency_policy", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_operations.13", + { + "name": "cancellation_policy", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_operations.14", + { + "name": "retry_policy", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_operations.15", + { + "name": "boundary_policy", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_operations.16", + { + "name": "metadata", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_operations.17", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_operations.18", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_service_operations.2", + { + "name": "workflow_service_endpoint_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_operations.3", + { + "name": "workflow_service_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_operations.4", + { + "name": "namespace", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_operations.5", + { + "name": "operation_name", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_operations.6", + { + "name": "description", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_operations.7", + { + "name": "operation_mode", + "type": "character varying(32)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_operations.8", + { + "name": "handler_binding_kind", + "type": "character varying(64)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_service_operations.9", + { + "name": "handler_target_reference", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_services.1", + { + "name": "id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_services.2", + { + "name": "workflow_service_endpoint_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_services.3", + { + "name": "namespace", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_services.4", + { + "name": "service_name", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_services.5", + { + "name": "description", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_services.6", + { + "name": "boundary_policy", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_services.7", + { + "name": "metadata", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_services.8", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_services.9", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_signal_records.1", + { + "name": "id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_signal_records.10", + { + "name": "status", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_signal_records.11", + { + "name": "outcome", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_signal_records.12", + { + "name": "command_sequence", + "type": "integer", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_signal_records.13", + { + "name": "workflow_sequence", + "type": "integer", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_signal_records.14", + { + "name": "payload_codec", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_signal_records.15", + { + "name": "arguments", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_signal_records.16", + { + "name": "validation_errors", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_signal_records.17", + { + "name": "rejection_reason", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_signal_records.18", + { + "name": "received_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_signal_records.19", + { + "name": "applied_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_signal_records.2", + { + "name": "workflow_command_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_signal_records.20", + { + "name": "rejected_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_signal_records.21", + { + "name": "closed_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_signal_records.22", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_signal_records.23", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_signal_records.3", + { + "name": "workflow_instance_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_signal_records.4", + { + "name": "workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_signal_records.5", + { + "name": "target_scope", + "type": "character varying(255)", + "default": "'instance'::character varying", + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_signal_records.6", + { + "name": "requested_workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_signal_records.7", + { + "name": "resolved_workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_signal_records.8", + { + "name": "signal_name", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_signal_records.9", + { + "name": "signal_wait_id", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_task_poll_cursors.1", + { + "name": "namespace", + "type": "character varying(128)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_task_poll_cursors.2", + { + "name": "task_queue", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_task_poll_cursors.3", + { + "name": "next_task_kind", + "type": "character varying(32)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_task_poll_cursors.4", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_task_poll_cursors.5", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_tasks.1", + { + "name": "id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_tasks.10", + { + "name": "sticky_worker_id", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_tasks.11", + { + "name": "sticky_until", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_tasks.12", + { + "name": "sticky_replay_mode", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_tasks.13", + { + "name": "sticky_claimed_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_tasks.14", + { + "name": "available_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_tasks.15", + { + "name": "leased_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_tasks.16", + { + "name": "lease_owner", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_tasks.17", + { + "name": "lease_expires_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_tasks.18", + { + "name": "attempt_count", + "type": "integer", + "default": "0", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_tasks.19", + { + "name": "last_dispatch_attempt_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_tasks.2", + { + "name": "workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_tasks.20", + { + "name": "last_dispatched_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_tasks.21", + { + "name": "last_dispatch_error", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_tasks.22", + { + "name": "last_claim_failed_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_tasks.23", + { + "name": "last_claim_error", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_tasks.24", + { + "name": "repair_count", + "type": "integer", + "default": "0", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_tasks.25", + { + "name": "repair_available_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_tasks.26", + { + "name": "last_error", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_tasks.27", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_tasks.28", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_tasks.29", + { + "name": "priority", + "type": "smallint", + "default": "'5'::smallint", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_tasks.3", + { + "name": "namespace", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_tasks.30", + { + "name": "fairness_key", + "type": "character varying(64)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_tasks.31", + { + "name": "fairness_weight", + "type": "smallint", + "default": "'1'::smallint", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_tasks.4", + { + "name": "task_type", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_tasks.5", + { + "name": "status", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_tasks.6", + { + "name": "compatibility", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_tasks.7", + { + "name": "payload", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_tasks.8", + { + "name": "connection", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_tasks.9", + { + "name": "queue", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_tasks.ready_origin_at", + { + "name": "ready_origin_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.1", + { + "name": "id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.10", + { + "name": "update_name", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.11", + { + "name": "request_id", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.12", + { + "name": "input_hash", + "type": "character varying(64)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.13", + { + "name": "payload_codec", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.14", + { + "name": "arguments", + "type": "text", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.15", + { + "name": "command_context", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.16", + { + "name": "status", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.17", + { + "name": "attempt_count", + "type": "integer", + "default": "0", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.18", + { + "name": "lease_owner", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.19", + { + "name": "lease_expires_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.2", + { + "name": "idempotency_key", + "type": "character varying(64)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.20", + { + "name": "rejection_reason", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.21", + { + "name": "rejection_message", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.22", + { + "name": "failure_type", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.23", + { + "name": "validation_errors", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.24", + { + "name": "approved_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.25", + { + "name": "rejected_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.26", + { + "name": "failed_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.27", + { + "name": "timed_out_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.28", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.29", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.3", + { + "name": "namespace", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.4", + { + "name": "workflow_instance_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.5", + { + "name": "workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.6", + { + "name": "workflow_type", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.7", + { + "name": "task_queue", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.8", + { + "name": "compatibility", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_update_validation_tasks.9", + { + "name": "workflow_definition_fingerprint", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_updates.1", + { + "name": "id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_updates.10", + { + "name": "outcome", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_updates.11", + { + "name": "command_sequence", + "type": "integer", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_updates.12", + { + "name": "workflow_sequence", + "type": "integer", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_updates.13", + { + "name": "payload_codec", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_updates.14", + { + "name": "arguments", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_updates.15", + { + "name": "result", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_updates.16", + { + "name": "validation_errors", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_updates.17", + { + "name": "rejection_reason", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_updates.18", + { + "name": "failure_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_updates.19", + { + "name": "failure_message", + "type": "text", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_updates.2", + { + "name": "workflow_command_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_updates.20", + { + "name": "accepted_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_updates.21", + { + "name": "applied_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_updates.22", + { + "name": "rejected_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_updates.23", + { + "name": "closed_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_updates.24", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_updates.25", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_updates.3", + { + "name": "workflow_instance_id", + "type": "character varying(191)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_updates.4", + { + "name": "workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_updates.5", + { + "name": "target_scope", + "type": "character varying(255)", + "default": "'instance'::character varying", + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_updates.6", + { + "name": "requested_workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_updates.7", + { + "name": "resolved_workflow_run_id", + "type": "character varying(26)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_updates.8", + { + "name": "update_name", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_updates.9", + { + "name": "status", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_build_id_rollouts.1", + { + "name": "id", + "type": "bigint", + "default": "nextval('workflow_worker_build_id_rollouts_id_seq'::regclass)", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_build_id_rollouts.10", + { + "name": "rolled_back_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_build_id_rollouts.11", + { + "name": "required_compatibility", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_build_id_rollouts.12", + { + "name": "recorded_fingerprint", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_build_id_rollouts.13", + { + "name": "compatibility_policy", + "type": "character varying(32)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_build_id_rollouts.14", + { + "name": "workflow_types", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_build_id_rollouts.2", + { + "name": "namespace", + "type": "character varying(128)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_build_id_rollouts.3", + { + "name": "task_queue", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_build_id_rollouts.4", + { + "name": "build_id", + "type": "character varying(255)", + "default": "''::character varying", + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_build_id_rollouts.5", + { + "name": "drain_intent", + "type": "character varying(32)", + "default": "'active'::character varying", + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_build_id_rollouts.6", + { + "name": "drained_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_build_id_rollouts.7", + { + "name": "created_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_build_id_rollouts.8", + { + "name": "updated_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_build_id_rollouts.9", + { + "name": "promoted_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_compatibility_heartbeats.1", + { + "name": "id", + "type": "bigint", + "default": "nextval('workflow_worker_compatibility_heartbeats_id_seq'::regclass)", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_compatibility_heartbeats.10", + { + "name": "recorded_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_compatibility_heartbeats.11", + { + "name": "expires_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_compatibility_heartbeats.12", + { + "name": "created_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_compatibility_heartbeats.13", + { + "name": "updated_at", + "type": "timestamp(6) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_compatibility_heartbeats.2", + { + "name": "worker_id", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_compatibility_heartbeats.3", + { + "name": "scope_key", + "type": "character varying(64)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_compatibility_heartbeats.4", + { + "name": "namespace", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_compatibility_heartbeats.5", + { + "name": "host", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_compatibility_heartbeats.6", + { + "name": "process_id", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_compatibility_heartbeats.7", + { + "name": "connection", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_compatibility_heartbeats.8", + { + "name": "queue", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_compatibility_heartbeats.9", + { + "name": "supported", + "type": "json", + "default": null, + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_registrations.1", + { + "name": "id", + "type": "bigint", + "default": "nextval('workflow_worker_registrations_id_seq'::regclass)", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_registrations.10", + { + "name": "supported_activity_types", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_registrations.11", + { + "name": "max_concurrent_workflow_tasks", + "type": "integer", + "default": "100", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_registrations.12", + { + "name": "max_concurrent_activity_tasks", + "type": "integer", + "default": "100", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_registrations.13", + { + "name": "last_heartbeat_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_registrations.14", + { + "name": "status", + "type": "character varying(32)", + "default": "'active'::character varying", + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_registrations.15", + { + "name": "created_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_registrations.16", + { + "name": "updated_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_registrations.17", + { + "name": "capabilities", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_registrations.18", + { + "name": "max_concurrent_worker_sessions", + "type": "integer", + "default": "10", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_registrations.19", + { + "name": "available_workflow_slots", + "type": "integer", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_registrations.2", + { + "name": "worker_id", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_registrations.20", + { + "name": "available_activity_slots", + "type": "integer", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_registrations.21", + { + "name": "available_session_slots", + "type": "integer", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_registrations.22", + { + "name": "process_metrics", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_registrations.23", + { + "name": "heartbeat_interval_seconds", + "type": "integer", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_registrations.24", + { + "name": "workflow_command_contracts", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_registrations.25", + { + "name": "capability_manifest", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_registrations.3", + { + "name": "namespace", + "type": "character varying(128)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_registrations.4", + { + "name": "task_queue", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_registrations.5", + { + "name": "runtime", + "type": "character varying(32)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_registrations.6", + { + "name": "sdk_version", + "type": "character varying(64)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_registrations.7", + { + "name": "build_id", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_registrations.8", + { + "name": "supported_workflow_types", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_registrations.9", + { + "name": "workflow_definition_fingerprints", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_sessions.1", + { + "name": "id", + "type": "bigint", + "default": "nextval('workflow_worker_sessions_id_seq'::regclass)", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_sessions.10", + { + "name": "ttl_expires_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_sessions.11", + { + "name": "closed_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_sessions.12", + { + "name": "failure_reason", + "type": "character varying(128)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_sessions.13", + { + "name": "lease_seconds", + "type": "integer", + "default": "120", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_sessions.14", + { + "name": "ttl_seconds", + "type": "integer", + "default": "1800", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_sessions.15", + { + "name": "max_concurrent_activities", + "type": "integer", + "default": "1", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_sessions.16", + { + "name": "create_if_missing", + "type": "boolean", + "default": "true", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_sessions.17", + { + "name": "allow_reacquire_after_failure", + "type": "boolean", + "default": "true", + "identity": "", + "not_null": true, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_sessions.18", + { + "name": "last_heartbeat_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_sessions.19", + { + "name": "created_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_sessions.2", + { + "name": "namespace", + "type": "character varying(128)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_sessions.20", + { + "name": "updated_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_sessions.3", + { + "name": "session_id", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_sessions.4", + { + "name": "connection", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_sessions.5", + { + "name": "queue", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_sessions.6", + { + "name": "requirements", + "type": "json", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "column", + "workflow_worker_sessions.7", + { + "name": "status", + "type": "character varying(32)", + "default": "'active'::character varying", + "identity": "", + "not_null": true, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_sessions.8", + { + "name": "lease_owner", + "type": "character varying(255)", + "default": null, + "identity": "", + "not_null": false, + "collation": "default", + "generated": "" + } + ], + [ + "column", + "workflow_worker_sessions.9", + { + "name": "lease_expires_at", + "type": "timestamp(0) without time zone", + "default": null, + "identity": "", + "not_null": false, + "collation": null, + "generated": "" + } + ], + [ + "constraint", + "_sqlx_migrations._sqlx_migrations_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (version)" + } + ], + [ + "constraint", + "activity_attempts.activity_attempts_activity_execution_id_attempt_number_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (activity_execution_id, attempt_number)" + } + ], + [ + "constraint", + "activity_attempts.activity_attempts_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "activity_executions.activity_executions_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "activity_executions.activity_executions_workflow_run_id_sequence_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (workflow_run_id, sequence)" + } + ], + [ + "constraint", + "dw_command_intents.dw_command_intents_pkey", + { + "deferrable": false, + "deferred": false, + "definition": "PRIMARY KEY (command_id)", + "validated": true + } + ], + [ + "constraint", + "dw_external_payload_deletions.dw_external_payload_deletions_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "dw_poll_receipts.dw_poll_receipts_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (namespace, worker_id, kind, request_id)" + } + ], + [ + "constraint", + "dw_poll_receipts.dw_poll_receipts_task_id_fkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "FOREIGN KEY (task_id) REFERENCES workflow_tasks(id) ON DELETE CASCADE" + } + ], + [ + "constraint", + "dw_query_cache.dw_query_cache_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (key)" + } + ], + [ + "constraint", + "dw_run_command_contracts.dw_run_command_contracts_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (workflow_run_id)" + } + ], + [ + "constraint", + "dw_service_admission_counters.dw_service_admission_counters_pkey", + { + "deferrable": false, + "deferred": false, + "definition": "PRIMARY KEY (cache_key)", + "validated": true + } + ], + [ + "constraint", + "dw_service_call_deadlines.dw_service_call_deadlines_pkey", + { + "deferrable": false, + "deferred": false, + "definition": "PRIMARY KEY (service_call_id)", + "validated": true + } + ], + [ + "constraint", + "dw_stream_reclaims.dw_stream_reclaims_pkey", + { + "deferrable": false, + "deferred": false, + "definition": "PRIMARY KEY (stream_id)", + "validated": true + } + ], + [ + "constraint", + "dw_task_completions.dw_task_completions_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (task_id)" + } + ], + [ + "constraint", + "dw_task_completions.dw_task_completions_task_id_fkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "FOREIGN KEY (task_id) REFERENCES workflow_tasks(id) ON DELETE CASCADE" + } + ], + [ + "constraint", + "dw_task_queue_pauses.dw_task_queue_pauses_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (namespace, task_queue)" + } + ], + [ + "constraint", + "dw_worker_registration_incarnations.dw_worker_incarnation_state", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "CHECK ((((status = 'active'::text) AND (finished_at IS NULL) AND (recovered_workflow_task_count IS NULL)) OR ((status = 'superseded'::text) AND (finished_at IS NOT NULL) AND (recovered_workflow_task_count IS NULL)) OR ((status = 'deregistered'::text) AND (finished_at IS NOT NULL) AND (recovered_workflow_task_count IS NOT NULL) AND (recovered_workflow_task_count >= 0))))" + } + ], + [ + "constraint", + "dw_worker_registration_incarnations.dw_worker_registration_incarnations_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (token)" + } + ], + [ + "constraint", + "dw_worker_session_holders.dw_worker_session_holders_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (namespace, session_id)" + } + ], + [ + "constraint", + "failed_jobs.failed_jobs_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "failed_jobs.failed_jobs_uuid_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (uuid)" + } + ], + [ + "constraint", + "jobs.jobs_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "migrations.migrations_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "runtime_credentials.runtime_credentials_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "runtime_credentials.runtime_credentials_token_hash_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (token_hash)" + } + ], + [ + "constraint", + "runtime_external_payload_backup_hold.runtime_external_payload_backup_hold_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "runtime_external_payload_cleanup_stats.runtime_external_payload_cleanup_stats_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (namespace)" + } + ], + [ + "constraint", + "runtime_external_payload_object_locks.runtime_external_payload_object_locks_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (bucket)" + } + ], + [ + "constraint", + "runtime_external_payloads.runtime_external_payloads_namespace_uri_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (namespace, storage_uri_sha256)" + } + ], + [ + "constraint", + "runtime_external_payloads.runtime_external_payloads_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "runtime_payload_completion_budgets.runtime_payload_completion_budgets_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "search_attribute_definitions.search_attribute_definitions_namespace_name_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (namespace, name)" + } + ], + [ + "constraint", + "search_attribute_definitions.search_attribute_definitions_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_child_calls.workflow_child_calls_parent_workflow_run_id_foreign", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "FOREIGN KEY (parent_workflow_run_id) REFERENCES workflow_runs(id) ON DELETE CASCADE" + } + ], + [ + "constraint", + "workflow_child_calls.workflow_child_calls_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_child_projection_repairs.workflow_child_projection_repairs_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (workflow_history_event_id)" + } + ], + [ + "constraint", + "workflow_commands.workflow_commands_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_commands.workflow_commands_request_lookup", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (workflow_instance_id, command_type, request_id)" + } + ], + [ + "constraint", + "workflow_durable_stream_items.wf_durable_stream_items_idempotency_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (stream_id, idempotency_key)" + } + ], + [ + "constraint", + "workflow_durable_stream_items.wf_durable_stream_items_stream_offset_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (stream_id, \"offset\")" + } + ], + [ + "constraint", + "workflow_durable_stream_items.workflow_durable_stream_items_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_durable_stream_items.workflow_durable_stream_items_stream_id_foreign", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "FOREIGN KEY (stream_id) REFERENCES workflow_durable_streams(id) ON DELETE CASCADE" + } + ], + [ + "constraint", + "workflow_durable_streams.wf_durable_streams_run_name_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (workflow_run_id, stream_name)" + } + ], + [ + "constraint", + "workflow_durable_streams.workflow_durable_streams_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_failures.workflow_failures_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_history_events.workflow_history_events_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_history_events.workflow_history_events_workflow_run_id_sequence_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (workflow_run_id, sequence)" + } + ], + [ + "constraint", + "workflow_inbound_stream_items.wf_inbound_items_stream_message_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (stream_id, message_id)" + } + ], + [ + "constraint", + "workflow_inbound_stream_items.wf_inbound_items_stream_position_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (stream_id, \"position\")" + } + ], + [ + "constraint", + "workflow_inbound_stream_items.workflow_inbound_stream_items_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_inbound_stream_items.workflow_inbound_stream_items_stream_id_foreign", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "FOREIGN KEY (stream_id) REFERENCES workflow_inbound_streams(id) ON DELETE CASCADE" + } + ], + [ + "constraint", + "workflow_inbound_streams.wf_inbound_streams_ns_instance_name_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (namespace, workflow_instance_id, stream_name)" + } + ], + [ + "constraint", + "workflow_inbound_streams.workflow_inbound_streams_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_instances.workflow_instances_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_links.workflow_links_parent_child_type_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (parent_workflow_run_id, child_workflow_run_id, link_type)" + } + ], + [ + "constraint", + "workflow_links.workflow_links_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_memos.workflow_memos_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_memos.workflow_memos_run_key_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (workflow_run_id, key)" + } + ], + [ + "constraint", + "workflow_memos.workflow_memos_workflow_run_id_foreign", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "FOREIGN KEY (workflow_run_id) REFERENCES workflow_runs(id) ON DELETE CASCADE" + } + ], + [ + "constraint", + "workflow_messages.wf_msgs_stream_seq_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (workflow_instance_id, stream_key, sequence)" + } + ], + [ + "constraint", + "workflow_messages.workflow_messages_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_messages.workflow_messages_workflow_run_id_foreign", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "FOREIGN KEY (workflow_run_id) REFERENCES workflow_runs(id) ON DELETE CASCADE" + } + ], + [ + "constraint", + "workflow_namespaces.workflow_namespaces_name_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (name)" + } + ], + [ + "constraint", + "workflow_namespaces.workflow_namespaces_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_run_lineage_entries.workflow_run_lineage_entries_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_run_lineage_entries.workflow_run_lineage_run_direction_lineage_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (workflow_run_id, direction, lineage_id)" + } + ], + [ + "constraint", + "workflow_run_summaries.workflow_run_summaries_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_run_timeline_entries.workflow_run_timeline_entries_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_run_timeline_entries.workflow_run_timeline_run_event_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (workflow_run_id, history_event_id)" + } + ], + [ + "constraint", + "workflow_run_timer_entries.workflow_run_timer_entries_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_run_timer_entries.workflow_run_timer_entries_run_timer_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (workflow_run_id, timer_id)" + } + ], + [ + "constraint", + "workflow_run_timers.workflow_run_timers_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_run_timers.workflow_run_timers_workflow_run_id_sequence_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (workflow_run_id, sequence)" + } + ], + [ + "constraint", + "workflow_run_waits.workflow_run_waits_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_run_waits.workflow_run_waits_run_wait_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (workflow_run_id, wait_id)" + } + ], + [ + "constraint", + "workflow_runs.workflow_runs_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_runs.workflow_runs_workflow_instance_id_run_number_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (workflow_instance_id, run_number)" + } + ], + [ + "constraint", + "workflow_schedule_history_events.wf_schedule_history_schedule_sequence_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (workflow_schedule_id, sequence)" + } + ], + [ + "constraint", + "workflow_schedule_history_events.workflow_schedule_history_events_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_schedules.workflow_schedules_namespace_schedule_id_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (namespace, schedule_id)" + } + ], + [ + "constraint", + "workflow_schedules.workflow_schedules_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_search_attributes.workflow_search_attributes_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_search_attributes.workflow_search_attributes_workflow_run_id_foreign", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "FOREIGN KEY (workflow_run_id) REFERENCES workflow_runs(id) ON DELETE CASCADE" + } + ], + [ + "constraint", + "workflow_search_attributes.workflow_search_attrs_run_key_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (workflow_run_id, key)" + } + ], + [ + "constraint", + "workflow_service_calls.workflow_service_calls_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_service_endpoints.wf_service_endpoints_namespace_name_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (namespace, endpoint_name)" + } + ], + [ + "constraint", + "workflow_service_endpoints.workflow_service_endpoints_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_service_operations.wf_service_ops_namespace_service_name_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (namespace, workflow_service_id, operation_name)" + } + ], + [ + "constraint", + "workflow_service_operations.workflow_service_operations_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_services.wf_services_namespace_endpoint_name_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (namespace, workflow_service_endpoint_id, service_name)" + } + ], + [ + "constraint", + "workflow_services.workflow_services_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_signal_records.workflow_signal_records_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_signal_records.workflow_signal_records_workflow_command_id_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (workflow_command_id)" + } + ], + [ + "constraint", + "workflow_task_poll_cursors.workflow_task_poll_cursors_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (namespace, task_queue)" + } + ], + [ + "constraint", + "workflow_tasks.workflow_tasks_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_update_validation_tasks.workflow_update_validation_tasks_idempotency_key_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (idempotency_key)" + } + ], + [ + "constraint", + "workflow_update_validation_tasks.workflow_update_validation_tasks_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_updates.workflow_updates_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_updates.workflow_updates_workflow_command_id_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (workflow_command_id)" + } + ], + [ + "constraint", + "workflow_worker_build_id_rollouts.workflow_build_id_rollouts_scope_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (namespace, task_queue, build_id)" + } + ], + [ + "constraint", + "workflow_worker_build_id_rollouts.workflow_worker_build_id_rollouts_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_worker_compatibility_heartbeats.workflow_worker_compatibility_heartbeats_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_worker_compatibility_heartbeats.workflow_worker_compatibility_heartbeats_scope_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (worker_id, scope_key)" + } + ], + [ + "constraint", + "workflow_worker_registrations.workflow_worker_registrations_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "constraint", + "workflow_worker_registrations.workflow_worker_registrations_worker_id_namespace_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (worker_id, namespace)" + } + ], + [ + "constraint", + "workflow_worker_sessions.workflow_worker_sessions_namespace_session_id_unique", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "UNIQUE (namespace, session_id)" + } + ], + [ + "constraint", + "workflow_worker_sessions.workflow_worker_sessions_pkey", + { + "deferred": false, + "validated": true, + "deferrable": false, + "definition": "PRIMARY KEY (id)" + } + ], + [ + "index", + "_sqlx_migrations_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX _sqlx_migrations_pkey ON public._sqlx_migrations USING btree (version)" + } + ], + [ + "index", + "activity_attempts_activity_execution_id_attempt_number_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX activity_attempts_activity_execution_id_attempt_number_unique ON public.activity_attempts USING btree (activity_execution_id, attempt_number)" + } + ], + [ + "index", + "activity_attempts_activity_execution_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX activity_attempts_activity_execution_id_index ON public.activity_attempts USING btree (activity_execution_id)" + } + ], + [ + "index", + "activity_attempts_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX activity_attempts_pkey ON public.activity_attempts USING btree (id)" + } + ], + [ + "index", + "activity_attempts_workflow_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX activity_attempts_workflow_run_id_index ON public.activity_attempts USING btree (workflow_run_id)" + } + ], + [ + "index", + "activity_attempts_workflow_task_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX activity_attempts_workflow_task_id_index ON public.activity_attempts USING btree (workflow_task_id)" + } + ], + [ + "index", + "activity_exec_prom_metrics_series_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX activity_exec_prom_metrics_series_idx ON public.activity_executions USING btree (workflow_run_id, queue, activity_type)" + } + ], + [ + "index", + "activity_executions_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX activity_executions_pkey ON public.activity_executions USING btree (id)" + } + ], + [ + "index", + "activity_executions_workflow_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX activity_executions_workflow_run_id_index ON public.activity_executions USING btree (workflow_run_id)" + } + ], + [ + "index", + "activity_executions_workflow_run_id_sequence_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX activity_executions_workflow_run_id_sequence_unique ON public.activity_executions USING btree (workflow_run_id, sequence)" + } + ], + [ + "index", + "child_calls_child_parent", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX child_calls_child_parent ON public.workflow_child_calls USING btree (resolved_child_instance_id, parent_workflow_run_id)" + } + ], + [ + "index", + "child_calls_parent_seq", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX child_calls_parent_seq ON public.workflow_child_calls USING btree (parent_workflow_run_id, sequence)" + } + ], + [ + "index", + "child_calls_parent_status", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX child_calls_parent_status ON public.workflow_child_calls USING btree (parent_workflow_run_id, status)" + } + ], + [ + "index", + "dw_command_intents_namespace", + { + "definition": "CREATE INDEX dw_command_intents_namespace ON public.dw_command_intents USING btree (namespace)", + "primary": false, + "ready": true, + "unique": false, + "valid": true + } + ], + [ + "index", + "dw_command_intents_pkey", + { + "definition": "CREATE UNIQUE INDEX dw_command_intents_pkey ON public.dw_command_intents USING btree (command_id)", + "primary": true, + "ready": true, + "unique": true, + "valid": true + } + ], + [ + "index", + "dw_external_payload_deletions_due", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX dw_external_payload_deletions_due ON public.dw_external_payload_deletions USING btree (namespace, updated_at, id)" + } + ], + [ + "index", + "dw_external_payload_deletions_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX dw_external_payload_deletions_pkey ON public.dw_external_payload_deletions USING btree (id)" + } + ], + [ + "index", + "dw_external_payload_deletions_uri", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX dw_external_payload_deletions_uri ON public.dw_external_payload_deletions USING btree (namespace, storage_uri_sha256)" + } + ], + [ + "index", + "dw_poll_receipts_expiration", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX dw_poll_receipts_expiration ON public.dw_poll_receipts USING btree (expires_at)" + } + ], + [ + "index", + "dw_poll_receipts_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX dw_poll_receipts_pkey ON public.dw_poll_receipts USING btree (namespace, worker_id, kind, request_id)" + } + ], + [ + "index", + "dw_query_cache_expiration", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX dw_query_cache_expiration ON public.dw_query_cache USING btree (expiration, key)" + } + ], + [ + "index", + "dw_query_cache_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX dw_query_cache_pkey ON public.dw_query_cache USING btree (key)" + } + ], + [ + "index", + "dw_run_command_contracts_namespace", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX dw_run_command_contracts_namespace ON public.dw_run_command_contracts USING btree (namespace)" + } + ], + [ + "index", + "dw_run_command_contracts_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX dw_run_command_contracts_pkey ON public.dw_run_command_contracts USING btree (workflow_run_id)" + } + ], + [ + "index", + "dw_service_admission_counters_expiry", + { + "definition": "CREATE INDEX dw_service_admission_counters_expiry ON public.dw_service_admission_counters USING btree (expires_at)", + "primary": false, + "ready": true, + "unique": false, + "valid": true + } + ], + [ + "index", + "dw_service_admission_counters_pkey", + { + "definition": "CREATE UNIQUE INDEX dw_service_admission_counters_pkey ON public.dw_service_admission_counters USING btree (cache_key)", + "primary": true, + "ready": true, + "unique": true, + "valid": true + } + ], + [ + "index", + "dw_service_call_deadlines_due", + { + "definition": "CREATE INDEX dw_service_call_deadlines_due ON public.dw_service_call_deadlines USING btree (call_deadline_at, service_call_id)", + "primary": false, + "ready": true, + "unique": false, + "valid": true + } + ], + [ + "index", + "dw_service_call_deadlines_pkey", + { + "definition": "CREATE UNIQUE INDEX dw_service_call_deadlines_pkey ON public.dw_service_call_deadlines USING btree (service_call_id)", + "primary": true, + "ready": true, + "unique": true, + "valid": true + } + ], + [ + "index", + "dw_stream_reclaims_due", + { + "definition": "CREATE INDEX dw_stream_reclaims_due ON public.dw_stream_reclaims USING btree (namespace, reclaim_at, stream_id)", + "primary": false, + "ready": true, + "unique": false, + "valid": true + } + ], + [ + "index", + "dw_stream_reclaims_pkey", + { + "definition": "CREATE UNIQUE INDEX dw_stream_reclaims_pkey ON public.dw_stream_reclaims USING btree (stream_id)", + "primary": true, + "ready": true, + "unique": true, + "valid": true + } + ], + [ + "index", + "dw_task_completions_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX dw_task_completions_pkey ON public.dw_task_completions USING btree (task_id)" + } + ], + [ + "index", + "dw_task_queue_pauses_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX dw_task_queue_pauses_pkey ON public.dw_task_queue_pauses USING btree (namespace, task_queue)" + } + ], + [ + "index", + "dw_worker_incarnation_authority", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX dw_worker_incarnation_authority ON public.dw_worker_registration_incarnations USING btree (namespace, worker_id, status)" + } + ], + [ + "index", + "dw_worker_incarnation_retention", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX dw_worker_incarnation_retention ON public.dw_worker_registration_incarnations USING btree (status, finished_at)" + } + ], + [ + "index", + "dw_worker_registration_incarnations_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX dw_worker_registration_incarnations_pkey ON public.dw_worker_registration_incarnations USING btree (token)" + } + ], + [ + "index", + "dw_worker_session_holders_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX dw_worker_session_holders_pkey ON public.dw_worker_session_holders USING btree (namespace, session_id)" + } + ], + [ + "index", + "dw_workflow_tasks_poll", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX dw_workflow_tasks_poll ON public.workflow_tasks USING btree (namespace, queue, task_type, status, available_at)" + } + ], + [ + "index", + "dw_workflow_tasks_scoped_dispatch", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX dw_workflow_tasks_scoped_dispatch ON public.workflow_tasks USING btree (namespace COLLATE \"C\", queue COLLATE \"C\", task_type COLLATE \"C\", status COLLATE \"C\", priority, available_at, id)" + } + ], + [ + "index", + "failed_jobs_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX failed_jobs_pkey ON public.failed_jobs USING btree (id)" + } + ], + [ + "index", + "failed_jobs_uuid_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX failed_jobs_uuid_unique ON public.failed_jobs USING btree (uuid)" + } + ], + [ + "index", + "jobs_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX jobs_pkey ON public.jobs USING btree (id)" + } + ], + [ + "index", + "jobs_queue_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX jobs_queue_index ON public.jobs USING btree (queue)" + } + ], + [ + "index", + "migrations_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX migrations_pkey ON public.migrations USING btree (id)" + } + ], + [ + "index", + "runtime_credentials_expires_at_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX runtime_credentials_expires_at_index ON public.runtime_credentials USING btree (expires_at)" + } + ], + [ + "index", + "runtime_credentials_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX runtime_credentials_pkey ON public.runtime_credentials USING btree (id)" + } + ], + [ + "index", + "runtime_credentials_revoked_at_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX runtime_credentials_revoked_at_index ON public.runtime_credentials USING btree (revoked_at)" + } + ], + [ + "index", + "runtime_credentials_tenant_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX runtime_credentials_tenant_index ON public.runtime_credentials USING btree (tenant)" + } + ], + [ + "index", + "runtime_credentials_token_hash_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX runtime_credentials_token_hash_unique ON public.runtime_credentials USING btree (token_hash)" + } + ], + [ + "index", + "runtime_external_payload_backup_hold_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX runtime_external_payload_backup_hold_pkey ON public.runtime_external_payload_backup_hold USING btree (id)" + } + ], + [ + "index", + "runtime_external_payload_cleanup_stats_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX runtime_external_payload_cleanup_stats_pkey ON public.runtime_external_payload_cleanup_stats USING btree (namespace)" + } + ], + [ + "index", + "runtime_external_payload_object_locks_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX runtime_external_payload_object_locks_pkey ON public.runtime_external_payload_object_locks USING btree (bucket)" + } + ], + [ + "index", + "runtime_external_payloads_expires_at_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX runtime_external_payloads_expires_at_index ON public.runtime_external_payloads USING btree (expires_at)" + } + ], + [ + "index", + "runtime_external_payloads_namespace_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX runtime_external_payloads_namespace_index ON public.runtime_external_payloads USING btree (namespace)" + } + ], + [ + "index", + "runtime_external_payloads_namespace_uri_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX runtime_external_payloads_namespace_uri_unique ON public.runtime_external_payloads USING btree (namespace, storage_uri_sha256)" + } + ], + [ + "index", + "runtime_external_payloads_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX runtime_external_payloads_pkey ON public.runtime_external_payloads USING btree (id)" + } + ], + [ + "index", + "runtime_external_payloads_reclamation_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX runtime_external_payloads_reclamation_idx ON public.runtime_external_payloads USING btree (retained_at, expires_at, upload_status)" + } + ], + [ + "index", + "runtime_payload_completion_budgets_expires_at_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX runtime_payload_completion_budgets_expires_at_index ON public.runtime_payload_completion_budgets USING btree (expires_at)" + } + ], + [ + "index", + "runtime_payload_completion_budgets_namespace_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX runtime_payload_completion_budgets_namespace_index ON public.runtime_payload_completion_budgets USING btree (namespace)" + } + ], + [ + "index", + "runtime_payload_completion_budgets_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX runtime_payload_completion_budgets_pkey ON public.runtime_payload_completion_budgets USING btree (id)" + } + ], + [ + "index", + "search_attribute_definitions_namespace_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX search_attribute_definitions_namespace_index ON public.search_attribute_definitions USING btree (namespace)" + } + ], + [ + "index", + "search_attribute_definitions_namespace_name_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX search_attribute_definitions_namespace_name_unique ON public.search_attribute_definitions USING btree (namespace, name)" + } + ], + [ + "index", + "search_attribute_definitions_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX search_attribute_definitions_pkey ON public.search_attribute_definitions USING btree (id)" + } + ], + [ + "index", + "wf_durable_stream_items_idempotency_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX wf_durable_stream_items_idempotency_unique ON public.workflow_durable_stream_items USING btree (stream_id, idempotency_key)" + } + ], + [ + "index", + "wf_durable_stream_items_run_name_offset_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_durable_stream_items_run_name_offset_idx ON public.workflow_durable_stream_items USING btree (workflow_run_id, stream_name, \"offset\")" + } + ], + [ + "index", + "wf_durable_stream_items_stream_offset_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX wf_durable_stream_items_stream_offset_unique ON public.workflow_durable_stream_items USING btree (stream_id, \"offset\")" + } + ], + [ + "index", + "wf_durable_streams_ns_instance_name_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_durable_streams_ns_instance_name_idx ON public.workflow_durable_streams USING btree (namespace, workflow_instance_id, stream_name)" + } + ], + [ + "index", + "wf_durable_streams_ns_status_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_durable_streams_ns_status_idx ON public.workflow_durable_streams USING btree (namespace, status)" + } + ], + [ + "index", + "wf_durable_streams_run_name_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX wf_durable_streams_run_name_unique ON public.workflow_durable_streams USING btree (workflow_run_id, stream_name)" + } + ], + [ + "index", + "wf_inbound_items_ns_instance_name_position_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_inbound_items_ns_instance_name_position_idx ON public.workflow_inbound_stream_items USING btree (namespace, workflow_instance_id, stream_name, \"position\")" + } + ], + [ + "index", + "wf_inbound_items_stream_message_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX wf_inbound_items_stream_message_unique ON public.workflow_inbound_stream_items USING btree (stream_id, message_id)" + } + ], + [ + "index", + "wf_inbound_items_stream_position_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX wf_inbound_items_stream_position_unique ON public.workflow_inbound_stream_items USING btree (stream_id, \"position\")" + } + ], + [ + "index", + "wf_inbound_streams_ns_instance_name_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX wf_inbound_streams_ns_instance_name_unique ON public.workflow_inbound_streams USING btree (namespace, workflow_instance_id, stream_name)" + } + ], + [ + "index", + "wf_msgs_instance_stream_seq", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_msgs_instance_stream_seq ON public.workflow_messages USING btree (workflow_instance_id, stream_key, sequence)" + } + ], + [ + "index", + "wf_msgs_run_dir_state", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_msgs_run_dir_state ON public.workflow_messages USING btree (workflow_run_id, direction, consume_state)" + } + ], + [ + "index", + "wf_msgs_stream_seq_state", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_msgs_stream_seq_state ON public.workflow_messages USING btree (stream_key, sequence, consume_state)" + } + ], + [ + "index", + "wf_msgs_stream_seq_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX wf_msgs_stream_seq_unique ON public.workflow_messages USING btree (workflow_instance_id, stream_key, sequence)" + } + ], + [ + "index", + "wf_msgs_target_state", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_msgs_target_state ON public.workflow_messages USING btree (target_workflow_instance_id, consume_state)" + } + ], + [ + "index", + "wf_schedule_history_event_recorded_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_schedule_history_event_recorded_idx ON public.workflow_schedule_history_events USING btree (event_type, recorded_at)" + } + ], + [ + "index", + "wf_schedule_history_instance_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_schedule_history_instance_idx ON public.workflow_schedule_history_events USING btree (workflow_instance_id)" + } + ], + [ + "index", + "wf_schedule_history_namespace_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_schedule_history_namespace_idx ON public.workflow_schedule_history_events USING btree (namespace)" + } + ], + [ + "index", + "wf_schedule_history_namespace_schedule_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_schedule_history_namespace_schedule_idx ON public.workflow_schedule_history_events USING btree (namespace, schedule_id)" + } + ], + [ + "index", + "wf_schedule_history_occurrence_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_schedule_history_occurrence_idx ON public.workflow_schedule_history_events USING btree (workflow_schedule_id, event_type, occurrence_at_utc)" + } + ], + [ + "index", + "wf_schedule_history_run_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_schedule_history_run_idx ON public.workflow_schedule_history_events USING btree (workflow_run_id)" + } + ], + [ + "index", + "wf_schedule_history_schedule_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_schedule_history_schedule_idx ON public.workflow_schedule_history_events USING btree (schedule_id)" + } + ], + [ + "index", + "wf_schedule_history_schedule_sequence_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX wf_schedule_history_schedule_sequence_unique ON public.workflow_schedule_history_events USING btree (workflow_schedule_id, sequence)" + } + ], + [ + "index", + "wf_schedule_history_workflow_schedule_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_schedule_history_workflow_schedule_idx ON public.workflow_schedule_history_events USING btree (workflow_schedule_id)" + } + ], + [ + "index", + "wf_service_calls_accepted_at_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_calls_accepted_at_idx ON public.workflow_service_calls USING btree (accepted_at)" + } + ], + [ + "index", + "wf_service_calls_binding_kind_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_calls_binding_kind_idx ON public.workflow_service_calls USING btree (resolved_binding_kind)" + } + ], + [ + "index", + "wf_service_calls_caller_instance_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_calls_caller_instance_idx ON public.workflow_service_calls USING btree (caller_workflow_instance_id)" + } + ], + [ + "index", + "wf_service_calls_caller_namespace_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_calls_caller_namespace_idx ON public.workflow_service_calls USING btree (caller_namespace)" + } + ], + [ + "index", + "wf_service_calls_caller_outcome_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_calls_caller_outcome_idx ON public.workflow_service_calls USING btree (caller_namespace, outcome)" + } + ], + [ + "index", + "wf_service_calls_caller_run_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_calls_caller_run_idx ON public.workflow_service_calls USING btree (caller_workflow_run_id)" + } + ], + [ + "index", + "wf_service_calls_caller_status_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_calls_caller_status_idx ON public.workflow_service_calls USING btree (caller_namespace, status)" + } + ], + [ + "index", + "wf_service_calls_endpoint_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_calls_endpoint_idx ON public.workflow_service_calls USING btree (workflow_service_endpoint_id)" + } + ], + [ + "index", + "wf_service_calls_idempotency_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_calls_idempotency_idx ON public.workflow_service_calls USING btree (idempotency_key)" + } + ], + [ + "index", + "wf_service_calls_linked_instance_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_calls_linked_instance_idx ON public.workflow_service_calls USING btree (linked_workflow_instance_id)" + } + ], + [ + "index", + "wf_service_calls_linked_run_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_calls_linked_run_idx ON public.workflow_service_calls USING btree (linked_workflow_run_id)" + } + ], + [ + "index", + "wf_service_calls_linked_update_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_calls_linked_update_idx ON public.workflow_service_calls USING btree (linked_workflow_update_id)" + } + ], + [ + "index", + "wf_service_calls_mode_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_calls_mode_idx ON public.workflow_service_calls USING btree (operation_mode)" + } + ], + [ + "index", + "wf_service_calls_namespace_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_calls_namespace_idx ON public.workflow_service_calls USING btree (namespace)" + } + ], + [ + "index", + "wf_service_calls_namespace_outcome_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_calls_namespace_outcome_idx ON public.workflow_service_calls USING btree (namespace, outcome)" + } + ], + [ + "index", + "wf_service_calls_namespace_status_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_calls_namespace_status_idx ON public.workflow_service_calls USING btree (namespace, status)" + } + ], + [ + "index", + "wf_service_calls_operation_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_calls_operation_idx ON public.workflow_service_calls USING btree (workflow_service_operation_id)" + } + ], + [ + "index", + "wf_service_calls_outcome_category_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_calls_outcome_category_idx ON public.workflow_service_calls USING btree (outcome_category)" + } + ], + [ + "index", + "wf_service_calls_outcome_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_calls_outcome_idx ON public.workflow_service_calls USING btree (outcome)" + } + ], + [ + "index", + "wf_service_calls_policy_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_calls_policy_idx ON public.workflow_service_calls USING btree (policy_name)" + } + ], + [ + "index", + "wf_service_calls_principal_subject_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_calls_principal_subject_idx ON public.workflow_service_calls USING btree (caller_principal_subject)" + } + ], + [ + "index", + "wf_service_calls_service_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_calls_service_idx ON public.workflow_service_calls USING btree (workflow_service_id)" + } + ], + [ + "index", + "wf_service_calls_status_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_calls_status_idx ON public.workflow_service_calls USING btree (status)" + } + ], + [ + "index", + "wf_service_calls_target_namespace_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_calls_target_namespace_idx ON public.workflow_service_calls USING btree (target_namespace)" + } + ], + [ + "index", + "wf_service_calls_target_outcome_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_calls_target_outcome_idx ON public.workflow_service_calls USING btree (target_namespace, outcome)" + } + ], + [ + "index", + "wf_service_calls_target_status_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_calls_target_status_idx ON public.workflow_service_calls USING btree (target_namespace, status)" + } + ], + [ + "index", + "wf_service_endpoints_name_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_endpoints_name_idx ON public.workflow_service_endpoints USING btree (endpoint_name)" + } + ], + [ + "index", + "wf_service_endpoints_namespace_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_endpoints_namespace_idx ON public.workflow_service_endpoints USING btree (namespace)" + } + ], + [ + "index", + "wf_service_endpoints_namespace_name_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX wf_service_endpoints_namespace_name_unique ON public.workflow_service_endpoints USING btree (namespace, endpoint_name)" + } + ], + [ + "index", + "wf_service_ops_binding_kind_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_ops_binding_kind_idx ON public.workflow_service_operations USING btree (handler_binding_kind)" + } + ], + [ + "index", + "wf_service_ops_endpoint_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_ops_endpoint_idx ON public.workflow_service_operations USING btree (workflow_service_endpoint_id)" + } + ], + [ + "index", + "wf_service_ops_mode_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_ops_mode_idx ON public.workflow_service_operations USING btree (operation_mode)" + } + ], + [ + "index", + "wf_service_ops_name_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_ops_name_idx ON public.workflow_service_operations USING btree (operation_name)" + } + ], + [ + "index", + "wf_service_ops_namespace_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_ops_namespace_idx ON public.workflow_service_operations USING btree (namespace)" + } + ], + [ + "index", + "wf_service_ops_namespace_name_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_ops_namespace_name_idx ON public.workflow_service_operations USING btree (namespace, operation_name)" + } + ], + [ + "index", + "wf_service_ops_namespace_service_name_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX wf_service_ops_namespace_service_name_unique ON public.workflow_service_operations USING btree (namespace, workflow_service_id, operation_name)" + } + ], + [ + "index", + "wf_service_ops_service_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_service_ops_service_idx ON public.workflow_service_operations USING btree (workflow_service_id)" + } + ], + [ + "index", + "wf_services_endpoint_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_services_endpoint_idx ON public.workflow_services USING btree (workflow_service_endpoint_id)" + } + ], + [ + "index", + "wf_services_name_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_services_name_idx ON public.workflow_services USING btree (service_name)" + } + ], + [ + "index", + "wf_services_namespace_endpoint_name_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX wf_services_namespace_endpoint_name_unique ON public.workflow_services USING btree (namespace, workflow_service_endpoint_id, service_name)" + } + ], + [ + "index", + "wf_services_namespace_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_services_namespace_idx ON public.workflow_services USING btree (namespace)" + } + ], + [ + "index", + "wf_services_namespace_name_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wf_services_namespace_name_idx ON public.workflow_services USING btree (namespace, service_name)" + } + ], + [ + "index", + "wfrs_decl_contract_source_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wfrs_decl_contract_source_idx ON public.workflow_run_summaries USING btree (declared_contract_source)" + } + ], + [ + "index", + "wfrs_decl_entry_mode_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wfrs_decl_entry_mode_idx ON public.workflow_run_summaries USING btree (declared_entry_mode)" + } + ], + [ + "index", + "wfrs_namespace_sort_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wfrs_namespace_sort_idx ON public.workflow_run_summaries USING btree (namespace, sort_timestamp, id)" + } + ], + [ + "index", + "wfrs_namespace_status_sort_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wfrs_namespace_status_sort_idx ON public.workflow_run_summaries USING btree (namespace, status_bucket, sort_timestamp, id)" + } + ], + [ + "index", + "wfrs_namespace_type_sort_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wfrs_namespace_type_sort_idx ON public.workflow_run_summaries USING btree (namespace, workflow_type, sort_timestamp, id)" + } + ], + [ + "index", + "wfrs_prom_metrics_series_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX wfrs_prom_metrics_series_idx ON public.workflow_run_summaries USING btree (namespace, queue, workflow_type)" + } + ], + [ + "index", + "workflow_build_id_rollouts_scope_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX workflow_build_id_rollouts_scope_unique ON public.workflow_worker_build_id_rollouts USING btree (namespace, task_queue, build_id)" + } + ], + [ + "index", + "workflow_child_calls_parent_workflow_instance_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_child_calls_parent_workflow_instance_id_index ON public.workflow_child_calls USING btree (parent_workflow_instance_id)" + } + ], + [ + "index", + "workflow_child_calls_parent_workflow_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_child_calls_parent_workflow_run_id_index ON public.workflow_child_calls USING btree (parent_workflow_run_id)" + } + ], + [ + "index", + "workflow_child_calls_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_child_calls_pkey ON public.workflow_child_calls USING btree (id)" + } + ], + [ + "index", + "workflow_child_calls_resolved_child_instance_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_child_calls_resolved_child_instance_id_index ON public.workflow_child_calls USING btree (resolved_child_instance_id)" + } + ], + [ + "index", + "workflow_child_calls_resolved_child_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_child_calls_resolved_child_run_id_index ON public.workflow_child_calls USING btree (resolved_child_run_id)" + } + ], + [ + "index", + "workflow_child_calls_sequence_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_child_calls_sequence_index ON public.workflow_child_calls USING btree (sequence)" + } + ], + [ + "index", + "workflow_child_calls_status_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_child_calls_status_index ON public.workflow_child_calls USING btree (status)" + } + ], + [ + "index", + "workflow_child_projection_repairs_drain_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_child_projection_repairs_drain_idx ON public.workflow_child_projection_repairs USING btree (workflow_run_id, workflow_task_id, history_sequence)" + } + ], + [ + "index", + "workflow_child_projection_repairs_failure_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_child_projection_repairs_failure_idx ON public.workflow_child_projection_repairs USING btree (workflow_run_id, failure_id)" + } + ], + [ + "index", + "workflow_child_projection_repairs_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_child_projection_repairs_pkey ON public.workflow_child_projection_repairs USING btree (workflow_history_event_id)" + } + ], + [ + "index", + "workflow_commands_command_sequence_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_commands_command_sequence_index ON public.workflow_commands USING btree (command_sequence)" + } + ], + [ + "index", + "workflow_commands_command_type_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_commands_command_type_index ON public.workflow_commands USING btree (command_type)" + } + ], + [ + "index", + "workflow_commands_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_commands_pkey ON public.workflow_commands USING btree (id)" + } + ], + [ + "index", + "workflow_commands_request_lookup", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX workflow_commands_request_lookup ON public.workflow_commands USING btree (workflow_instance_id, command_type, request_id)" + } + ], + [ + "index", + "workflow_commands_requested_workflow_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_commands_requested_workflow_run_id_index ON public.workflow_commands USING btree (requested_workflow_run_id)" + } + ], + [ + "index", + "workflow_commands_resolved_workflow_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_commands_resolved_workflow_run_id_index ON public.workflow_commands USING btree (resolved_workflow_run_id)" + } + ], + [ + "index", + "workflow_commands_source_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_commands_source_index ON public.workflow_commands USING btree (source)" + } + ], + [ + "index", + "workflow_commands_status_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_commands_status_index ON public.workflow_commands USING btree (status)" + } + ], + [ + "index", + "workflow_commands_workflow_instance_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_commands_workflow_instance_id_index ON public.workflow_commands USING btree (workflow_instance_id)" + } + ], + [ + "index", + "workflow_commands_workflow_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_commands_workflow_run_id_index ON public.workflow_commands USING btree (workflow_run_id)" + } + ], + [ + "index", + "workflow_durable_stream_items_namespace_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_durable_stream_items_namespace_index ON public.workflow_durable_stream_items USING btree (namespace)" + } + ], + [ + "index", + "workflow_durable_stream_items_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_durable_stream_items_pkey ON public.workflow_durable_stream_items USING btree (id)" + } + ], + [ + "index", + "workflow_durable_stream_items_workflow_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_durable_stream_items_workflow_run_id_index ON public.workflow_durable_stream_items USING btree (workflow_run_id)" + } + ], + [ + "index", + "workflow_durable_streams_namespace_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_durable_streams_namespace_index ON public.workflow_durable_streams USING btree (namespace)" + } + ], + [ + "index", + "workflow_durable_streams_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_durable_streams_pkey ON public.workflow_durable_streams USING btree (id)" + } + ], + [ + "index", + "workflow_durable_streams_status_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_durable_streams_status_index ON public.workflow_durable_streams USING btree (status)" + } + ], + [ + "index", + "workflow_durable_streams_workflow_instance_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_durable_streams_workflow_instance_id_index ON public.workflow_durable_streams USING btree (workflow_instance_id)" + } + ], + [ + "index", + "workflow_durable_streams_workflow_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_durable_streams_workflow_run_id_index ON public.workflow_durable_streams USING btree (workflow_run_id)" + } + ], + [ + "index", + "workflow_failures_failure_category_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_failures_failure_category_index ON public.workflow_failures USING btree (failure_category)" + } + ], + [ + "index", + "workflow_failures_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_failures_pkey ON public.workflow_failures USING btree (id)" + } + ], + [ + "index", + "workflow_failures_source_kind_source_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_failures_source_kind_source_id_index ON public.workflow_failures USING btree (source_kind, source_id)" + } + ], + [ + "index", + "workflow_failures_workflow_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_failures_workflow_run_id_index ON public.workflow_failures USING btree (workflow_run_id)" + } + ], + [ + "index", + "workflow_history_events_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_history_events_pkey ON public.workflow_history_events USING btree (id)" + } + ], + [ + "index", + "workflow_history_events_workflow_command_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_history_events_workflow_command_id_index ON public.workflow_history_events USING btree (workflow_command_id)" + } + ], + [ + "index", + "workflow_history_events_workflow_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_history_events_workflow_run_id_index ON public.workflow_history_events USING btree (workflow_run_id)" + } + ], + [ + "index", + "workflow_history_events_workflow_run_id_sequence_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX workflow_history_events_workflow_run_id_sequence_unique ON public.workflow_history_events USING btree (workflow_run_id, sequence)" + } + ], + [ + "index", + "workflow_history_events_workflow_task_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_history_events_workflow_task_id_index ON public.workflow_history_events USING btree (workflow_task_id)" + } + ], + [ + "index", + "workflow_inbound_stream_items_consumed_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_inbound_stream_items_consumed_run_id_index ON public.workflow_inbound_stream_items USING btree (consumed_run_id)" + } + ], + [ + "index", + "workflow_inbound_stream_items_consumed_task_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_inbound_stream_items_consumed_task_id_index ON public.workflow_inbound_stream_items USING btree (consumed_task_id)" + } + ], + [ + "index", + "workflow_inbound_stream_items_delivered_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_inbound_stream_items_delivered_run_id_index ON public.workflow_inbound_stream_items USING btree (delivered_run_id)" + } + ], + [ + "index", + "workflow_inbound_stream_items_namespace_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_inbound_stream_items_namespace_index ON public.workflow_inbound_stream_items USING btree (namespace)" + } + ], + [ + "index", + "workflow_inbound_stream_items_payload_released_at_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_inbound_stream_items_payload_released_at_index ON public.workflow_inbound_stream_items USING btree (payload_released_at)" + } + ], + [ + "index", + "workflow_inbound_stream_items_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_inbound_stream_items_pkey ON public.workflow_inbound_stream_items USING btree (id)" + } + ], + [ + "index", + "workflow_inbound_stream_items_workflow_command_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_inbound_stream_items_workflow_command_id_index ON public.workflow_inbound_stream_items USING btree (workflow_command_id)" + } + ], + [ + "index", + "workflow_inbound_stream_items_workflow_instance_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_inbound_stream_items_workflow_instance_id_index ON public.workflow_inbound_stream_items USING btree (workflow_instance_id)" + } + ], + [ + "index", + "workflow_inbound_streams_cleanup_blocked_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_inbound_streams_cleanup_blocked_run_id_index ON public.workflow_inbound_streams USING btree (cleanup_blocked_run_id)" + } + ], + [ + "index", + "workflow_inbound_streams_cursor_checkpoint_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_inbound_streams_cursor_checkpoint_run_id_index ON public.workflow_inbound_streams USING btree (cursor_checkpoint_run_id)" + } + ], + [ + "index", + "workflow_inbound_streams_namespace_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_inbound_streams_namespace_index ON public.workflow_inbound_streams USING btree (namespace)" + } + ], + [ + "index", + "workflow_inbound_streams_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_inbound_streams_pkey ON public.workflow_inbound_streams USING btree (id)" + } + ], + [ + "index", + "workflow_inbound_streams_waiting_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_inbound_streams_waiting_run_id_index ON public.workflow_inbound_streams USING btree (waiting_run_id)" + } + ], + [ + "index", + "workflow_inbound_streams_workflow_instance_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_inbound_streams_workflow_instance_id_index ON public.workflow_inbound_streams USING btree (workflow_instance_id)" + } + ], + [ + "index", + "workflow_instances_business_key_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_instances_business_key_index ON public.workflow_instances USING btree (business_key)" + } + ], + [ + "index", + "workflow_instances_current_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_instances_current_run_id_index ON public.workflow_instances USING btree (current_run_id)" + } + ], + [ + "index", + "workflow_instances_namespace_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_instances_namespace_index ON public.workflow_instances USING btree (namespace)" + } + ], + [ + "index", + "workflow_instances_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_instances_pkey ON public.workflow_instances USING btree (id)" + } + ], + [ + "index", + "workflow_links_child_workflow_instance_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_links_child_workflow_instance_id_index ON public.workflow_links USING btree (child_workflow_instance_id)" + } + ], + [ + "index", + "workflow_links_child_workflow_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_links_child_workflow_run_id_index ON public.workflow_links USING btree (child_workflow_run_id)" + } + ], + [ + "index", + "workflow_links_parent_child_type_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX workflow_links_parent_child_type_unique ON public.workflow_links USING btree (parent_workflow_run_id, child_workflow_run_id, link_type)" + } + ], + [ + "index", + "workflow_links_parent_sequence_type_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_links_parent_sequence_type_index ON public.workflow_links USING btree (parent_workflow_run_id, sequence, link_type)" + } + ], + [ + "index", + "workflow_links_parent_workflow_instance_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_links_parent_workflow_instance_id_index ON public.workflow_links USING btree (parent_workflow_instance_id)" + } + ], + [ + "index", + "workflow_links_parent_workflow_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_links_parent_workflow_run_id_index ON public.workflow_links USING btree (parent_workflow_run_id)" + } + ], + [ + "index", + "workflow_links_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_links_pkey ON public.workflow_links USING btree (id)" + } + ], + [ + "index", + "workflow_memos_instance_key", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_memos_instance_key ON public.workflow_memos USING btree (workflow_instance_id, key)" + } + ], + [ + "index", + "workflow_memos_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_memos_pkey ON public.workflow_memos USING btree (id)" + } + ], + [ + "index", + "workflow_memos_run_key_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX workflow_memos_run_key_unique ON public.workflow_memos USING btree (workflow_run_id, key)" + } + ], + [ + "index", + "workflow_messages_channel_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_messages_channel_index ON public.workflow_messages USING btree (channel)" + } + ], + [ + "index", + "workflow_messages_consume_state_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_messages_consume_state_index ON public.workflow_messages USING btree (consume_state)" + } + ], + [ + "index", + "workflow_messages_correlation_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_messages_correlation_id_index ON public.workflow_messages USING btree (correlation_id)" + } + ], + [ + "index", + "workflow_messages_direction_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_messages_direction_index ON public.workflow_messages USING btree (direction)" + } + ], + [ + "index", + "workflow_messages_idempotency_key_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_messages_idempotency_key_index ON public.workflow_messages USING btree (idempotency_key)" + } + ], + [ + "index", + "workflow_messages_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_messages_pkey ON public.workflow_messages USING btree (id)" + } + ], + [ + "index", + "workflow_messages_sequence_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_messages_sequence_index ON public.workflow_messages USING btree (sequence)" + } + ], + [ + "index", + "workflow_messages_source_workflow_instance_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_messages_source_workflow_instance_id_index ON public.workflow_messages USING btree (source_workflow_instance_id)" + } + ], + [ + "index", + "workflow_messages_stream_key_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_messages_stream_key_index ON public.workflow_messages USING btree (stream_key)" + } + ], + [ + "index", + "workflow_messages_target_workflow_instance_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_messages_target_workflow_instance_id_index ON public.workflow_messages USING btree (target_workflow_instance_id)" + } + ], + [ + "index", + "workflow_messages_workflow_instance_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_messages_workflow_instance_id_index ON public.workflow_messages USING btree (workflow_instance_id)" + } + ], + [ + "index", + "workflow_messages_workflow_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_messages_workflow_run_id_index ON public.workflow_messages USING btree (workflow_run_id)" + } + ], + [ + "index", + "workflow_namespaces_name_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX workflow_namespaces_name_unique ON public.workflow_namespaces USING btree (name)" + } + ], + [ + "index", + "workflow_namespaces_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_namespaces_pkey ON public.workflow_namespaces USING btree (id)" + } + ], + [ + "index", + "workflow_run_lineage_entries_child_call_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_lineage_entries_child_call_id_index ON public.workflow_run_lineage_entries USING btree (child_call_id)" + } + ], + [ + "index", + "workflow_run_lineage_entries_closed_reason_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_lineage_entries_closed_reason_index ON public.workflow_run_lineage_entries USING btree (closed_reason)" + } + ], + [ + "index", + "workflow_run_lineage_entries_direction_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_lineage_entries_direction_index ON public.workflow_run_lineage_entries USING btree (direction)" + } + ], + [ + "index", + "workflow_run_lineage_entries_is_primary_parent_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_lineage_entries_is_primary_parent_index ON public.workflow_run_lineage_entries USING btree (is_primary_parent)" + } + ], + [ + "index", + "workflow_run_lineage_entries_link_type_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_lineage_entries_link_type_index ON public.workflow_run_lineage_entries USING btree (link_type)" + } + ], + [ + "index", + "workflow_run_lineage_entries_linked_at_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_lineage_entries_linked_at_index ON public.workflow_run_lineage_entries USING btree (linked_at)" + } + ], + [ + "index", + "workflow_run_lineage_entries_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_run_lineage_entries_pkey ON public.workflow_run_lineage_entries USING btree (id)" + } + ], + [ + "index", + "workflow_run_lineage_entries_related_workflow_instance_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_lineage_entries_related_workflow_instance_id_index ON public.workflow_run_lineage_entries USING btree (related_workflow_instance_id)" + } + ], + [ + "index", + "workflow_run_lineage_entries_related_workflow_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_lineage_entries_related_workflow_run_id_index ON public.workflow_run_lineage_entries USING btree (related_workflow_run_id)" + } + ], + [ + "index", + "workflow_run_lineage_entries_related_workflow_type_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_lineage_entries_related_workflow_type_index ON public.workflow_run_lineage_entries USING btree (related_workflow_type)" + } + ], + [ + "index", + "workflow_run_lineage_entries_sequence_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_lineage_entries_sequence_index ON public.workflow_run_lineage_entries USING btree (sequence)" + } + ], + [ + "index", + "workflow_run_lineage_entries_status_bucket_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_lineage_entries_status_bucket_index ON public.workflow_run_lineage_entries USING btree (status_bucket)" + } + ], + [ + "index", + "workflow_run_lineage_entries_status_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_lineage_entries_status_index ON public.workflow_run_lineage_entries USING btree (status)" + } + ], + [ + "index", + "workflow_run_lineage_entries_workflow_instance_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_lineage_entries_workflow_instance_id_index ON public.workflow_run_lineage_entries USING btree (workflow_instance_id)" + } + ], + [ + "index", + "workflow_run_lineage_entries_workflow_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_lineage_entries_workflow_run_id_index ON public.workflow_run_lineage_entries USING btree (workflow_run_id)" + } + ], + [ + "index", + "workflow_run_lineage_instance_direction_type_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_lineage_instance_direction_type_index ON public.workflow_run_lineage_entries USING btree (workflow_instance_id, direction, link_type)" + } + ], + [ + "index", + "workflow_run_lineage_run_direction_lineage_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX workflow_run_lineage_run_direction_lineage_unique ON public.workflow_run_lineage_entries USING btree (workflow_run_id, direction, lineage_id)" + } + ], + [ + "index", + "workflow_run_lineage_run_direction_position_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_lineage_run_direction_position_index ON public.workflow_run_lineage_entries USING btree (workflow_run_id, direction, \"position\")" + } + ], + [ + "index", + "workflow_run_summaries_archive_command_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_summaries_archive_command_id_index ON public.workflow_run_summaries USING btree (archive_command_id)" + } + ], + [ + "index", + "workflow_run_summaries_archived_at_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_summaries_archived_at_index ON public.workflow_run_summaries USING btree (archived_at)" + } + ], + [ + "index", + "workflow_run_summaries_business_key_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_summaries_business_key_index ON public.workflow_run_summaries USING btree (business_key)" + } + ], + [ + "index", + "workflow_run_summaries_continue_as_new_recommended_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_summaries_continue_as_new_recommended_index ON public.workflow_run_summaries USING btree (continue_as_new_recommended)" + } + ], + [ + "index", + "workflow_run_summaries_history_budget_pressure_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_summaries_history_budget_pressure_index ON public.workflow_run_summaries USING btree (history_budget_pressure)" + } + ], + [ + "index", + "workflow_run_summaries_is_current_run_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_summaries_is_current_run_index ON public.workflow_run_summaries USING btree (is_current_run)" + } + ], + [ + "index", + "workflow_run_summaries_namespace_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_summaries_namespace_index ON public.workflow_run_summaries USING btree (namespace)" + } + ], + [ + "index", + "workflow_run_summaries_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_run_summaries_pkey ON public.workflow_run_summaries USING btree (id)" + } + ], + [ + "index", + "workflow_run_summaries_projection_schema_version_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_summaries_projection_schema_version_index ON public.workflow_run_summaries USING btree (projection_schema_version)" + } + ], + [ + "index", + "workflow_run_summaries_repair_attention_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_summaries_repair_attention_index ON public.workflow_run_summaries USING btree (repair_attention)" + } + ], + [ + "index", + "workflow_run_summaries_repair_blocked_reason_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_summaries_repair_blocked_reason_index ON public.workflow_run_summaries USING btree (repair_blocked_reason)" + } + ], + [ + "index", + "workflow_run_summaries_sort_key_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_summaries_sort_key_index ON public.workflow_run_summaries USING btree (sort_key)" + } + ], + [ + "index", + "workflow_run_summaries_sort_order_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_summaries_sort_order_index ON public.workflow_run_summaries USING btree (sort_timestamp, id)" + } + ], + [ + "index", + "workflow_run_summaries_status_bucket_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_summaries_status_bucket_index ON public.workflow_run_summaries USING btree (status_bucket)" + } + ], + [ + "index", + "workflow_run_summaries_status_bucket_started_at_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_summaries_status_bucket_started_at_index ON public.workflow_run_summaries USING btree (status_bucket, started_at)" + } + ], + [ + "index", + "workflow_run_summaries_status_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_summaries_status_index ON public.workflow_run_summaries USING btree (status)" + } + ], + [ + "index", + "workflow_run_summaries_workflow_instance_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_summaries_workflow_instance_id_index ON public.workflow_run_summaries USING btree (workflow_instance_id)" + } + ], + [ + "index", + "workflow_run_timeline_entries_activity_execution_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timeline_entries_activity_execution_id_index ON public.workflow_run_timeline_entries USING btree (activity_execution_id)" + } + ], + [ + "index", + "workflow_run_timeline_entries_command_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timeline_entries_command_id_index ON public.workflow_run_timeline_entries USING btree (command_id)" + } + ], + [ + "index", + "workflow_run_timeline_entries_command_sequence_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timeline_entries_command_sequence_index ON public.workflow_run_timeline_entries USING btree (command_sequence)" + } + ], + [ + "index", + "workflow_run_timeline_entries_failure_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timeline_entries_failure_id_index ON public.workflow_run_timeline_entries USING btree (failure_id)" + } + ], + [ + "index", + "workflow_run_timeline_entries_history_event_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timeline_entries_history_event_id_index ON public.workflow_run_timeline_entries USING btree (history_event_id)" + } + ], + [ + "index", + "workflow_run_timeline_entries_kind_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timeline_entries_kind_index ON public.workflow_run_timeline_entries USING btree (kind)" + } + ], + [ + "index", + "workflow_run_timeline_entries_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_run_timeline_entries_pkey ON public.workflow_run_timeline_entries USING btree (id)" + } + ], + [ + "index", + "workflow_run_timeline_entries_recorded_at_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timeline_entries_recorded_at_index ON public.workflow_run_timeline_entries USING btree (recorded_at)" + } + ], + [ + "index", + "workflow_run_timeline_entries_sequence_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timeline_entries_sequence_index ON public.workflow_run_timeline_entries USING btree (sequence)" + } + ], + [ + "index", + "workflow_run_timeline_entries_source_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timeline_entries_source_id_index ON public.workflow_run_timeline_entries USING btree (source_id)" + } + ], + [ + "index", + "workflow_run_timeline_entries_source_kind_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timeline_entries_source_kind_index ON public.workflow_run_timeline_entries USING btree (source_kind)" + } + ], + [ + "index", + "workflow_run_timeline_entries_task_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timeline_entries_task_id_index ON public.workflow_run_timeline_entries USING btree (task_id)" + } + ], + [ + "index", + "workflow_run_timeline_entries_timer_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timeline_entries_timer_id_index ON public.workflow_run_timeline_entries USING btree (timer_id)" + } + ], + [ + "index", + "workflow_run_timeline_entries_type_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timeline_entries_type_index ON public.workflow_run_timeline_entries USING btree (type)" + } + ], + [ + "index", + "workflow_run_timeline_entries_workflow_instance_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timeline_entries_workflow_instance_id_index ON public.workflow_run_timeline_entries USING btree (workflow_instance_id)" + } + ], + [ + "index", + "workflow_run_timeline_entries_workflow_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timeline_entries_workflow_run_id_index ON public.workflow_run_timeline_entries USING btree (workflow_run_id)" + } + ], + [ + "index", + "workflow_run_timeline_instance_kind_recorded_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timeline_instance_kind_recorded_index ON public.workflow_run_timeline_entries USING btree (workflow_instance_id, kind, recorded_at)" + } + ], + [ + "index", + "workflow_run_timeline_run_event_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX workflow_run_timeline_run_event_unique ON public.workflow_run_timeline_entries USING btree (workflow_run_id, history_event_id)" + } + ], + [ + "index", + "workflow_run_timeline_run_sequence_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timeline_run_sequence_index ON public.workflow_run_timeline_entries USING btree (workflow_run_id, sequence)" + } + ], + [ + "index", + "workflow_run_timer_entries_condition_key_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timer_entries_condition_key_index ON public.workflow_run_timer_entries USING btree (condition_key)" + } + ], + [ + "index", + "workflow_run_timer_entries_condition_wait_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timer_entries_condition_wait_id_index ON public.workflow_run_timer_entries USING btree (condition_wait_id)" + } + ], + [ + "index", + "workflow_run_timer_entries_history_authority_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timer_entries_history_authority_index ON public.workflow_run_timer_entries USING btree (history_authority)" + } + ], + [ + "index", + "workflow_run_timer_entries_instance_kind_status_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timer_entries_instance_kind_status_index ON public.workflow_run_timer_entries USING btree (workflow_instance_id, timer_kind, status)" + } + ], + [ + "index", + "workflow_run_timer_entries_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_run_timer_entries_pkey ON public.workflow_run_timer_entries USING btree (id)" + } + ], + [ + "index", + "workflow_run_timer_entries_run_status_position_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timer_entries_run_status_position_index ON public.workflow_run_timer_entries USING btree (workflow_run_id, status, \"position\")" + } + ], + [ + "index", + "workflow_run_timer_entries_run_timer_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX workflow_run_timer_entries_run_timer_unique ON public.workflow_run_timer_entries USING btree (workflow_run_id, timer_id)" + } + ], + [ + "index", + "workflow_run_timer_entries_sequence_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timer_entries_sequence_index ON public.workflow_run_timer_entries USING btree (sequence)" + } + ], + [ + "index", + "workflow_run_timer_entries_source_status_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timer_entries_source_status_index ON public.workflow_run_timer_entries USING btree (source_status)" + } + ], + [ + "index", + "workflow_run_timer_entries_status_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timer_entries_status_index ON public.workflow_run_timer_entries USING btree (status)" + } + ], + [ + "index", + "workflow_run_timer_entries_timer_kind_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timer_entries_timer_kind_index ON public.workflow_run_timer_entries USING btree (timer_kind)" + } + ], + [ + "index", + "workflow_run_timer_entries_workflow_instance_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timer_entries_workflow_instance_id_index ON public.workflow_run_timer_entries USING btree (workflow_instance_id)" + } + ], + [ + "index", + "workflow_run_timer_entries_workflow_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timer_entries_workflow_run_id_index ON public.workflow_run_timer_entries USING btree (workflow_run_id)" + } + ], + [ + "index", + "workflow_run_timers_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_run_timers_pkey ON public.workflow_run_timers USING btree (id)" + } + ], + [ + "index", + "workflow_run_timers_status_fire_at_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timers_status_fire_at_index ON public.workflow_run_timers USING btree (status, fire_at)" + } + ], + [ + "index", + "workflow_run_timers_workflow_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_timers_workflow_run_id_index ON public.workflow_run_timers USING btree (workflow_run_id)" + } + ], + [ + "index", + "workflow_run_timers_workflow_run_id_sequence_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX workflow_run_timers_workflow_run_id_sequence_unique ON public.workflow_run_timers USING btree (workflow_run_id, sequence)" + } + ], + [ + "index", + "workflow_run_waits_command_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_waits_command_id_index ON public.workflow_run_waits USING btree (command_id)" + } + ], + [ + "index", + "workflow_run_waits_history_authority_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_waits_history_authority_index ON public.workflow_run_waits USING btree (history_authority)" + } + ], + [ + "index", + "workflow_run_waits_instance_kind_status_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_waits_instance_kind_status_index ON public.workflow_run_waits USING btree (workflow_instance_id, kind, status)" + } + ], + [ + "index", + "workflow_run_waits_kind_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_waits_kind_index ON public.workflow_run_waits USING btree (kind)" + } + ], + [ + "index", + "workflow_run_waits_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_run_waits_pkey ON public.workflow_run_waits USING btree (id)" + } + ], + [ + "index", + "workflow_run_waits_resume_source_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_waits_resume_source_id_index ON public.workflow_run_waits USING btree (resume_source_id)" + } + ], + [ + "index", + "workflow_run_waits_resume_source_kind_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_waits_resume_source_kind_index ON public.workflow_run_waits USING btree (resume_source_kind)" + } + ], + [ + "index", + "workflow_run_waits_run_status_position_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_waits_run_status_position_index ON public.workflow_run_waits USING btree (workflow_run_id, status, \"position\")" + } + ], + [ + "index", + "workflow_run_waits_run_wait_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX workflow_run_waits_run_wait_unique ON public.workflow_run_waits USING btree (workflow_run_id, wait_id)" + } + ], + [ + "index", + "workflow_run_waits_sequence_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_waits_sequence_index ON public.workflow_run_waits USING btree (sequence)" + } + ], + [ + "index", + "workflow_run_waits_source_status_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_waits_source_status_index ON public.workflow_run_waits USING btree (source_status)" + } + ], + [ + "index", + "workflow_run_waits_status_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_waits_status_index ON public.workflow_run_waits USING btree (status)" + } + ], + [ + "index", + "workflow_run_waits_target_name_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_waits_target_name_index ON public.workflow_run_waits USING btree (target_name)" + } + ], + [ + "index", + "workflow_run_waits_task_backed_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_waits_task_backed_index ON public.workflow_run_waits USING btree (task_backed)" + } + ], + [ + "index", + "workflow_run_waits_task_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_waits_task_id_index ON public.workflow_run_waits USING btree (task_id)" + } + ], + [ + "index", + "workflow_run_waits_workflow_instance_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_waits_workflow_instance_id_index ON public.workflow_run_waits USING btree (workflow_instance_id)" + } + ], + [ + "index", + "workflow_run_waits_workflow_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_run_waits_workflow_run_id_index ON public.workflow_run_waits USING btree (workflow_run_id)" + } + ], + [ + "index", + "workflow_runs_archive_command_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_runs_archive_command_id_index ON public.workflow_runs USING btree (archive_command_id)" + } + ], + [ + "index", + "workflow_runs_archived_at_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_runs_archived_at_index ON public.workflow_runs USING btree (archived_at)" + } + ], + [ + "index", + "workflow_runs_business_key_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_runs_business_key_index ON public.workflow_runs USING btree (business_key)" + } + ], + [ + "index", + "workflow_runs_cancellation_request_command_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_runs_cancellation_request_command_id_index ON public.workflow_runs USING btree (cancellation_request_command_id)" + } + ], + [ + "index", + "workflow_runs_import_dedupe_key_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_runs_import_dedupe_key_index ON public.workflow_runs USING btree (import_dedupe_key)" + } + ], + [ + "index", + "workflow_runs_import_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_runs_import_id_index ON public.workflow_runs USING btree (import_id)" + } + ], + [ + "index", + "workflow_runs_import_source_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_runs_import_source_index ON public.workflow_runs USING btree (import_source)" + } + ], + [ + "index", + "workflow_runs_imported_at_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_runs_imported_at_index ON public.workflow_runs USING btree (imported_at)" + } + ], + [ + "index", + "workflow_runs_namespace_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_runs_namespace_index ON public.workflow_runs USING btree (namespace)" + } + ], + [ + "index", + "workflow_runs_namespace_status_quota_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_runs_namespace_status_quota_idx ON public.workflow_runs USING btree (namespace, status)" + } + ], + [ + "index", + "workflow_runs_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_runs_pkey ON public.workflow_runs USING btree (id)" + } + ], + [ + "index", + "workflow_runs_prom_metrics_queue_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_runs_prom_metrics_queue_idx ON public.workflow_runs USING btree (namespace, queue)" + } + ], + [ + "index", + "workflow_runs_sticky_until_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_runs_sticky_until_index ON public.workflow_runs USING btree (sticky_until)" + } + ], + [ + "index", + "workflow_runs_sticky_worker_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_runs_sticky_worker_id_index ON public.workflow_runs USING btree (sticky_worker_id)" + } + ], + [ + "index", + "workflow_runs_workflow_instance_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_runs_workflow_instance_id_index ON public.workflow_runs USING btree (workflow_instance_id)" + } + ], + [ + "index", + "workflow_runs_workflow_instance_id_run_number_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX workflow_runs_workflow_instance_id_run_number_unique ON public.workflow_runs USING btree (workflow_instance_id, run_number)" + } + ], + [ + "index", + "workflow_schedule_history_events_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_schedule_history_events_pkey ON public.workflow_schedule_history_events USING btree (id)" + } + ], + [ + "index", + "workflow_schedules_latest_workflow_instance_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_schedules_latest_workflow_instance_id_index ON public.workflow_schedules USING btree (latest_workflow_instance_id)" + } + ], + [ + "index", + "workflow_schedules_namespace_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_schedules_namespace_index ON public.workflow_schedules USING btree (namespace)" + } + ], + [ + "index", + "workflow_schedules_namespace_schedule_id_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX workflow_schedules_namespace_schedule_id_unique ON public.workflow_schedules USING btree (namespace, schedule_id)" + } + ], + [ + "index", + "workflow_schedules_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_schedules_pkey ON public.workflow_schedules USING btree (id)" + } + ], + [ + "index", + "workflow_schedules_status_next_fire_at_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_schedules_status_next_fire_at_index ON public.workflow_schedules USING btree (status, next_fire_at)" + } + ], + [ + "index", + "workflow_search_attributes_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_search_attributes_pkey ON public.workflow_search_attributes USING btree (id)" + } + ], + [ + "index", + "workflow_search_attributes_value_bool_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_search_attributes_value_bool_index ON public.workflow_search_attributes USING btree (value_bool)" + } + ], + [ + "index", + "workflow_search_attributes_value_datetime_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_search_attributes_value_datetime_index ON public.workflow_search_attributes USING btree (value_datetime)" + } + ], + [ + "index", + "workflow_search_attributes_value_float_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_search_attributes_value_float_index ON public.workflow_search_attributes USING btree (value_float)" + } + ], + [ + "index", + "workflow_search_attributes_value_int_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_search_attributes_value_int_index ON public.workflow_search_attributes USING btree (value_int)" + } + ], + [ + "index", + "workflow_search_attributes_value_keyword_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_search_attributes_value_keyword_index ON public.workflow_search_attributes USING btree (value_keyword)" + } + ], + [ + "index", + "workflow_search_attributes_workflow_instance_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_search_attributes_workflow_instance_id_index ON public.workflow_search_attributes USING btree (workflow_instance_id)" + } + ], + [ + "index", + "workflow_search_attributes_workflow_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_search_attributes_workflow_run_id_index ON public.workflow_search_attributes USING btree (workflow_run_id)" + } + ], + [ + "index", + "workflow_search_attrs_instance_key_type", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_search_attrs_instance_key_type ON public.workflow_search_attributes USING btree (workflow_instance_id, key, type)" + } + ], + [ + "index", + "workflow_search_attrs_key_bool", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_search_attrs_key_bool ON public.workflow_search_attributes USING btree (key, value_bool)" + } + ], + [ + "index", + "workflow_search_attrs_key_datetime", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_search_attrs_key_datetime ON public.workflow_search_attributes USING btree (key, value_datetime)" + } + ], + [ + "index", + "workflow_search_attrs_key_float", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_search_attrs_key_float ON public.workflow_search_attributes USING btree (key, value_float)" + } + ], + [ + "index", + "workflow_search_attrs_key_int", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_search_attrs_key_int ON public.workflow_search_attributes USING btree (key, value_int)" + } + ], + [ + "index", + "workflow_search_attrs_key_keyword", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_search_attrs_key_keyword ON public.workflow_search_attributes USING btree (key, value_keyword)" + } + ], + [ + "index", + "workflow_search_attrs_run_key_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX workflow_search_attrs_run_key_unique ON public.workflow_search_attributes USING btree (workflow_run_id, key)" + } + ], + [ + "index", + "workflow_service_calls_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_service_calls_pkey ON public.workflow_service_calls USING btree (id)" + } + ], + [ + "index", + "workflow_service_endpoints_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_service_endpoints_pkey ON public.workflow_service_endpoints USING btree (id)" + } + ], + [ + "index", + "workflow_service_operations_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_service_operations_pkey ON public.workflow_service_operations USING btree (id)" + } + ], + [ + "index", + "workflow_services_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_services_pkey ON public.workflow_services USING btree (id)" + } + ], + [ + "index", + "workflow_signal_records_command_sequence_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_signal_records_command_sequence_index ON public.workflow_signal_records USING btree (command_sequence)" + } + ], + [ + "index", + "workflow_signal_records_outcome_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_signal_records_outcome_index ON public.workflow_signal_records USING btree (outcome)" + } + ], + [ + "index", + "workflow_signal_records_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_signal_records_pkey ON public.workflow_signal_records USING btree (id)" + } + ], + [ + "index", + "workflow_signal_records_requested_workflow_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_signal_records_requested_workflow_run_id_index ON public.workflow_signal_records USING btree (requested_workflow_run_id)" + } + ], + [ + "index", + "workflow_signal_records_resolved_workflow_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_signal_records_resolved_workflow_run_id_index ON public.workflow_signal_records USING btree (resolved_workflow_run_id)" + } + ], + [ + "index", + "workflow_signal_records_signal_name_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_signal_records_signal_name_index ON public.workflow_signal_records USING btree (signal_name)" + } + ], + [ + "index", + "workflow_signal_records_signal_wait_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_signal_records_signal_wait_id_index ON public.workflow_signal_records USING btree (signal_wait_id)" + } + ], + [ + "index", + "workflow_signal_records_status_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_signal_records_status_index ON public.workflow_signal_records USING btree (status)" + } + ], + [ + "index", + "workflow_signal_records_workflow_command_id_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX workflow_signal_records_workflow_command_id_unique ON public.workflow_signal_records USING btree (workflow_command_id)" + } + ], + [ + "index", + "workflow_signal_records_workflow_instance_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_signal_records_workflow_instance_id_index ON public.workflow_signal_records USING btree (workflow_instance_id)" + } + ], + [ + "index", + "workflow_signal_records_workflow_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_signal_records_workflow_run_id_index ON public.workflow_signal_records USING btree (workflow_run_id)" + } + ], + [ + "index", + "workflow_signal_records_workflow_sequence_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_signal_records_workflow_sequence_index ON public.workflow_signal_records USING btree (workflow_sequence)" + } + ], + [ + "index", + "workflow_task_poll_cursors_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_task_poll_cursors_pkey ON public.workflow_task_poll_cursors USING btree (namespace, task_queue)" + } + ], + [ + "index", + "workflow_tasks_dispatch_order_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_tasks_dispatch_order_index ON public.workflow_tasks USING btree (queue, status, priority, available_at)" + } + ], + [ + "index", + "workflow_tasks_fairness_class_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_tasks_fairness_class_index ON public.workflow_tasks USING btree (queue, status, fairness_key)" + } + ], + [ + "index", + "workflow_tasks_namespace_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_tasks_namespace_index ON public.workflow_tasks USING btree (namespace)" + } + ], + [ + "index", + "workflow_tasks_namespace_queue_status_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_tasks_namespace_queue_status_idx ON public.workflow_tasks USING btree (namespace, queue, status)" + } + ], + [ + "index", + "workflow_tasks_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_tasks_pkey ON public.workflow_tasks USING btree (id)" + } + ], + [ + "index", + "workflow_tasks_prom_metrics_queue_idx", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_tasks_prom_metrics_queue_idx ON public.workflow_tasks USING btree (namespace, queue)" + } + ], + [ + "index", + "workflow_tasks_status_available_at_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_tasks_status_available_at_index ON public.workflow_tasks USING btree (status, available_at)" + } + ], + [ + "index", + "workflow_tasks_sticky_claimed_at_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_tasks_sticky_claimed_at_index ON public.workflow_tasks USING btree (sticky_claimed_at)" + } + ], + [ + "index", + "workflow_tasks_sticky_replay_mode_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_tasks_sticky_replay_mode_index ON public.workflow_tasks USING btree (sticky_replay_mode)" + } + ], + [ + "index", + "workflow_tasks_sticky_until_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_tasks_sticky_until_index ON public.workflow_tasks USING btree (sticky_until)" + } + ], + [ + "index", + "workflow_tasks_sticky_worker_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_tasks_sticky_worker_id_index ON public.workflow_tasks USING btree (sticky_worker_id)" + } + ], + [ + "index", + "workflow_tasks_workflow_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_tasks_workflow_run_id_index ON public.workflow_tasks USING btree (workflow_run_id)" + } + ], + [ + "index", + "workflow_update_validation_poll_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_update_validation_poll_index ON public.workflow_update_validation_tasks USING btree (namespace, task_queue, status, created_at)" + } + ], + [ + "index", + "workflow_update_validation_tasks_compatibility_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_update_validation_tasks_compatibility_index ON public.workflow_update_validation_tasks USING btree (compatibility)" + } + ], + [ + "index", + "workflow_update_validation_tasks_idempotency_key_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX workflow_update_validation_tasks_idempotency_key_unique ON public.workflow_update_validation_tasks USING btree (idempotency_key)" + } + ], + [ + "index", + "workflow_update_validation_tasks_lease_expires_at_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_update_validation_tasks_lease_expires_at_index ON public.workflow_update_validation_tasks USING btree (lease_expires_at)" + } + ], + [ + "index", + "workflow_update_validation_tasks_lease_owner_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_update_validation_tasks_lease_owner_index ON public.workflow_update_validation_tasks USING btree (lease_owner)" + } + ], + [ + "index", + "workflow_update_validation_tasks_namespace_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_update_validation_tasks_namespace_index ON public.workflow_update_validation_tasks USING btree (namespace)" + } + ], + [ + "index", + "workflow_update_validation_tasks_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_update_validation_tasks_pkey ON public.workflow_update_validation_tasks USING btree (id)" + } + ], + [ + "index", + "workflow_update_validation_tasks_status_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_update_validation_tasks_status_index ON public.workflow_update_validation_tasks USING btree (status)" + } + ], + [ + "index", + "workflow_update_validation_tasks_task_queue_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_update_validation_tasks_task_queue_index ON public.workflow_update_validation_tasks USING btree (task_queue)" + } + ], + [ + "index", + "workflow_update_validation_tasks_update_name_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_update_validation_tasks_update_name_index ON public.workflow_update_validation_tasks USING btree (update_name)" + } + ], + [ + "index", + "workflow_update_validation_tasks_workflow_instance_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_update_validation_tasks_workflow_instance_id_index ON public.workflow_update_validation_tasks USING btree (workflow_instance_id)" + } + ], + [ + "index", + "workflow_update_validation_tasks_workflow_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_update_validation_tasks_workflow_run_id_index ON public.workflow_update_validation_tasks USING btree (workflow_run_id)" + } + ], + [ + "index", + "workflow_update_validation_tasks_workflow_type_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_update_validation_tasks_workflow_type_index ON public.workflow_update_validation_tasks USING btree (workflow_type)" + } + ], + [ + "index", + "workflow_updates_command_sequence_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_updates_command_sequence_index ON public.workflow_updates USING btree (command_sequence)" + } + ], + [ + "index", + "workflow_updates_failure_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_updates_failure_id_index ON public.workflow_updates USING btree (failure_id)" + } + ], + [ + "index", + "workflow_updates_outcome_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_updates_outcome_index ON public.workflow_updates USING btree (outcome)" + } + ], + [ + "index", + "workflow_updates_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_updates_pkey ON public.workflow_updates USING btree (id)" + } + ], + [ + "index", + "workflow_updates_requested_workflow_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_updates_requested_workflow_run_id_index ON public.workflow_updates USING btree (requested_workflow_run_id)" + } + ], + [ + "index", + "workflow_updates_resolved_workflow_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_updates_resolved_workflow_run_id_index ON public.workflow_updates USING btree (resolved_workflow_run_id)" + } + ], + [ + "index", + "workflow_updates_status_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_updates_status_index ON public.workflow_updates USING btree (status)" + } + ], + [ + "index", + "workflow_updates_update_name_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_updates_update_name_index ON public.workflow_updates USING btree (update_name)" + } + ], + [ + "index", + "workflow_updates_workflow_command_id_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX workflow_updates_workflow_command_id_unique ON public.workflow_updates USING btree (workflow_command_id)" + } + ], + [ + "index", + "workflow_updates_workflow_instance_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_updates_workflow_instance_id_index ON public.workflow_updates USING btree (workflow_instance_id)" + } + ], + [ + "index", + "workflow_updates_workflow_run_id_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_updates_workflow_run_id_index ON public.workflow_updates USING btree (workflow_run_id)" + } + ], + [ + "index", + "workflow_updates_workflow_sequence_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_updates_workflow_sequence_index ON public.workflow_updates USING btree (workflow_sequence)" + } + ], + [ + "index", + "workflow_worker_build_id_rollouts_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_worker_build_id_rollouts_pkey ON public.workflow_worker_build_id_rollouts USING btree (id)" + } + ], + [ + "index", + "workflow_worker_compatibility_heartbeats_connection_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_worker_compatibility_heartbeats_connection_index ON public.workflow_worker_compatibility_heartbeats USING btree (connection)" + } + ], + [ + "index", + "workflow_worker_compatibility_heartbeats_expires_at_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_worker_compatibility_heartbeats_expires_at_index ON public.workflow_worker_compatibility_heartbeats USING btree (expires_at)" + } + ], + [ + "index", + "workflow_worker_compatibility_heartbeats_namespace_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_worker_compatibility_heartbeats_namespace_index ON public.workflow_worker_compatibility_heartbeats USING btree (namespace)" + } + ], + [ + "index", + "workflow_worker_compatibility_heartbeats_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_worker_compatibility_heartbeats_pkey ON public.workflow_worker_compatibility_heartbeats USING btree (id)" + } + ], + [ + "index", + "workflow_worker_compatibility_heartbeats_queue_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_worker_compatibility_heartbeats_queue_index ON public.workflow_worker_compatibility_heartbeats USING btree (queue)" + } + ], + [ + "index", + "workflow_worker_compatibility_heartbeats_scope_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX workflow_worker_compatibility_heartbeats_scope_unique ON public.workflow_worker_compatibility_heartbeats USING btree (worker_id, scope_key)" + } + ], + [ + "index", + "workflow_worker_registrations_namespace_task_queue_status_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_worker_registrations_namespace_task_queue_status_index ON public.workflow_worker_registrations USING btree (namespace, task_queue, status)" + } + ], + [ + "index", + "workflow_worker_registrations_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_worker_registrations_pkey ON public.workflow_worker_registrations USING btree (id)" + } + ], + [ + "index", + "workflow_worker_registrations_worker_id_namespace_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX workflow_worker_registrations_worker_id_namespace_unique ON public.workflow_worker_registrations USING btree (worker_id, namespace)" + } + ], + [ + "index", + "workflow_worker_sessions_namespace_lease_owner_status_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_worker_sessions_namespace_lease_owner_status_index ON public.workflow_worker_sessions USING btree (namespace, lease_owner, status)" + } + ], + [ + "index", + "workflow_worker_sessions_namespace_queue_status_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_worker_sessions_namespace_queue_status_index ON public.workflow_worker_sessions USING btree (namespace, queue, status)" + } + ], + [ + "index", + "workflow_worker_sessions_namespace_session_id_unique", + { + "ready": true, + "valid": true, + "unique": true, + "primary": false, + "definition": "CREATE UNIQUE INDEX workflow_worker_sessions_namespace_session_id_unique ON public.workflow_worker_sessions USING btree (namespace, session_id)" + } + ], + [ + "index", + "workflow_worker_sessions_namespace_status_index", + { + "ready": true, + "valid": true, + "unique": false, + "primary": false, + "definition": "CREATE INDEX workflow_worker_sessions_namespace_status_index ON public.workflow_worker_sessions USING btree (namespace, status)" + } + ], + [ + "index", + "workflow_worker_sessions_pkey", + { + "ready": true, + "valid": true, + "unique": true, + "primary": true, + "definition": "CREATE UNIQUE INDEX workflow_worker_sessions_pkey ON public.workflow_worker_sessions USING btree (id)" + } + ], + [ + "relation", + "_sqlx_migrations", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "activity_attempts", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "activity_executions", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "dw_command_intents", + { + "access_method": "heap", + "force_row_security": false, + "kind": "r", + "options": null, + "partition": false, + "partition_key": null, + "persistence": "p", + "row_security": false, + "view": null + } + ], + [ + "relation", + "dw_external_payload_deletions", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "dw_poll_receipts", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "dw_query_cache", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "dw_run_command_contracts", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "dw_server_schema", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "dw_service_admission_counters", + { + "access_method": "heap", + "force_row_security": false, + "kind": "r", + "options": null, + "partition": false, + "partition_key": null, + "persistence": "p", + "row_security": false, + "view": null + } + ], + [ + "relation", + "dw_service_call_deadlines", + { + "access_method": "heap", + "force_row_security": false, + "kind": "r", + "options": null, + "partition": false, + "partition_key": null, + "persistence": "p", + "row_security": false, + "view": null + } + ], + [ + "relation", + "dw_stream_reclaims", + { + "access_method": "heap", + "force_row_security": false, + "kind": "r", + "options": null, + "partition": false, + "partition_key": null, + "persistence": "p", + "row_security": false, + "view": null + } + ], + [ + "relation", + "dw_task_completions", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "dw_task_queue_pauses", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "dw_worker_registration_incarnations", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "dw_worker_session_holders", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "failed_jobs", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "failed_jobs_id_seq", + { + "kind": "S", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": null, + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "jobs", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "jobs_id_seq", + { + "kind": "S", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": null, + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "migrations", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "migrations_id_seq", + { + "kind": "S", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": null, + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "runtime_credentials", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "runtime_external_payload_backup_hold", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "runtime_external_payload_cleanup_stats", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "runtime_external_payload_object_locks", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "runtime_external_payloads", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "runtime_payload_completion_budgets", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "search_attribute_definitions", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "search_attribute_definitions_id_seq", + { + "kind": "S", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": null, + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_child_calls", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_child_calls_id_seq", + { + "kind": "S", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": null, + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_child_projection_repairs", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_commands", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_durable_stream_items", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_durable_stream_items_id_seq", + { + "kind": "S", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": null, + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_durable_streams", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_durable_streams_id_seq", + { + "kind": "S", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": null, + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_failures", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_history_events", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_inbound_stream_items", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_inbound_stream_items_id_seq", + { + "kind": "S", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": null, + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_inbound_streams", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_inbound_streams_id_seq", + { + "kind": "S", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": null, + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_instances", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_links", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_memos", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_memos_id_seq", + { + "kind": "S", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": null, + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_messages", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_messages_id_seq", + { + "kind": "S", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": null, + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_namespaces", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_namespaces_id_seq", + { + "kind": "S", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": null, + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_run_lineage_entries", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_run_summaries", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_run_timeline_entries", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_run_timer_entries", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_run_timers", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_run_waits", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_runs", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_schedule_history_events", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_schedules", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_search_attributes", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_search_attributes_id_seq", + { + "kind": "S", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": null, + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_service_calls", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_service_endpoints", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_service_operations", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_services", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_signal_records", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_task_poll_cursors", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_tasks", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_update_validation_tasks", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_updates", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_worker_build_id_rollouts", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_worker_build_id_rollouts_id_seq", + { + "kind": "S", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": null, + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_worker_compatibility_heartbeats", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_worker_compatibility_heartbeats_id_seq", + { + "kind": "S", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": null, + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_worker_registrations", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_worker_registrations_id_seq", + { + "kind": "S", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": null, + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_worker_sessions", + { + "kind": "r", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": "heap", + "partition_key": null, + "force_row_security": false + } + ], + [ + "relation", + "workflow_worker_sessions_id_seq", + { + "kind": "S", + "view": null, + "options": null, + "partition": false, + "persistence": "p", + "row_security": false, + "access_method": null, + "partition_key": null, + "force_row_security": false + } + ], + [ + "sequence", + "failed_jobs_id_seq", + { + "max": 9223372036854775807, + "min": 1, + "type": "bigint", + "cache": 1, + "cycle": false, + "start": 1, + "owned_by": "failed_jobs.id", + "increment": 1 + } + ], + [ + "sequence", + "jobs_id_seq", + { + "max": 9223372036854775807, + "min": 1, + "type": "bigint", + "cache": 1, + "cycle": false, + "start": 1, + "owned_by": "jobs.id", + "increment": 1 + } + ], + [ + "sequence", + "migrations_id_seq", + { + "max": 2147483647, + "min": 1, + "type": "integer", + "cache": 1, + "cycle": false, + "start": 1, + "owned_by": "migrations.id", + "increment": 1 + } + ], + [ + "sequence", + "search_attribute_definitions_id_seq", + { + "max": 9223372036854775807, + "min": 1, + "type": "bigint", + "cache": 1, + "cycle": false, + "start": 1, + "owned_by": "search_attribute_definitions.id", + "increment": 1 + } + ], + [ + "sequence", + "workflow_child_calls_id_seq", + { + "max": 9223372036854775807, + "min": 1, + "type": "bigint", + "cache": 1, + "cycle": false, + "start": 1, + "owned_by": "workflow_child_calls.id", + "increment": 1 + } + ], + [ + "sequence", + "workflow_durable_stream_items_id_seq", + { + "max": 9223372036854775807, + "min": 1, + "type": "bigint", + "cache": 1, + "cycle": false, + "start": 1, + "owned_by": "workflow_durable_stream_items.id", + "increment": 1 + } + ], + [ + "sequence", + "workflow_durable_streams_id_seq", + { + "max": 9223372036854775807, + "min": 1, + "type": "bigint", + "cache": 1, + "cycle": false, + "start": 1, + "owned_by": "workflow_durable_streams.id", + "increment": 1 + } + ], + [ + "sequence", + "workflow_inbound_stream_items_id_seq", + { + "max": 9223372036854775807, + "min": 1, + "type": "bigint", + "cache": 1, + "cycle": false, + "start": 1, + "owned_by": "workflow_inbound_stream_items.id", + "increment": 1 + } + ], + [ + "sequence", + "workflow_inbound_streams_id_seq", + { + "max": 9223372036854775807, + "min": 1, + "type": "bigint", + "cache": 1, + "cycle": false, + "start": 1, + "owned_by": "workflow_inbound_streams.id", + "increment": 1 + } + ], + [ + "sequence", + "workflow_memos_id_seq", + { + "max": 9223372036854775807, + "min": 1, + "type": "bigint", + "cache": 1, + "cycle": false, + "start": 1, + "owned_by": "workflow_memos.id", + "increment": 1 + } + ], + [ + "sequence", + "workflow_messages_id_seq", + { + "max": 9223372036854775807, + "min": 1, + "type": "bigint", + "cache": 1, + "cycle": false, + "start": 1, + "owned_by": "workflow_messages.id", + "increment": 1 + } + ], + [ + "sequence", + "workflow_namespaces_id_seq", + { + "max": 9223372036854775807, + "min": 1, + "type": "bigint", + "cache": 1, + "cycle": false, + "start": 1, + "owned_by": "workflow_namespaces.id", + "increment": 1 + } + ], + [ + "sequence", + "workflow_search_attributes_id_seq", + { + "max": 9223372036854775807, + "min": 1, + "type": "bigint", + "cache": 1, + "cycle": false, + "start": 1, + "owned_by": "workflow_search_attributes.id", + "increment": 1 + } + ], + [ + "sequence", + "workflow_worker_build_id_rollouts_id_seq", + { + "max": 9223372036854775807, + "min": 1, + "type": "bigint", + "cache": 1, + "cycle": false, + "start": 1, + "owned_by": "workflow_worker_build_id_rollouts.id", + "increment": 1 + } + ], + [ + "sequence", + "workflow_worker_compatibility_heartbeats_id_seq", + { + "max": 9223372036854775807, + "min": 1, + "type": "bigint", + "cache": 1, + "cycle": false, + "start": 1, + "owned_by": "workflow_worker_compatibility_heartbeats.id", + "increment": 1 + } + ], + [ + "sequence", + "workflow_worker_registrations_id_seq", + { + "max": 9223372036854775807, + "min": 1, + "type": "bigint", + "cache": 1, + "cycle": false, + "start": 1, + "owned_by": "workflow_worker_registrations.id", + "increment": 1 + } + ], + [ + "sequence", + "workflow_worker_sessions_id_seq", + { + "max": 9223372036854775807, + "min": 1, + "type": "bigint", + "cache": 1, + "cycle": false, + "start": 1, + "owned_by": "workflow_worker_sessions.id", + "increment": 1 + } + ] +] diff --git a/rust/migrations/postgres/0015_schedule_dispatch_summary.sql b/rust/migrations/postgres/0015_schedule_dispatch_summary.sql new file mode 100644 index 000000000..946ac4c7a --- /dev/null +++ b/rust/migrations/postgres/0015_schedule_dispatch_summary.sql @@ -0,0 +1,3 @@ +-- Bounded atomic dispatch authority. Legacy schedules remain unknown. +ALTER TABLE public.workflow_schedules ADD COLUMN dispatch_summary TEXT NULL; +UPDATE public.dw_server_schema SET version=15 WHERE engine='rust-development'; diff --git a/rust/migrations/sqlite/0014_schedule_dispatch_summary.sql b/rust/migrations/sqlite/0014_schedule_dispatch_summary.sql new file mode 100644 index 000000000..09f93bdb9 --- /dev/null +++ b/rust/migrations/sqlite/0014_schedule_dispatch_summary.sql @@ -0,0 +1,3 @@ +-- Bounded atomic dispatch authority. Legacy schedules remain unknown. +ALTER TABLE workflow_schedules ADD COLUMN dispatch_summary TEXT NULL; +UPDATE dw_server_schema SET version=14 WHERE engine='rust-development'; diff --git a/rust/src/runtime/mod.rs b/rust/src/runtime/mod.rs index 1aadd8149..f016ce89a 100644 --- a/rust/src/runtime/mod.rs +++ b/rust/src/runtime/mod.rs @@ -138,6 +138,7 @@ mod schedule_backfill; #[cfg(test)] mod schedule_burst_tests; mod schedule_execution; +mod schedule_dispatch_summary; mod schedule_http; mod run_diagnostics; mod task_queue_build_ids; diff --git a/rust/src/runtime/mysql.rs b/rust/src/runtime/mysql.rs index 2f1d3c0af..7f6f8b575 100644 --- a/rust/src/runtime/mysql.rs +++ b/rust/src/runtime/mysql.rs @@ -14,8 +14,8 @@ use std::{collections::BTreeMap, sync::OnceLock, time::Duration}; /// at 12. Each then adds task queue pauses (server#577): MySQL 14, MariaDB /// 13, and keyed command intents (server#934): MySQL 15, MariaDB 14. /// `Flavor::version` selects the one a server needs. -pub const MYSQL_VERSION: i64 = 15; -pub const MARIADB_VERSION: i64 = 14; +pub const MYSQL_VERSION: i64 = 16; +pub const MARIADB_VERSION: i64 = 15; type Catalog = Vec<(String, String)>; pub const MARKER_SQL: &str = "CREATE TABLE dw_server_schema (engine VARCHAR(64) NOT NULL PRIMARY KEY,version BIGINT NOT NULL,bootstrap_checksum VARBINARY(48) NOT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin"; @@ -72,7 +72,7 @@ impl Flavor { "\n", include_str!("../../migrations/mysql/0014_task_queue_pauses.sql"), "\n", - include_str!("../../migrations/mysql/0015_command_intents.sql") + include_str!("../../migrations/mysql/0015_command_intents.sql"), "\n", include_str!("../../migrations/mysql/0016_schedule_dispatch_summary.sql") ), ), Self::MariaDb => ( @@ -100,14 +100,14 @@ impl Flavor { "\n", include_str!("../../migrations/mariadb/0013_task_queue_pauses.sql"), "\n", - include_str!("../../migrations/mariadb/0014_command_intents.sql") + include_str!("../../migrations/mariadb/0014_command_intents.sql"), "\n", include_str!("../../migrations/mariadb/0015_schedule_dispatch_summary.sql") ), ), }; slot.get_or_init(|| { let description = match self { - Self::MySql => "full frozen PHP schema, native worker incarnations, session holders, stream reclaim deadlines, service call deadlines, service admission counters and committed external payload deletions and task ready origins and poll expiry indexes and scoped dispatch index and bound run command contracts and exact JSON text documents and task queue activity dispatch pauses and keyed command intents", - Self::MariaDb => "full frozen PHP schema, native worker incarnations, session holders, stream reclaim deadlines, service call deadlines, service admission counters and committed external payload deletions and task ready origins and poll expiry indexes and scoped dispatch index and bound run command contracts and task queue activity dispatch pauses and keyed command intents", + Self::MySql => "full frozen PHP schema, native worker incarnations, session holders, stream reclaim deadlines, service call deadlines, service admission counters and committed external payload deletions and task ready origins and poll expiry indexes and scoped dispatch index and bound run command contracts and exact JSON text documents and task queue activity dispatch pauses and keyed command intents and bounded schedule dispatch summaries", + Self::MariaDb => "full frozen PHP schema, native worker incarnations, session holders, stream reclaim deadlines, service call deadlines, service admission counters and committed external payload deletions and task ready origins and poll expiry indexes and scoped dispatch index and bound run command contracts and task queue activity dispatch pauses and keyed command intents and bounded schedule dispatch summaries", }; let mut migrations = Migrator::with_migrations(vec![Migration::new( self.version(), @@ -130,8 +130,8 @@ impl Flavor { } fn expected(self) -> Result { Ok(serde_json::from_str(&canonical(match self { - Self::MySql => include_str!("../../migrations/mysql/0015_catalog.json"), - Self::MariaDb => include_str!("../../migrations/mariadb/0014_catalog.json"), + Self::MySql => include_str!("../../migrations/mysql/0016_catalog.json"), + Self::MariaDb => include_str!("../../migrations/mariadb/0015_catalog.json"), }))?) } /// The single native migration, which a takeover records as applied. @@ -234,7 +234,63 @@ impl Flavor { Migration::new(version, description.into(), MigrationType::Simple, sql.into_sql_str(), false) }) }; + static DISPATCH_MYSQL: OnceLock = OnceLock::new(); + static DISPATCH_MARIADB: OnceLock = OnceLock::new(); match (self, version) { + (Self::MariaDb, 14) => Some((DISPATCH_MARIADB.get_or_init(|| Migration::new(14, "full frozen PHP schema, native worker incarnations, session holders, stream reclaim deadlines, service call deadlines, service admission counters and committed external payload deletions and task ready origins and poll expiry indexes and scoped dispatch index and bound run command contracts and task queue activity dispatch pauses and keyed command intents".into(), MigrationType::Simple, AssertSqlSafe(self.bootstrap_sql(concat!( + include_str!("../../migrations/mariadb/0003_full_schema.sql"), + "\n", + include_str!("../../migrations/mariadb/0004_worker_incarnations.sql"), + "\n", + include_str!("../../migrations/mariadb/0005_worker_session_holders.sql"), + "\n", + include_str!("../../migrations/mariadb/0006_stream_reclaims.sql"), + "\n", + include_str!("../../migrations/mariadb/0007_service_calls.sql"), + "\n", + include_str!("../../migrations/mariadb/0008_external_payload_deletions.sql"), + "\n", + include_str!("../../migrations/mariadb/0009_task_ready_origin.sql"), + "\n", + include_str!("../../migrations/mariadb/0010_poll_expiry_indexes.sql"), + "\n", + include_str!("../../migrations/mariadb/0011_scoped_dispatch_index.sql"), + "\n", + include_str!("../../migrations/mariadb/0012_run_command_contracts.sql"), + "\n", + include_str!("../../migrations/mariadb/0013_task_queue_pauses.sql"), + "\n", + include_str!("../../migrations/mariadb/0014_command_intents.sql") + ))).into_sql_str(), false)), include_str!("../../migrations/mariadb/0014_catalog.json"))), + + (Self::MySql, 15) => Some((DISPATCH_MYSQL.get_or_init(|| Migration::new(15, "full frozen PHP schema, native worker incarnations, session holders, stream reclaim deadlines, service call deadlines, service admission counters and committed external payload deletions and task ready origins and poll expiry indexes and scoped dispatch index and bound run command contracts and exact JSON text documents and task queue activity dispatch pauses and keyed command intents".into(), MigrationType::Simple, AssertSqlSafe(self.bootstrap_sql(concat!( + include_str!("../../migrations/mysql/0003_full_schema.sql"), + "\n", + include_str!("../../migrations/mysql/0004_worker_incarnations.sql"), + "\n", + include_str!("../../migrations/mysql/0005_worker_session_holders.sql"), + "\n", + include_str!("../../migrations/mysql/0006_stream_reclaims.sql"), + "\n", + include_str!("../../migrations/mysql/0007_service_calls.sql"), + "\n", + include_str!("../../migrations/mysql/0008_external_payload_deletions.sql"), + "\n", + include_str!("../../migrations/mysql/0009_task_ready_origin.sql"), + "\n", + include_str!("../../migrations/mysql/0010_poll_expiry_indexes.sql"), + "\n", + include_str!("../../migrations/mysql/0011_scoped_dispatch_index.sql"), + "\n", + include_str!("../../migrations/mysql/0012_run_command_contracts.sql"), + "\n", + include_str!("../../migrations/mysql/0013_json_text.sql"), + "\n", + include_str!("../../migrations/mysql/0014_task_queue_pauses.sql"), + "\n", + include_str!("../../migrations/mysql/0015_command_intents.sql") + ))).into_sql_str(), false)), include_str!("../../migrations/mysql/0015_catalog.json"))), + (Self::MySql, 14) => Some(( MYSQL_14.get_or_init(|| Migration::new( 14, @@ -604,6 +660,8 @@ impl Flavor { (Self::MariaDb, 12) => Some(include_str!("../../migrations/mariadb/0013_task_queue_pauses.sql")), (Self::MySql, 14) => Some(include_str!("../../migrations/mysql/0015_command_intents.sql")), (Self::MariaDb, 13) => Some(include_str!("../../migrations/mariadb/0014_command_intents.sql")), + (Self::MySql, 15) => Some(include_str!("../../migrations/mysql/0016_schedule_dispatch_summary.sql")), + (Self::MariaDb, 14) => Some(include_str!("../../migrations/mariadb/0015_schedule_dispatch_summary.sql")), _ => None, } } @@ -655,13 +713,26 @@ impl Flavor { /// version 13 creates each JSON document column as exact text directly, /// as its upgrade ALTERs it. fn bootstrap_sql(self, sql: &str) -> String { - match self { + let sql = match self { Self::MySql => json_text_bootstrap_sql(&bootstrap_sql_v11(sql)), Self::MariaDb => bootstrap_sql_v11(sql), - } + }; + dispatch_summary_bootstrap_sql(sql) } } +/// Fresh initialization can resume after any implicit DDL commit. Create the +/// final schedule table directly so a resumed bootstrap never repeats ALTER. +/// Retained predecessor bootstraps do not contain this new step and stay exact. +fn dispatch_summary_bootstrap_sql(mut sql: String) -> String { + let alter = "ALTER TABLE workflow_schedules ADD COLUMN dispatch_summary TEXT NULL;"; + if !sql.contains(alter) { return sql; } + let start = sql.find("CREATE TABLE IF NOT EXISTS `workflow_schedules` (").expect("compiled schedule table"); + let end = start + sql[start..].find(" PRIMARY KEY").expect("compiled schedule primary key"); + sql.insert_str(end, " `dispatch_summary` text DEFAULT NULL,\n"); + sql.replace(alter, "") +} + /// The exact text definition and enforced check for each MySQL `json` /// column (server#1016). The constraint name is `dw_json_text_` and the first /// 20 hex digits of SHA-256 over table, NUL and column. @@ -780,6 +851,29 @@ pub(super) async fn ensure_command_intents(connection: &mut MySqlConnection, fla ensure_native_table(connection, flavor, command_intents_step(flavor), "dw_command_intents").await } +fn dispatch_summary_step(flavor: Flavor) -> i64 { + match flavor { Flavor::MySql => 15, Flavor::MariaDb => 14 } +} + +/// ALTER TABLE commits independently. Resumption admits the complete old or +/// new table definition, and verifies the resulting table before proceeding. +pub(super) async fn ensure_dispatch_summary(connection: &mut MySqlConnection, flavor: Flavor) -> Result<()> { + let table = |rows: Catalog| rows.into_iter().find(|(name, _)| name == "workflow_schedules"); + let found = table(catalog(connection).await?); + let expected = table(flavor.expected()?); + if found == expected { return Ok(()); } + let step = dispatch_summary_step(flavor); + let (_, old) = flavor.earlier(step).expect("retained dispatch predecessor"); + if found != table(serde_json::from_str(&canonical(old))?) { + return Err(refuse(StatusCode::CONFLICT, "native_schema_catalog_mismatch")); + } + connection.execute(flavor.step(step).expect("compiled dispatch summary step")).await?; + if table(catalog(connection).await?) != expected { + return Err(refuse(StatusCode::CONFLICT, "native_schema_catalog_mismatch")); + } + Ok(()) +} + /// An implicit-commit step may already have committed before interruption. /// Accept only the exact old or exact new task table, never a column-name probe. pub(super) async fn ensure_ready_origin(connection: &mut MySqlConnection, flavor: Flavor) -> Result<()> { @@ -1303,6 +1397,10 @@ pub(super) async fn upgrade(connect_options: MySqlConnectOptions) -> Result<(&'s // Each step's own marker update names the development engine, so it // changes nothing while the marker fences the upgrade. for version in from..flavor.version() { + if version == dispatch_summary_step(flavor) { + ensure_dispatch_summary(&mut connection, flavor).await?; + continue; + } if version == task_queue_pauses_step(flavor) { ensure_task_queue_pauses(&mut connection, flavor).await?; continue; @@ -1802,6 +1900,7 @@ mod tests { let db=Database::new().await; let store=super::super::store::Store::new(MySqlStorage::open(db.options.clone()).await.unwrap().into_pool()); store.qualify_schedule_list_summary().await; + store.qualify_schedule_dispatch_summary().await; store.close().await; db.remove().await; } @@ -2915,7 +3014,7 @@ mod tests { assert_eq!(checksum_hex(Flavor::MariaDb.earlier(12).unwrap().0), include_str!("../../migrations/mariadb/0012_checksum.txt").trim()); let sql: &str = Flavor::MySql.migration().sql.as_ref(); - assert_eq!(Flavor::MySql.version(), 15); + assert_eq!(Flavor::MySql.version(), 16); assert!(!sql.contains("ALTER TABLE `activity_executions`"), "upgrade ALTERs are folded into the bootstrap"); assert!(!regex_lite::Regex::new(r"(?i)`?\w+`? json( |,)").unwrap().is_match(sql), "no json column remains"); assert_eq!(sql.matches("CHECK (json_valid(").count(), 75); @@ -3089,12 +3188,12 @@ mod tests { #[test] fn command_intent_bootstraps_keep_the_previous_checksums() { // server#934: MySQL 14 and MariaDB 13 stay byte for byte the released - // bootstraps; the current ones add only the command intent table. + // bootstraps; the command-intent step adds only its own table. assert_eq!(checksum_hex(Flavor::MySql.earlier(14).unwrap().0), include_str!("../../migrations/mysql/0014_checksum.txt").trim()); assert_eq!(checksum_hex(Flavor::MariaDb.earlier(13).unwrap().0), include_str!("../../migrations/mariadb/0013_checksum.txt").trim()); - assert_eq!((Flavor::MySql.version(), Flavor::MariaDb.version()), (15, 14)); + assert_eq!((Flavor::MySql.version(), Flavor::MariaDb.version()), (16, 15)); for flavor in [Flavor::MySql, Flavor::MariaDb] { let sql: &str = flavor.migration().sql.as_ref(); assert_eq!(sql.matches("CREATE TABLE IF NOT EXISTS dw_command_intents (").count(), 1); @@ -3104,6 +3203,19 @@ mod tests { } } + #[test] + fn dispatch_summary_bootstraps_create_final_tables_without_repeated_alters() { + for flavor in [Flavor::MySql, Flavor::MariaDb] { + let current: &str = flavor.migration().sql.as_ref(); + assert_eq!(current.matches("`dispatch_summary` text DEFAULT NULL").count(), 1); + assert!(!current.contains("ALTER TABLE workflow_schedules ADD COLUMN dispatch_summary")); + let previous: &str = flavor.earlier(dispatch_summary_step(flavor)).unwrap().0.sql.as_ref(); + assert!(!previous.contains("dispatch_summary")); + assert_eq!(dispatch_summary_bootstrap_sql(previous.to_owned()), previous); + assert!(flavor.step(dispatch_summary_step(flavor)).unwrap().contains("ALTER TABLE workflow_schedules")); + } + } + #[test] fn task_queue_pause_bootstraps_keep_the_previous_checksums() { // server#577: MySQL 13 and MariaDB 12 stay byte for byte the released diff --git a/rust/src/runtime/postgres.rs b/rust/src/runtime/postgres.rs index 095d3fd63..d5e13764c 100644 --- a/rust/src/runtime/postgres.rs +++ b/rust/src/runtime/postgres.rs @@ -13,7 +13,7 @@ use sqlx::{ use super::{Result, refuse}; -pub const VERSION: i64 = 14; +pub const VERSION: i64 = 15; pub const CATALOG_QUERY: &str = include_str!("postgres-catalog.sql"); type Catalog = Vec<(String, String, Json)>; @@ -53,7 +53,7 @@ fn migrator() -> &'static Migrator { MIGRATOR.get_or_init(|| { let mut migrations = Migrator::with_migrations(vec![Migration::new( VERSION, - "full frozen PHP PostgreSQL schema, native worker incarnations, session holders, stream reclaim deadlines, service call deadlines, service admission counters and committed external payload deletions and task ready origins and poll expiry indexes and scoped dispatch index and bound run command contracts and task queue activity dispatch pauses and keyed command intents".into(), + "full frozen PHP PostgreSQL schema, native worker incarnations, session holders, stream reclaim deadlines, service call deadlines, service admission counters and committed external payload deletions and task ready origins and poll expiry indexes and scoped dispatch index and bound run command contracts and task queue activity dispatch pauses and keyed command intents and bounded schedule dispatch summaries".into(), MigrationType::Simple, concat!( include_str!("../../migrations/postgres/0003_full_schema.sql"), @@ -78,7 +78,7 @@ fn migrator() -> &'static Migrator { "\n", include_str!("../../migrations/postgres/0013_task_queue_pauses.sql"), "\n", - include_str!("../../migrations/postgres/0014_command_intents.sql") + include_str!("../../migrations/postgres/0014_command_intents.sql"), "\n", include_str!("../../migrations/postgres/0015_schedule_dispatch_summary.sql") ) .into_sql_str(), false, @@ -106,7 +106,41 @@ fn earlier_migration(version: i64) -> Option<(&'static Migration, &'static str)> static V11: OnceLock = OnceLock::new(); static V12: OnceLock = OnceLock::new(); static V13: OnceLock = OnceLock::new(); + static V14: OnceLock = OnceLock::new(); match version { + 14 => Some((V14.get_or_init(|| Migration::new( + 14, + "full frozen PHP PostgreSQL schema, native worker incarnations, session holders, stream reclaim deadlines, service call deadlines, service admission counters and committed external payload deletions and task ready origins and poll expiry indexes and scoped dispatch index and bound run command contracts and task queue activity dispatch pauses and keyed command intents".into(), + MigrationType::Simple, + concat!( + include_str!("../../migrations/postgres/0003_full_schema.sql"), + "\n", + include_str!("../../migrations/postgres/0004_worker_incarnations.sql"), + "\n", + include_str!("../../migrations/postgres/0005_worker_session_holders.sql"), + "\n", + include_str!("../../migrations/postgres/0006_stream_reclaims.sql"), + "\n", + include_str!("../../migrations/postgres/0007_service_calls.sql"), + "\n", + include_str!("../../migrations/postgres/0008_external_payload_deletions.sql"), + "\n", + include_str!("../../migrations/postgres/0009_task_ready_origin.sql"), + "\n", + include_str!("../../migrations/postgres/0010_poll_expiry_indexes.sql"), + "\n", + include_str!("../../migrations/postgres/0011_scoped_dispatch_index.sql"), + "\n", + include_str!("../../migrations/postgres/0012_run_command_contracts.sql"), + "\n", + include_str!("../../migrations/postgres/0013_task_queue_pauses.sql"), + "\n", + include_str!("../../migrations/postgres/0014_command_intents.sql") + ) + .into_sql_str(), + false, + )), include_str!("../../migrations/postgres/0014_catalog.json"))), + 13 => Some((V13.get_or_init(|| Migration::new(13, "full frozen PHP PostgreSQL schema, native worker incarnations, session holders, stream reclaim deadlines, service call deadlines, service admission counters and committed external payload deletions and task ready origins and poll expiry indexes and scoped dispatch index and bound run command contracts and task queue activity dispatch pauses".into(), MigrationType::Simple, @@ -280,6 +314,7 @@ fn step(version: i64) -> Option<&'static str> { 11 => Some(include_str!("../../migrations/postgres/0012_run_command_contracts.sql")), 12 => Some(include_str!("../../migrations/postgres/0013_task_queue_pauses.sql")), 13 => Some(include_str!("../../migrations/postgres/0014_command_intents.sql")), + 14 => Some(include_str!("../../migrations/postgres/0015_schedule_dispatch_summary.sql")), _ => None, } } @@ -312,7 +347,7 @@ pub(super) fn native_relations_sql() -> Result { "\n", include_str!("../../migrations/postgres/0013_task_queue_pauses.sql"), "\n", - include_str!("../../migrations/postgres/0014_command_intents.sql") + include_str!("../../migrations/postgres/0014_command_intents.sql"), "\n", include_str!("../../migrations/postgres/0015_schedule_dispatch_summary.sql") ), ) } @@ -450,7 +485,7 @@ pub(super) async fn verify(connection: &mut PgConnection) -> Result<()> { // from SQL text. It retains types, precision, defaults, indexes, foreign // keys and sequence ownership while excluding live rows/sequence values. let expected: Catalog = - serde_json::from_str(include_str!("../../migrations/postgres/0014_catalog.json"))?; + serde_json::from_str(include_str!("../../migrations/postgres/0015_catalog.json"))?; let actual = catalog(connection).await?; if actual != expected { return Err(refuse( @@ -1000,6 +1035,7 @@ mod tests { let db=Database::new().await; let store=super::super::store::Store::new(PostgresStorage::open(db.options.clone()).await.unwrap().into_pool()); store.qualify_schedule_list_summary().await; + store.qualify_schedule_dispatch_summary().await; store.close().await; db.remove().await; } diff --git a/rust/src/runtime/schedule_dispatch_summary.rs b/rust/src/runtime/schedule_dispatch_summary.rs new file mode 100644 index 000000000..65280cb79 --- /dev/null +++ b/rust/src/runtime/schedule_dispatch_summary.rs @@ -0,0 +1,366 @@ +//! Bounded durable dispatch facts. Legacy action arrays cannot establish the +//! latest outcome or current buffer depth without their owning transition. +use chrono::{DateTime, Utc}; +use serde::{Deserialize, Serialize}; +use serde_json::Value; + +pub(super) const MAX_BYTES: usize = 4096; +const MAX_COUNT: u64 = 9_007_199_254_740_991; + +#[derive(Clone, Debug, Deserialize, Serialize)] +#[serde(deny_unknown_fields)] +pub(super) struct Summary { + version: u64, + state: State, + last_outcome: RequiredNullable, + buffered_actions_count: RequiredNullable, +} + +#[derive(Clone, Debug, Deserialize, Serialize)] +#[serde(rename_all = "snake_case")] +enum State { + Known, + Never, + Unavailable, +} + +#[derive(Clone, Debug, Deserialize, Serialize)] +#[serde(deny_unknown_fields)] +pub(super) struct Outcome { + id: String, + outcome: Kind, + recorded_at: String, + reason: RequiredNullable, + workflow_instance_id: RequiredNullable, + workflow_run_id: RequiredNullable, +} + +#[derive(Clone, Debug, Deserialize, Serialize)] +#[serde(rename_all = "snake_case")] +pub(super) enum Kind { + Started, + Buffered, + Skipped, + Failed, +} + +// Unlike Option, this wire value is required even when it is null. A +// missing field must not gain authority over legacy evidence. The untagged +// decoder also preserves duplicate-field refusal in the nested outcome. +#[derive(Clone, Debug, Deserialize, Serialize)] +#[serde(untagged)] +enum RequiredNullable { + Value(T), + Null, +} + +impl From> for RequiredNullable { + fn from(value: Option) -> Self { + match value { + Some(value) => Self::Value(value), + None => Self::Null, + } + } +} + +impl RequiredNullable { + fn as_ref(&self) -> Option<&T> { + match self { + Self::Value(value) => Some(value), + Self::Null => None, + } + } + + fn is_none(&self) -> bool { + self.as_ref().is_none() + } +} + +fn ulid(value: &str) -> bool { + value.len() == 26 + && matches!(value.as_bytes()[0], b'0'..=b'7') + && value + .bytes() + .all(|byte| b"0123456789ABCDEFGHJKMNPQRSTVWXYZ".contains(&byte)) +} + +fn instant(value: &str) -> bool { + value.len() == 27 + && value.is_ascii() + && &value[17..19] != "60" + && DateTime::parse_from_rfc3339(value).is_ok_and(|time| { + time.with_timezone(&Utc) + .format("%Y-%m-%dT%H:%M:%S%.6fZ") + .to_string() + == value + }) +} + +impl Outcome { + pub(super) fn new( + kind: Kind, + recorded: DateTime, + reason: Option<&str>, + workflow: Option<&str>, + run: Option<&str>, + ) -> Self { + Self { + id: super::store::id(), + outcome: kind, + recorded_at: recorded.format("%Y-%m-%dT%H:%M:%S%.6fZ").to_string(), + reason: reason.map(str::to_owned).into(), + workflow_instance_id: workflow.map(str::to_owned).into(), + workflow_run_id: run.map(str::to_owned).into(), + } + } + + fn valid(&self) -> bool { + if !ulid(&self.id) || !instant(&self.recorded_at) { + return false; + } + match self.outcome { + Kind::Started => { + self.reason.is_none() + && self + .workflow_instance_id + .as_ref() + .map(String::as_str) + .is_some_and(ulid) + && self + .workflow_run_id + .as_ref() + .map(String::as_str) + .is_some_and(ulid) + } + Kind::Buffered => { + self.reason.is_none() + && self.workflow_instance_id.is_none() + && self.workflow_run_id.is_none() + } + Kind::Skipped | Kind::Failed => { + self.reason + .as_ref() + .is_some_and(|reason| reason.len() <= 256 && reason.chars().count() <= 64) + && self.workflow_instance_id.is_none() + && self.workflow_run_id.is_none() + } + } + } +} + +impl Summary { + pub(super) fn unavailable() -> Self { + Self { + version: 1, + state: State::Unavailable, + last_outcome: RequiredNullable::Null, + buffered_actions_count: RequiredNullable::Null, + } + } + + pub(super) fn never() -> Self { + Self { + version: 1, + state: State::Never, + last_outcome: RequiredNullable::Null, + buffered_actions_count: RequiredNullable::Value(0), + } + } + + fn valid(&self) -> bool { + self.version == 1 + && match self.state { + State::Known => { + self.last_outcome.as_ref().is_some_and(Outcome::valid) + && self + .buffered_actions_count + .as_ref() + .copied() + .is_some_and(|count| count <= MAX_COUNT) + } + State::Never => { + self.last_outcome.is_none() && self.buffered_actions_count.as_ref() == Some(&0) + } + State::Unavailable => { + self.last_outcome.is_none() && self.buffered_actions_count.is_none() + } + } + } + + pub(super) fn read(raw: Option<&str>) -> Self { + raw.filter(|raw| raw.len() <= MAX_BYTES) + .and_then(|raw| serde_json::from_str::(raw).ok()) + .filter(Self::valid) + .unwrap_or_else(Self::unavailable) + } + + pub(super) fn recorded(outcome: Outcome, count: Option) -> Self { + let summary = Self { + version: 1, + state: State::Known, + last_outcome: RequiredNullable::Value(outcome), + buffered_actions_count: count.into(), + }; + if summary.valid() && summary.encoded().len() <= MAX_BYTES { + summary + } else { + Self::unavailable() + } + } + + pub(super) fn count(&self) -> Option { + self.buffered_actions_count.as_ref().copied() + } + + /// A buffer mutation cannot create a dispatch or repair an unknown past. + pub(super) fn with_count(mut self, count: u64) -> Self { + if matches!(self.state, State::Unavailable) { + return self; + } + self.buffered_actions_count = RequiredNullable::Value(count); + if self.valid() { + self + } else { + Self::unavailable() + } + } + + pub(super) fn encoded(&self) -> String { + serde_json::to_string(self).expect("bounded scalar summary serialization") + } + + pub(super) fn wire(raw: Option) -> Value { + serde_json::to_value(Self::read(raw.as_deref())) + .expect("bounded scalar summary serialization") + } +} + +#[cfg(test)] +mod tests { + use super::*; + use serde_json::json; + + fn outcome(kind: Kind, reason: Option<&str>) -> Outcome { + let (workflow, run) = if matches!(kind, Kind::Started) { + ( + Some("01ARZ3NDEKTSV4RRFFQ69G5FAW"), + Some("01ARZ3NDEKTSV4RRFFQ69G5FAX"), + ) + } else { + (None, None) + }; + Outcome::new( + kind, + "2026-11-06T08:00:00.123000Z".parse().unwrap(), + reason, + workflow, + run, + ) + } + + #[test] + fn complete_shapes_and_literal_reasons_round_trip() { + for kind in [Kind::Started, Kind::Buffered] { + let summary = Summary::recorded(outcome(kind, None), Some(0)); + assert!(matches!( + Summary::read(Some(&summary.encoded())).state, + State::Known + )); + } + for kind in [Kind::Skipped, Kind::Failed] { + for reason in ["", " ", "\0", " denied ", &"😀".repeat(64)] { + let summary = + Summary::recorded(outcome(kind.clone(), Some(reason)), Some(MAX_COUNT)); + assert_eq!( + Summary::read(Some(&summary.encoded())) + .last_outcome + .as_ref() + .unwrap() + .reason + .as_ref() + .map(String::as_str), + Some(reason) + ); + assert!(summary.encoded().len() <= MAX_BYTES); + } + } + } + + #[test] + fn invalid_new_outcomes_replace_old_authority_without_truncation() { + for reason in ["x".repeat(65), "😀".repeat(65)] { + assert!(matches!( + Summary::recorded(outcome(Kind::Failed, Some(&reason)), Some(0)).state, + State::Unavailable + )); + } + assert!(matches!( + Summary::recorded(outcome(Kind::Started, None), None).state, + State::Unavailable + )); + } + + #[test] + fn malformed_partial_or_unsupported_storage_is_unavailable() { + let valid = + serde_json::to_value(Summary::recorded(outcome(Kind::Started, None), Some(0))).unwrap(); + for raw in [None, Some(""), Some("null"), Some("{}"), Some("not JSON")] { + assert!(matches!(Summary::read(raw).state, State::Unavailable)); + } + for key in ["version", "state", "last_outcome", "buffered_actions_count"] { + let mut changed = valid.clone(); + changed.as_object_mut().unwrap().remove(key); + assert!(matches!( + Summary::read(Some(&changed.to_string())).state, + State::Unavailable + )); + } + for (key, value) in [ + ("version", json!(2)), + ("version", json!(1.0)), + ("version", json!(true)), + ("buffered_actions_count", json!("0")), + ("buffered_actions_count", json!(-1)), + ("buffered_actions_count", json!(0.0)), + ("buffered_actions_count", json!(MAX_COUNT + 1)), + ("extra", json!(null)), + ] { + let mut changed = valid.clone(); + changed[key] = value; + assert!(matches!( + Summary::read(Some(&changed.to_string())).state, + State::Unavailable + )); + } + for (key, value) in [ + ("id", json!("81ARZ3NDEKTSV4RRFFQ69G5FAV")), + ("recorded_at", json!("2026-02-30T08:00:00.123000Z")), + ("recorded_at", json!("2026-11-06T08:00:00.123Z")), + ("reason", json!("")), + ("workflow_run_id", json!(null)), + ] { + let mut changed = valid.clone(); + changed["last_outcome"][key] = value; + assert!(matches!( + Summary::read(Some(&changed.to_string())).state, + State::Unavailable + )); + } + assert!(matches!(Summary::read(Some("{\"version\":1,\"version\":1,\"state\":\"never\",\"last_outcome\":null,\"buffered_actions_count\":0}")).state, State::Unavailable)); + } + + #[test] + fn count_only_mutations_preserve_outcome_identity_and_time() { + let summary = Summary::recorded(outcome(Kind::Buffered, None), Some(1)); + let before = serde_json::to_value(&summary.last_outcome).unwrap(); + let after = summary.with_count(0); + assert_eq!(serde_json::to_value(&after.last_outcome).unwrap(), before); + assert_eq!(after.count(), Some(0)); + assert!(matches!(after.state, State::Known)); + assert!(matches!( + Summary::unavailable().with_count(0).state, + State::Unavailable + )); + assert!(matches!(Summary::never().with_count(0).state, State::Never)); + } +} diff --git a/rust/src/runtime/schedule_execution.rs b/rust/src/runtime/schedule_execution.rs index 8b7e7f39c..77cab3eda 100644 --- a/rust/src/runtime/schedule_execution.rs +++ b/rust/src/runtime/schedule_execution.rs @@ -1,6 +1,7 @@ //! Schedule controls and firing as published PHP's `ScheduleManager` does //! them, with each admission committed atomically with its original run. use super::schedule_storage::{iso8601, occurrence as occurrence_text}; +use super::schedule_dispatch_summary::{Kind, Outcome, Summary, MAX_BYTES}; use super::transaction::Transaction; use super::{ Result, RuntimeError, @@ -56,6 +57,36 @@ where for<'r> i64: Decode<'r, DB>, usize: ColumnIndex, { + /// Read only bounded scalar authority while holding the transition lock. + /// SQL NULL proves an empty buffer; other legacy array contents are not + /// parsed here. Only the operation already owning that array supplies a count. + async fn dispatch_authority(tx: &mut Transaction<'_, DB>, key: &str) -> Result<(Summary, Option)> { + let sql = if DB::NAME == "SQLite" { + "SELECT CASE WHEN length(CAST(dispatch_summary AS BLOB))<=4096 THEN dispatch_summary ELSE NULL END AS dispatch_summary,CASE WHEN buffered_actions IS NULL THEN 1 ELSE 0 END AS buffer_empty FROM workflow_schedules WHERE id=$1" + } else { + "SELECT CASE WHEN OCTET_LENGTH(dispatch_summary)<=4096 THEN dispatch_summary ELSE NULL END AS dispatch_summary,CASE WHEN buffered_actions IS NULL THEN 1 ELSE 0 END AS buffer_empty FROM workflow_schedules WHERE id=$1" + }; + let row = Self::query(sql).bind(key).fetch_one(&mut **tx).await?; + let raw = DB::optional_string(&row, "dispatch_summary").ok().flatten(); + let summary = Summary::read(raw.as_deref()); + let count = if DB::number(&row, "buffer_empty")? == 1 { Some(0) } else { summary.count() }; + Ok((summary, count)) + } + + async fn record_dispatch(tx: &mut Transaction<'_, DB>, key: &str, outcome: Outcome, count: Option) -> Result<()> { + let count = match count { Some(count) => Some(count), None => Self::dispatch_authority(tx, key).await?.1 }; + Self::query("UPDATE workflow_schedules SET dispatch_summary=$1 WHERE id=$2") + .bind(Summary::recorded(outcome, count).encoded()).bind(key).execute(&mut **tx).await?; + Ok(()) + } + + async fn update_dispatch_count(tx: &mut Transaction<'_, DB>, key: &str, count: u64) -> Result<()> { + let (summary, _) = Self::dispatch_authority(tx, key).await?; + Self::query("UPDATE workflow_schedules SET dispatch_summary=$1 WHERE id=$2") + .bind(summary.with_count(count).encoded()).bind(key).execute(&mut **tx).await?; + Ok(()) + } + /// Pause, resume or delete a live schedule. pub(crate) async fn edit_schedule( &self, @@ -101,6 +132,7 @@ where "delete" => { Self::query("UPDATE workflow_schedules SET status='deleted',deleted_at=$1,next_fire_at=NULL,buffered_actions=NULL,updated_at=$2 WHERE id=$3") .bind(DB::bind_time(changed)).bind(DB::bind_time(changed)).bind(&key).execute(&mut *tx).await?; + Self::update_dispatch_count(&mut tx, &key, 0).await?; Self::append_schedule(&mut tx, &key, "ScheduleDeleted", json!({"reason":"deleted","deleted_at":iso8601(changed)}), Some(&context), None, None).await?; "deleted" @@ -223,7 +255,7 @@ where } Decision::Start { policy } => { let result = store - .start_scheduled(&mut tx, &row, occurrence, outcome, &policy, context) + .start_scheduled(&mut tx, &row, occurrence, outcome, &policy, context, None) .await; match result { Ok(result) => { @@ -239,7 +271,7 @@ where .bind(key) .fetch_one(&mut *tx) .await?; - Self::record_skip(&mut tx, &row, reason, context).await?; + Self::record_skip(&mut tx, &row, reason, context, None).await?; Self::recompute_next(&mut tx, &row).await?; tx.commit().await?; return Ok(Trigger::Skipped(reason.to_owned())); @@ -274,17 +306,17 @@ where } } if DB::string(row, "status")? != "active" { - Self::record_skip(tx, row, "status_not_triggerable", context).await?; + Self::record_skip(tx, row, "status_not_triggerable", context, None).await?; return Ok(skip("status_not_triggerable")); } if DB::optional_number(row, "remaining_actions")?.is_some_and(|remaining| remaining <= 0) { - Self::record_skip(tx, row, "remaining_actions_exhausted", context).await?; + Self::record_skip(tx, row, "remaining_actions_exhausted", context, None).await?; return Ok(skip("remaining_actions_exhausted")); } if let Some(occurrence) = occurrence && self.has_fired(tx, row, occurrence).await? { - self.skip_fired(tx, row, occurrence, context).await?; + self.skip_fired(tx, row, occurrence, context, None).await?; return Ok(skip("already_fired_occurrence")); } let stored = DB::string(row, "overlap_policy")?; @@ -299,7 +331,7 @@ where .and_then(|items| items.as_array().cloned()) .unwrap_or_default(); if policy == "buffer_one" && !buffered.is_empty() { - Self::record_skip(tx, row, "buffer_full", context).await?; + Self::record_skip(tx, row, "buffer_full", context, Some(buffered.len() as u64)).await?; Self::recompute_next(tx, row).await?; return Ok(Decision::Done(Trigger::BufferFull)); } @@ -312,6 +344,7 @@ where Self::query("UPDATE workflow_schedules SET buffered_actions=$1,updated_at=$2 WHERE id=$3") .bind(DB::document(&json!(buffered))).bind(DB::bind_time(now())).bind(DB::string(row, "id")?) .execute(&mut **tx).await?; + Self::record_dispatch(tx, &DB::string(row, "id")?, Outcome::new(Kind::Buffered, now(), None, None, None), Some(buffered.len() as u64)).await?; Self::recompute_next(tx, row).await?; return Ok(Decision::Done(Trigger::Buffered)); } @@ -320,7 +353,7 @@ where || matches!(policy.as_str(), "cancel_other" | "terminate_other"); if !allowed { let reason = format!("overlap_policy_{policy}"); - Self::record_skip(tx, row, &reason, context).await?; + Self::record_skip(tx, row, &reason, context, None).await?; Self::recompute_next(tx, row).await?; return Ok(Decision::Done(Trigger::Skipped(reason))); } @@ -342,6 +375,7 @@ where outcome: &str, policy: &str, context: Option<&Value>, + buffer_count: Option, ) -> Result { let key = DB::string(row, "id")?; let schedule = DB::string(row, "schedule_id")?; @@ -422,6 +456,8 @@ where ) .await?; } + let count = if remaining.is_some_and(|remaining| remaining <= 0) { Some(0) } else { buffer_count }; + Self::record_dispatch(tx, &key, Outcome::new(Kind::Started, fired, None, Some(&workflow), Some(&run)), count).await?; Ok(Trigger::Triggered { workflow, run }) } @@ -431,6 +467,7 @@ where row: &DB::Row, reason: &str, context: Option<&Value>, + buffer_count: Option, ) -> Result<()> { let changed = now(); let key = DB::string(row, "id")?; @@ -443,6 +480,7 @@ where .ok_or_else(|| refuse(StatusCode::CONFLICT, "schedule_skip_count_exhausted"))?; Self::query("UPDATE workflow_schedules SET skipped_trigger_count=$1,last_skip_reason=$2,last_skipped_at=$3,updated_at=$4 WHERE id=$5") .bind(skipped).bind(reason).bind(DB::bind_time(changed)).bind(DB::bind_time(changed)).bind(&key).execute(&mut **tx).await?; + Self::record_dispatch(tx, &key, Outcome::new(Kind::Skipped, changed, Some(reason), None, None), buffer_count).await?; Self::append_schedule( tx, &key, @@ -471,6 +509,7 @@ where Self::query("UPDATE workflow_schedules SET recent_actions=$1,failures_count=$2,last_fired_at=$3,updated_at=$4 WHERE id=$5") .bind(DB::document(&recent)).bind(failures).bind(DB::bind_time(failed)).bind(DB::bind_time(failed)).bind(key) .execute(&mut *tx).await?; + Self::record_dispatch(&mut tx, key, Outcome::new(Kind::Failed, failed, Some(reason), None, None), None).await?; // A spec PHP cannot evaluate keeps its stored occurrence. if let Ok(next) = schedules::next_fire( &DB::optional_document_row(&row, "spec")?.unwrap_or(Value::Null), @@ -519,8 +558,9 @@ where row: &DB::Row, occurrence: DateTime, context: Option<&Value>, + buffer_count: Option, ) -> Result<()> { - Self::record_skip(tx, row, "already_fired_occurrence", context).await?; + Self::record_skip(tx, row, "already_fired_occurrence", context, buffer_count).await?; if DB::optional_instant(row, "next_fire_at")? .is_some_and(|next| occurrence_key(next) == occurrence_key(occurrence)) && now().timestamp() >= occurrence.timestamp() @@ -620,6 +660,7 @@ where let rest = (!buffered.is_empty()).then(|| DB::document(&json!(buffered))); Self::query("UPDATE workflow_schedules SET buffered_actions=$1,updated_at=$2 WHERE id=$3") .bind(rest).bind(DB::bind_time(now())).bind(key).execute(&mut *tx).await?; + Self::update_dispatch_count(&mut tx, key, buffered.len() as u64).await?; let occurrence = action["occurrence_time"] .as_str() .and_then(|text| DateTime::parse_from_rfc3339(text).ok()) @@ -627,20 +668,21 @@ where if let Some(occurrence) = occurrence && store.has_fired(&mut tx, &row, occurrence).await? { - store.skip_fired(&mut tx, &row, occurrence, None).await?; + store.skip_fired(&mut tx, &row, occurrence, None, Some(buffered.len() as u64)).await?; tx.commit().await?; return Ok(()); } if DB::string(&row, "status")? != "active" { drop(tx); let mut tx = self.begin().await?; - Self::record_skip(&mut tx, &row, "schedule_not_triggerable", None).await?; + let row = Self::query("SELECT * FROM workflow_schedules WHERE id=$1").bind(key).fetch_one(&mut *tx).await?; + Self::record_skip(&mut tx, &row, "schedule_not_triggerable", None, None).await?; tx.commit().await?; return Ok(()); } let policy = DB::string(&row, "overlap_policy")?; match store - .start_scheduled(&mut tx, &row, occurrence, "drained", &policy, None) + .start_scheduled(&mut tx, &row, occurrence, "drained", &policy, None, Some(buffered.len() as u64)) .await { Ok(_) => { @@ -652,7 +694,8 @@ where // The drained action is kept: PHP rolls the drain back too. drop(tx); let mut tx = self.begin().await?; - Self::record_skip(&mut tx, &row, reason, None).await?; + let row = Self::query("SELECT * FROM workflow_schedules WHERE id=$1").bind(key).fetch_one(&mut *tx).await?; + Self::record_skip(&mut tx, &row, reason, None, None).await?; tx.commit().await?; Ok(()) } @@ -661,6 +704,121 @@ where } } +#[cfg(test)] +impl Store +where + for<'c> &'c mut DB::Connection: Executor<'c, Database = DB>, + DB::Arguments: IntoArguments, + for<'q> &'q str: Encode<'q, DB> + Type, + for<'q> Option<&'q str>: Encode<'q, DB>, + for<'q> Option: Encode<'q, DB>, + for<'q> Option: Encode<'q, DB>, + for<'q> String: Encode<'q, DB> + Type, + for<'q> i64: Encode<'q, DB> + Type, + for<'r> i64: Decode<'r, DB>, + usize: ColumnIndex, +{ + /// The same actual writer/rollback controls on each supported driver. + pub(super) async fn qualify_schedule_dispatch_summary(&self) { + let definition = schedules::definition(&json!({"schedule_id":"dispatch-summary", + "spec":{"intervals":[{"every":"PT1H"}],"timezone":"UTC"}, + "action":{"workflow_type":"echo","task_queue":"dispatch-summary"}, + "overlap_policy":"buffer_all"})).unwrap(); + self.create_schedule(definition, json!({}), json!({})).await.unwrap(); + let initial = self.describe_schedule("dispatch-summary").await.unwrap(); + assert_eq!(initial["dispatch_summary"], json!({"version":1,"state":"never","last_outcome":null,"buffered_actions_count":0})); + let key_row = Self::query("SELECT id FROM workflow_schedules WHERE schedule_id='dispatch-summary' AND namespace=$1") + .bind(self.namespace.as_ref()).fetch_one(&self.pool).await.unwrap(); + let key = DB::string(&key_row, "id").unwrap(); + + let started = self.trigger_schedule("dispatch-summary", None, json!({})).await.unwrap(); + let first = self.describe_schedule("dispatch-summary").await.unwrap()["dispatch_summary"].clone(); + assert_eq!(first["state"], "known"); + assert_eq!(first["last_outcome"]["outcome"], "started"); + assert_eq!(first["last_outcome"]["workflow_instance_id"], started["workflow_id"]); + assert_eq!(first["last_outcome"]["workflow_run_id"], started["run_id"]); + for depth in 1..=2 { + self.trigger_schedule("dispatch-summary", None, json!({})).await.unwrap(); + let summary = self.describe_schedule("dispatch-summary").await.unwrap()["dispatch_summary"].clone(); + assert_eq!(summary["last_outcome"]["outcome"], "buffered"); + assert_eq!(summary["buffered_actions_count"], depth); + } + // The full-buffer decision already owns the complete array, including + // on a legacy row. Its new skip can establish current count authority. + Self::query("UPDATE workflow_schedules SET dispatch_summary=NULL,overlap_policy='buffer_one' WHERE id=$1") + .bind(&key).execute(&self.pool).await.unwrap(); + let full = self.trigger_schedule("dispatch-summary", None, json!({})).await.unwrap(); + assert_eq!(full["outcome"], "buffer_full"); + let before_failure = self.describe_schedule("dispatch-summary").await.unwrap()["dispatch_summary"].clone(); + assert_eq!(before_failure["state"], "known"); + assert_eq!(before_failure["last_outcome"]["outcome"], "skipped"); + assert_eq!(before_failure["last_outcome"]["reason"], "buffer_full"); + assert_eq!(before_failure["buffered_actions_count"], 2); + // Execution failure changes the current-run projection, not dispatch. + Self::query("UPDATE workflow_runs SET status='failed' WHERE id=$1") + .bind(started["run_id"].as_str().unwrap()).execute(&self.pool).await.unwrap(); + let page = self.list_schedules(None, "fixture-secret").await.unwrap(); + let row = page["schedules"].as_array().unwrap().iter().find(|row| row["schedule_id"]=="dispatch-summary").unwrap(); + assert_eq!(row["dispatch_summary"], before_failure); + assert_eq!(row["current_run"]["status"], "failed"); + + // A refused start rolls back the removal, then records its skip from + // fresh locked authority. The malformed envelope is test-owned state. + let bad_action = json!({"workflow_type":"echo","task_queue":"dispatch-summary","input":{"codec":"unsupported","blob":"fixture"}}); + Self::query("UPDATE workflow_schedules SET action=$1 WHERE id=$2") + .bind(DB::document(&bad_action)).bind(&key).execute(&self.pool).await.unwrap(); + self.drain_one(&key).await.unwrap(); + let refused = self.describe_schedule("dispatch-summary").await.unwrap(); + assert_eq!(refused["info"]["buffered_actions"].as_array().unwrap().len(), 2); + assert_eq!(refused["dispatch_summary"]["buffered_actions_count"], 2); + assert_eq!(refused["dispatch_summary"]["last_outcome"]["outcome"], "skipped"); + assert_eq!(refused["dispatch_summary"]["last_outcome"]["reason"], "unsupported_payload_codec"); + assert_ne!(refused["dispatch_summary"]["last_outcome"]["id"], before_failure["last_outcome"]["id"]); + + Self::query("UPDATE workflow_schedules SET action=$1 WHERE id=$2") + .bind(DB::document(&json!({"workflow_type":"echo","task_queue":"dispatch-summary"}))).bind(&key).execute(&self.pool).await.unwrap(); + self.drain_one(&key).await.unwrap(); + let drained = self.describe_schedule("dispatch-summary").await.unwrap(); + assert_eq!(drained["dispatch_summary"]["buffered_actions_count"], 1); + assert_eq!(drained["dispatch_summary"]["last_outcome"]["outcome"], "started"); + + let mut tx = self.begin().await.unwrap(); + let row = self.schedule_row(&mut tx, "dispatch-summary", false).await.unwrap(); + Self::record_skip(&mut tx, &row, "uncommitted", None, None).await.unwrap(); + tx.rollback().await.unwrap(); + assert_eq!(self.describe_schedule("dispatch-summary").await.unwrap()["dispatch_summary"], drained["dispatch_summary"]); + + // An oversized new reason revokes old authority, while the original + // failure and its complete text remain in the existing detail history. + let oversized = "x".repeat(65); + self.record_failure(&key, &oversized).await.unwrap(); + let failure = self.describe_schedule("dispatch-summary").await.unwrap(); + assert_eq!(failure["dispatch_summary"]["state"], "unavailable"); + assert_eq!(failure["info"]["recent_actions"].as_array().unwrap().last().unwrap()["reason"], oversized); + // Legacy non-NULL buffers do not become a fabricated zero count. + Self::query("UPDATE workflow_schedules SET dispatch_summary=NULL WHERE id=$1").bind(&key).execute(&self.pool).await.unwrap(); + self.record_failure(&key, "legacy").await.unwrap(); + assert_eq!(self.describe_schedule("dispatch-summary").await.unwrap()["dispatch_summary"]["state"], "unavailable"); + Self::query("UPDATE workflow_schedules SET buffered_actions=NULL WHERE id=$1").bind(&key).execute(&self.pool).await.unwrap(); + self.record_failure(&key, " ").await.unwrap(); + let failure = self.describe_schedule("dispatch-summary").await.unwrap(); + assert_eq!(failure["dispatch_summary"]["last_outcome"]["reason"], " "); + assert_eq!(failure["dispatch_summary"]["buffered_actions_count"], 0); + // Count-only clearing preserves every outcome field, including time. + let mut tx = self.begin().await.unwrap(); + Self::update_dispatch_count(&mut tx, &key, 0).await.unwrap(); + tx.commit().await.unwrap(); + assert_eq!(self.describe_schedule("dispatch-summary").await.unwrap()["dispatch_summary"], failure["dispatch_summary"]); + + for raw in ["null".to_owned(), "{}".to_owned(), "x".repeat(MAX_BYTES+1)] { + Self::query("UPDATE workflow_schedules SET dispatch_summary=$1 WHERE id=$2").bind(raw).bind(&key).execute(&self.pool).await.unwrap(); + let page = self.list_schedules(None, "fixture-secret").await.unwrap(); + let row = page["schedules"].as_array().unwrap().iter().find(|row| row["schedule_id"]=="dispatch-summary").unwrap(); + assert_eq!(row["dispatch_summary"]["state"], "unavailable"); + } + } +} + /// `utcOccurrenceKey`. fn occurrence_key(time: DateTime) -> String { time.format("%Y-%m-%d %H:%M:%S%.6f").to_string() @@ -742,6 +900,14 @@ mod tests { Store::::new(super::super::sqlite::open(file.to_str().unwrap()).await.unwrap()) } + #[tokio::test] + async fn dispatch_summary_writer_and_rollback_controls() { + let directory = tempfile::tempdir().unwrap(); + let store = sqlite_store(&directory.path().join("dispatch.sqlite")).await; + store.qualify_schedule_dispatch_summary().await; + store.close().await; + } + #[tokio::test] async fn failed_due_admission_rolls_back_start_keeps_quota_and_records_the_failure() { let directory = tempfile::tempdir().unwrap(); diff --git a/rust/src/runtime/schedule_list.rs b/rust/src/runtime/schedule_list.rs index 207d16695..5af98df22 100644 --- a/rust/src/runtime/schedule_list.rs +++ b/rust/src/runtime/schedule_list.rs @@ -596,6 +596,8 @@ fn list_selection(backend: &str, cursor_probe: bool) -> String { .iter() .map(|name| format!("s.{name}")) .collect::>(); + let dispatch_length = byte_length(backend, "s.dispatch_summary"); + columns.push(format!("CASE WHEN {dispatch_length}<=4096 THEN s.dispatch_summary ELSE NULL END AS dispatch_summary")); let scalars = [ ( "s.latest_workflow_instance_id", @@ -792,7 +794,8 @@ where return Err(invalid_summary()); } Ok( - json!({"failures_count":failures,"skipped_trigger_count":skipped, + json!({"dispatch_summary":super::schedule_dispatch_summary::Summary::wire(DB::optional_string(row,"dispatch_summary").ok().flatten()), + "failures_count":failures,"skipped_trigger_count":skipped, "latest_workflow_instance_id":latest,"current_run":current}), ) } diff --git a/rust/src/runtime/schedule_storage.rs b/rust/src/runtime/schedule_storage.rs index 721a68a8c..e1c734308 100644 --- a/rust/src/runtime/schedule_storage.rs +++ b/rust/src/runtime/schedule_storage.rs @@ -107,13 +107,13 @@ where let created_at = now(); let next = schedules::next_fire(&definition.spec, definition.jitter_seconds, created_at)?; let key = id(); - Self::query("INSERT INTO workflow_schedules(id,schedule_id,namespace,spec,action,status,overlap_policy,memo,jitter_seconds,max_runs,remaining_actions,fires_count,failures_count,skipped_trigger_count,note,created_at,updated_at) VALUES ($1,$2,$3,$4,$5,'active',$6,$7,$8,$9,$10,0,0,0,$11,$12,$13)") + Self::query("INSERT INTO workflow_schedules(id,schedule_id,namespace,spec,action,status,overlap_policy,memo,jitter_seconds,max_runs,remaining_actions,fires_count,failures_count,skipped_trigger_count,note,created_at,updated_at,dispatch_summary) VALUES ($1,$2,$3,$4,$5,'active',$6,$7,$8,$9,$10,0,0,0,$11,$12,$13,$14)") .bind(&key).bind(&schedule_id).bind(self.namespace.as_ref()) .bind(DB::document(&definition.spec)).bind(DB::document(&definition.action)) .bind(&definition.overlap_policy).bind(definition.memo.as_ref().map(DB::document)) .bind(definition.jitter_seconds).bind(definition.max_runs).bind(definition.max_runs) .bind(definition.note.as_deref()) - .bind(DB::bind_time(created_at)).bind(DB::bind_time(created_at)).execute(&mut *tx).await?; + .bind(DB::bind_time(created_at)).bind(DB::bind_time(created_at)).bind(super::schedule_dispatch_summary::Summary::never().encoded()).execute(&mut *tx).await?; if let Some(next) = next { Self::query("UPDATE workflow_schedules SET next_fire_at=$1 WHERE id=$2") .bind(DB::bind_time(next)) @@ -378,6 +378,7 @@ where .map(|action| schedules::normalize_action_timeouts(&action)); Ok(json!({ "schedule_id":DB::string(row,"schedule_id")?, + "dispatch_summary":super::schedule_dispatch_summary::Summary::wire(DB::optional_string(row,"dispatch_summary").ok().flatten()), "spec":DB::optional_document_row(row,"spec")?, "action":action, "overlap_policy":DB::string(row,"overlap_policy")?, diff --git a/rust/src/runtime/schema.rs b/rust/src/runtime/schema.rs index 52e004fe4..e09c6b7d1 100644 --- a/rust/src/runtime/schema.rs +++ b/rust/src/runtime/schema.rs @@ -11,14 +11,14 @@ use tokio::sync::OnceCell; use super::{Result, refuse}; -pub(super) const VERSION: i64 = 13; +pub(super) const VERSION: i64 = 14; fn migrator() -> &'static Migrator { static MIGRATOR: OnceLock = OnceLock::new(); MIGRATOR.get_or_init(|| { Migrator::with_migrations(vec![Migration::new( VERSION, - "full frozen PHP schema, native worker incarnations, session holders, stream reclaim deadlines, service call deadlines, service admission counters and committed external payload deletions and task ready origins and poll expiry indexes and bound run command contracts and task queue activity dispatch pauses and keyed command intents".into(), + "full frozen PHP schema, native worker incarnations, session holders, stream reclaim deadlines, service call deadlines, service admission counters and committed external payload deletions and task ready origins and poll expiry indexes and bound run command contracts and task queue activity dispatch pauses and keyed command intents and bounded schedule dispatch summaries".into(), MigrationType::Simple, concat!( include_str!("../../migrations/sqlite/0003_full_schema.sql"), @@ -41,7 +41,7 @@ fn migrator() -> &'static Migrator { "\n", include_str!("../../migrations/sqlite/0012_task_queue_pauses.sql"), "\n", - include_str!("../../migrations/sqlite/0013_command_intents.sql") + include_str!("../../migrations/sqlite/0013_command_intents.sql"), "\n", include_str!("../../migrations/sqlite/0014_schedule_dispatch_summary.sql") ) .into_sql_str(), false, @@ -59,7 +59,39 @@ fn earlier_migration(version: i64) -> Option<&'static Migration> { static V10: OnceLock = OnceLock::new(); static V11: OnceLock = OnceLock::new(); static V12: OnceLock = OnceLock::new(); + static V13: OnceLock = OnceLock::new(); match version { + 13 => Some(V13.get_or_init(|| Migration::new( + 13, + "full frozen PHP schema, native worker incarnations, session holders, stream reclaim deadlines, service call deadlines, service admission counters and committed external payload deletions and task ready origins and poll expiry indexes and bound run command contracts and task queue activity dispatch pauses and keyed command intents".into(), + MigrationType::Simple, + concat!( + include_str!("../../migrations/sqlite/0003_full_schema.sql"), + "\n", + include_str!("../../migrations/sqlite/0004_worker_incarnations.sql"), + "\n", + include_str!("../../migrations/sqlite/0005_worker_session_holders.sql"), + "\n", + include_str!("../../migrations/sqlite/0006_stream_reclaims.sql"), + "\n", + include_str!("../../migrations/sqlite/0007_service_calls.sql"), + "\n", + include_str!("../../migrations/sqlite/0008_external_payload_deletions.sql"), + "\n", + include_str!("../../migrations/sqlite/0009_task_ready_origin.sql"), + "\n", + include_str!("../../migrations/sqlite/0010_poll_expiry_indexes.sql"), + "\n", + include_str!("../../migrations/sqlite/0011_run_command_contracts.sql"), + "\n", + include_str!("../../migrations/sqlite/0012_task_queue_pauses.sql"), + "\n", + include_str!("../../migrations/sqlite/0013_command_intents.sql") + ) + .into_sql_str(), + false, + ))), + 12 => Some( V12.get_or_init(|| Migration::new( 12, @@ -220,6 +252,7 @@ fn step(version: i64) -> Option<&'static str> { 10 => Some(include_str!("../../migrations/sqlite/0011_run_command_contracts.sql")), 11 => Some(include_str!("../../migrations/sqlite/0012_task_queue_pauses.sql")), 12 => Some(include_str!("../../migrations/sqlite/0013_command_intents.sql")), + 13 => Some(include_str!("../../migrations/sqlite/0014_schedule_dispatch_summary.sql")), _ => None, } } @@ -330,7 +363,7 @@ pub(super) fn native_relations_sql() -> Result { "\n", include_str!("../../migrations/sqlite/0012_task_queue_pauses.sql"), "\n", - include_str!("../../migrations/sqlite/0013_command_intents.sql") + include_str!("../../migrations/sqlite/0013_command_intents.sql"), "\n", include_str!("../../migrations/sqlite/0014_schedule_dispatch_summary.sql") ), ) } diff --git a/rust/src/runtime/schema_upgrade.rs b/rust/src/runtime/schema_upgrade.rs index 48632ae9b..c0aadba67 100644 --- a/rust/src/runtime/schema_upgrade.rs +++ b/rust/src/runtime/schema_upgrade.rs @@ -30,7 +30,7 @@ pub(super) const DEVELOPMENT_ENGINE: &str = "rust-development"; pub(super) const UPGRADING_ENGINE: &str = "rust-upgrading"; /// Earlier native schema versions this binary upgrades in place. Release /// candidates `3.0.0-rc.1` and `3.0.0-rc.2` shipped version 7. -pub(super) const UPGRADABLE: &[i64] = &[7, 8, 10, 11, 12, 13, 14]; +pub(super) const UPGRADABLE: &[i64] = &[7, 8, 10, 11, 12, 13, 14, 15]; /// The refusal for a native marker this binary does not open as it is. pub(super) fn marker_refusal(engine: &str, version: i64, current: i64) -> RuntimeError { diff --git a/rust/src/runtime/upgrade/takeover/mysql_journal.rs b/rust/src/runtime/upgrade/takeover/mysql_journal.rs index 31f4704c5..94a717d97 100644 --- a/rust/src/runtime/upgrade/takeover/mysql_journal.rs +++ b/rust/src/runtime/upgrade/takeover/mysql_journal.rs @@ -462,6 +462,7 @@ async fn finish(connection: &mut MySqlConnection, run: &Run<'_>) -> Result<()> { mysql::ensure_json_text(connection, run.flavor).await?; mysql::ensure_task_queue_pauses(connection, run.flavor).await?; mysql::ensure_command_intents(connection, run.flavor).await?; + mysql::ensure_dispatch_summary(connection, run.flavor).await?; connection.execute(LEDGER_SQL).await?; let migration = run.flavor.migration(); let mut tx = connection.begin().await?; diff --git a/scripts/conformance/server-parity/contract.mjs b/scripts/conformance/server-parity/contract.mjs index 2e6aa8f73..cf47d6486 100644 --- a/scripts/conformance/server-parity/contract.mjs +++ b/scripts/conformance/server-parity/contract.mjs @@ -248,7 +248,7 @@ export function checkObservation(fixture, observation, workflowId, artifacts, ta const updateValidation = fixture.update_validation ? checkUpdateValidation(fixture, observation, workflowId) : null; const messageStreams = fixture.message_streams ? checkMessageStreams(fixture, observation, workflowId) : null; const workflowStreamWrites = fixture.workflow_stream_writes ? checkWorkflowStreamWrites(fixture, observation, workflowId) : null; - const schedulePolicies = fixture.schedule_policies ? checkSchedulePolicies(fixture, observation, workflowId) : null; + const schedulePolicies = fixture.schedule_policies ? checkSchedulePolicies(fixture, observation, workflowId, target) : null; const scheduleCatalog = fixture.schedule_catalog ? checkScheduleCatalog(fixture, observation, workflowId, target) : null; const signalsBeforeWorker = fixture.signals_before_worker ? checkSignalsBeforeWorker(fixture, observation, workflowId) : null; const workerListing = fixture.worker_listing ? checkWorkerListing(fixture, observation, workflowId) : null; diff --git a/scripts/conformance/server-parity/dispatch-summary-schema.php b/scripts/conformance/server-parity/dispatch-summary-schema.php new file mode 100644 index 000000000..7abbc5bee --- /dev/null +++ b/scripts/conformance/server-parity/dispatch-summary-schema.php @@ -0,0 +1,74 @@ + substr_count($row[1], $definition) === 1); + if (count($matches) !== 1 || substr_count($row[1], ' `dispatch_summary`') !== 1) { + throw new RuntimeException('Native dispatch summary definition mismatch.'); + } + $row[1] = str_replace(array_values($matches)[0], '', $row[1]); + $found++; + } + unset($row); + if ($found !== 1) { + throw new RuntimeException('Native schedule table missing or duplicated.'); + } + + return $rows; +} + +function projectPostgresDispatchSummary(array $rows): array +{ + $expected = ['column', 'workflow_schedules.31', ['name' => 'dispatch_summary', 'type' => 'text', + 'default' => null, 'identity' => '', 'not_null' => false, 'collation' => 'default', 'generated' => '']]; + $found = 0; + $result = []; + foreach ($rows as $row) { + if ($row[0] === 'column' && str_starts_with($row[1], 'workflow_schedules.') + && ($row[2]['name'] ?? null) === 'dispatch_summary') { + if ($row !== $expected) { + throw new RuntimeException('Native dispatch summary definition mismatch.'); + } + $found++; + } else { + $result[] = $row; + } + } + if ($found !== 1) { + throw new RuntimeException('Native dispatch summary column missing or duplicated.'); + } + + return $result; +} diff --git a/scripts/conformance/server-parity/mysql-schema.php b/scripts/conformance/server-parity/mysql-schema.php index 3e55a5b36..f886ae9af 100644 --- a/scripts/conformance/server-parity/mysql-schema.php +++ b/scripts/conformance/server-parity/mysql-schema.php @@ -3,6 +3,7 @@ declare(strict_types=1); require_once __DIR__.'/ready-origin-schema.php'; +require_once __DIR__.'/dispatch-summary-schema.php'; // Physical fixture inspection only. This is not a database backup procedure. if (! in_array($argc, [3, 4], true) || ! in_array($argv[1], ['dump', 'catalog', 'snapshot', 'compare'], true)) { @@ -108,7 +109,7 @@ function catalog(PDO $pdo): array } $pdo->exec('ROLLBACK'); $pdo = connection($argv[3]); -$native = array_values(array_filter(projectMysqlJsonText(projectMysqlScopedDispatch(projectMysqlReadyOrigin(catalog($pdo))), $php), static fn (array $row): bool => ! in_array($row[0], ['dw_server_schema', '_sqlx_migrations', 'dw_task_completions', 'dw_poll_receipts', 'dw_query_cache', 'dw_worker_registration_incarnations', 'dw_worker_session_holders', 'dw_stream_reclaims', 'dw_service_call_deadlines', 'dw_service_admission_counters', 'dw_external_payload_deletions', 'dw_run_command_contracts', 'dw_task_queue_pauses', 'dw_command_intents'], true))); +$native = array_values(array_filter(projectMysqlDispatchSummary(projectMysqlJsonText(projectMysqlScopedDispatch(projectMysqlReadyOrigin(catalog($pdo))), $php)), static fn (array $row): bool => ! in_array($row[0], ['dw_server_schema', '_sqlx_migrations', 'dw_task_completions', 'dw_poll_receipts', 'dw_query_cache', 'dw_worker_registration_incarnations', 'dw_worker_session_holders', 'dw_stream_reclaims', 'dw_service_call_deadlines', 'dw_service_admission_counters', 'dw_external_payload_deletions', 'dw_run_command_contracts', 'dw_task_queue_pauses', 'dw_command_intents'], true))); $pdo->exec('ROLLBACK'); // Native polling uses an additional index on an existing table. Retain all // original column, index and constraint definitions in the comparison. diff --git a/scripts/conformance/server-parity/postgres-schema.php b/scripts/conformance/server-parity/postgres-schema.php index 2be60274c..89ee1cba3 100644 --- a/scripts/conformance/server-parity/postgres-schema.php +++ b/scripts/conformance/server-parity/postgres-schema.php @@ -3,6 +3,7 @@ declare(strict_types=1); require_once __DIR__.'/ready-origin-schema.php'; +require_once __DIR__.'/dispatch-summary-schema.php'; // Inspect PostgreSQL directly, without starting Laravel or either engine. // The first database in compare mode must come from the frozen PHP image. @@ -71,7 +72,7 @@ function catalog(string $database): array if ($argc !== 4) { throw new InvalidArgumentException('Compare requires two independent databases.'); } -$native = projectPostgresScopedDispatch(projectPostgresReadyOrigin(catalog($argv[3]))); +$native = projectPostgresDispatchSummary(projectPostgresScopedDispatch(projectPostgresReadyOrigin(catalog($argv[3])))); $tables = ['_sqlx_migrations', 'dw_server_schema', 'dw_task_completions', 'dw_poll_receipts', 'dw_query_cache', 'dw_worker_registration_incarnations', 'dw_worker_session_holders', 'dw_stream_reclaims', 'dw_service_call_deadlines', 'dw_service_admission_counters', 'dw_external_payload_deletions', 'dw_run_command_contracts', 'dw_task_queue_pauses', 'dw_command_intents']; $indexes = ['_sqlx_migrations_pkey', 'dw_task_completions_pkey', 'dw_poll_receipts_pkey', 'dw_workflow_tasks_poll', 'dw_query_cache_expiration', 'dw_poll_receipts_expiration', 'dw_query_cache_pkey', 'dw_worker_registration_incarnations_pkey', 'dw_worker_incarnation_authority', 'dw_worker_incarnation_retention', 'dw_worker_session_holders_pkey', 'dw_stream_reclaims_pkey', 'dw_stream_reclaims_due', 'dw_service_call_deadlines_pkey', 'dw_service_call_deadlines_due', 'dw_service_admission_counters_pkey', 'dw_service_admission_counters_expiry', 'dw_external_payload_deletions_pkey', 'dw_external_payload_deletions_uri', 'dw_external_payload_deletions_due', 'dw_run_command_contracts_pkey', 'dw_run_command_contracts_namespace', 'dw_task_queue_pauses_pkey', 'dw_command_intents_pkey', 'dw_command_intents_namespace']; $native = array_values(array_filter($native, static function (array $row) use ($tables, $indexes): bool { diff --git a/scripts/conformance/server-parity/schedule-catalog-contract.mjs b/scripts/conformance/server-parity/schedule-catalog-contract.mjs index 1c2483e9f..7266afc8e 100644 --- a/scripts/conformance/server-parity/schedule-catalog-contract.mjs +++ b/scripts/conformance/server-parity/schedule-catalog-contract.mjs @@ -1,4 +1,5 @@ import assert from 'node:assert/strict'; +import {checkDispatchSummary} from './schedule-dispatch-summary-contract.mjs'; import {readFileSync} from 'node:fs'; import {normalized} from './schedule-policies-contract.mjs'; @@ -84,6 +85,29 @@ function checkedLastSkip(item, skipped, raw) { // Keep the frozen PHP response contract intact. Native's additive fields are // checked against the preceding HTTP backfill results before projecting them // away for comparison with an older published PHP server. +function checkedDispatchSummary(item, state, target) { + if (target !== 'rust' && !Object.hasOwn(item, 'dispatch_summary')) return; + const summary = item.dispatch_summary; + checkDispatchSummary(summary); + assert.equal(summary.buffered_actions_count, 0, 'fixture has no buffered actions'); + if (!state?.last) { + assert.deepStrictEqual(summary, {version: 1, state: 'never', last_outcome: null, buffered_actions_count: 0}, + 'new schedule has never dispatched'); + return; + } + assert.equal(summary.state, 'known', 'fixture dispatch must be known'); + const last = summary.last_outcome; + assert.equal(last.outcome, state.last.outcome, 'last dispatch follows committed HTTP outcomes'); + if (last.outcome === 'started') { + assert.equal(last.reason, null); + assert.equal(last.workflow_instance_id, state.last.workflow_id, 'dispatch names its actual started workflow'); + if (item.current_run) assert.equal(last.workflow_run_id, item.current_run.run_id, 'dispatch names the original pending run'); + } else { + assert.deepStrictEqual([last.workflow_instance_id, last.workflow_run_id], [null, null]); + assert.equal(last.reason, 'status_not_triggerable', 'fixture paused schedule dispatch reason'); + } +} + function checkedListSummaries(raw, target) { const known = new Map(); return raw.map(step => { @@ -91,19 +115,29 @@ function checkedListSummaries(raw, target) { const id = step.response.schedule_id; const state = known.get(id) ?? {failures: 0, skipped: 0, latest: null}; for (const result of step.response.results) { + state.last = result; if (result.outcome === 'started') state.latest = result.workflow_id; if (result.outcome === 'skipped') state.skipped++; if (result.outcome === 'failed') state.failures++; } known.set(id, state); } - if (!Array.isArray(step.response.schedules)) return step; + if (!Array.isArray(step.response.schedules)) { + if (step.status === 200 && Object.hasOwn(step.response, 'spec') && step.response.schedule_id) { + checkedDispatchSummary(step.response, known.get(step.response.schedule_id), target); + const {dispatch_summary, ...response} = step.response; + return {...step, response}; + } + return step; + } const schedules = step.response.schedules.map(item => { const fields = ['failures_count', 'skipped_trigger_count', 'latest_workflow_instance_id', 'current_run']; const present = fields.filter(field => Object.hasOwn(item, field)); if (target !== 'rust' && present.length === 0) return item; assert.deepStrictEqual(present, fields, 'complete schedule list summary'); const state = known.get(item.schedule_id) ?? {failures: 0, skipped: 0, latest: null}; + checkedDispatchSummary(item, state, target); + fields.push('dispatch_summary'); const skipFields = ['last_skip_reason', 'last_skipped_at']; if (target === 'rust' || skipFields.some(field => Object.hasOwn(item, field))) { checkedLastSkip(item, state.skipped, raw); diff --git a/scripts/conformance/server-parity/schedule-dispatch-summary-contract.mjs b/scripts/conformance/server-parity/schedule-dispatch-summary-contract.mjs new file mode 100644 index 000000000..04877bac1 --- /dev/null +++ b/scripts/conformance/server-parity/schedule-dispatch-summary-contract.mjs @@ -0,0 +1,69 @@ +import assert from 'node:assert/strict'; + +export function checkDispatchSummary(summary) { + assert.ok(summary && typeof summary === 'object', 'complete dispatch summary'); + assert.deepStrictEqual(Object.keys(summary).sort(), ['buffered_actions_count', 'last_outcome', 'state', 'version']); + assert.equal(summary.version, 1, 'dispatch summary version'); + assert.ok(Buffer.byteLength(JSON.stringify(summary)) <= 4096, 'bounded complete summary'); + if (summary.state === 'unavailable') { + assert.deepStrictEqual([summary.last_outcome, summary.buffered_actions_count], [null, null]); + return; + } + assert.ok(Number.isSafeInteger(summary.buffered_actions_count) && summary.buffered_actions_count >= 0, 'current buffer count'); + if (summary.state === 'never') { + assert.deepStrictEqual([summary.last_outcome, summary.buffered_actions_count], [null, 0]); + return; + } + assert.equal(summary.state, 'known'); + const last = summary.last_outcome; + assert.ok(last && typeof last === 'object', 'complete dispatch outcome'); + assert.deepStrictEqual(Object.keys(last).sort(), ['id', 'outcome', 'reason', 'recorded_at', 'workflow_instance_id', 'workflow_run_id']); + const ulid = /^[0-7][0-9A-HJKMNP-TV-Z]{25}$/; + assert.match(last.id, ulid, 'complete dispatch identity'); + assert.match(last.recorded_at, /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{6}Z$/, 'exact dispatch instant'); + const instant = new Date(last.recorded_at); + assert.ok(Number.isFinite(instant.getTime()), 'actual dispatch instant'); + assert.equal(instant.toISOString().slice(0, 19), last.recorded_at.slice(0, 19), 'dispatch calendar fields'); + assert.ok(['started', 'buffered', 'skipped', 'failed'].includes(last.outcome), 'dispatch outcome kind'); + if (last.outcome === 'started') { + assert.equal(last.reason, null); + assert.match(last.workflow_instance_id, ulid); + assert.match(last.workflow_run_id, ulid); + } else { + assert.deepStrictEqual([last.workflow_instance_id, last.workflow_run_id], [null, null]); + if (last.outcome === 'buffered') assert.equal(last.reason, null); + else assert.ok(typeof last.reason === 'string' && [...last.reason].length <= 64 && Buffer.byteLength(last.reason) <= 256, + 'complete bounded reason'); + } +} + +// Manual policy vectors have no scheduler/worker transitions. Validate each +// additive detail against the preceding actual control receipts before the +// historical PHP comparison. Raw observations remain unchanged. +export function checkedPolicyDispatchSummaries(steps, target) { + const states = new Map(); + return steps.map(step => { + const id = step.response.schedule_id; + const state = states.get(id) ?? {last: null, count: 0}; + if (step.status === 200 && step.request.endsWith('/trigger')) { + const result = step.response; + const kind = {triggered: 'started', buffered: 'buffered', skipped: 'skipped', buffer_full: 'skipped'}[result.outcome]; + assert.ok(kind, 'recorded manual dispatch outcome'); + state.last = {kind, workflow: result.workflow_id ?? null, run: result.run_id ?? null, + reason: result.outcome === 'buffer_full' ? 'buffer_full' : result.reason ?? null}; + if (kind === 'buffered') state.count = result.buffer_depth; + states.set(id, state); + } + if (step.status !== 200 || !Object.hasOwn(step.response, 'spec') || !id) return step; + if (target !== 'rust' && !Object.hasOwn(step.response, 'dispatch_summary')) return step; + const summary = step.response.dispatch_summary; + checkDispatchSummary(summary); + assert.equal(summary.state, state.last ? 'known' : 'never', 'detail follows preceding manual controls'); + assert.equal(summary.buffered_actions_count, state.count, 'detail follows actual buffer writes'); + if (state.last) assert.deepStrictEqual([summary.last_outcome.outcome, summary.last_outcome.reason, + summary.last_outcome.workflow_instance_id, summary.last_outcome.workflow_run_id], + [state.last.kind, state.last.reason, state.last.workflow, state.last.run], 'complete last manual outcome'); + const {dispatch_summary, ...response} = step.response; + return {...step, response}; + }); +} diff --git a/scripts/conformance/server-parity/schedule-policies-contract.mjs b/scripts/conformance/server-parity/schedule-policies-contract.mjs index 3fbfa6898..7fe092404 100644 --- a/scripts/conformance/server-parity/schedule-policies-contract.mjs +++ b/scripts/conformance/server-parity/schedule-policies-contract.mjs @@ -1,4 +1,5 @@ import assert from 'node:assert/strict'; +import {checkedPolicyDispatchSummaries} from './schedule-dispatch-summary-contract.mjs'; import {readFileSync} from 'node:fs'; // Published PHP's reviewed, normalized responses to every step. @@ -48,7 +49,7 @@ function statusDifferences(steps) { [`step ${index} ${step.request}: ${step.status}, expected ${STATUSES[index]}: ${JSON.stringify(step.response).slice(0, 400)}`]); } -export function checkSchedulePolicies(fixture, observation, workflowId) { +export function checkSchedulePolicies(fixture, observation, workflowId, target) { const state = observation.schedule_policies; assert.ok(state && typeof state === 'object', 'actual schedule policy observation'); if (observation.mode === 'embedded') { @@ -63,7 +64,8 @@ export function checkSchedulePolicies(fixture, observation, workflowId) { assert.ok(Number.isInteger(state.retries) && state.retries >= 0, 'recorded lock retries'); const raw = state.steps; const names = {[namespace]: '@namespace', [state.queue]: '@queue'}; - const steps = raw.map(step => ({request: step.request, status: step.status, response: normalized(step.response, names)})); + const steps = checkedPolicyDispatchSummaries(raw, target) + .map(step => ({request: step.request, status: step.status, response: normalized(step.response, names)})); assert.deepStrictEqual(steps.map(step => step.status), STATUSES, `schedule step statuses (${steps.length} of ${STATUSES.length} steps)\n${statusDifferences(steps).join('\n')}`); const at = request => steps.filter(step => step.request === request); diff --git a/scripts/conformance/server-parity/schema.php b/scripts/conformance/server-parity/schema.php index 7f8c683ae..15cce4232 100644 --- a/scripts/conformance/server-parity/schema.php +++ b/scripts/conformance/server-parity/schema.php @@ -3,6 +3,7 @@ declare(strict_types=1); require_once __DIR__.'/ready-origin-schema.php'; +require_once __DIR__.'/dispatch-summary-schema.php'; // Inspect two independent SQLite files without loading either runtime. // The PHP file must come from the image pinned in php-baseline.json; this @@ -39,7 +40,7 @@ function catalog(string $filename): array } $php = catalog($argv[1]); -$native = projectSqliteReadyOrigin(catalog($argv[2])); +$native = projectSqliteDispatchSummary(projectSqliteReadyOrigin(catalog($argv[2]))); $nativeOnly = ['_sqlx_migrations', 'dw_server_schema', 'dw_task_completions', 'dw_poll_receipts', 'dw_workflow_tasks_poll', 'dw_query_cache_expiration', 'dw_poll_receipts_expiration', 'dw_query_cache', 'dw_worker_registration_incarnations', 'dw_worker_incarnation_authority', 'dw_worker_incarnation_retention', 'dw_worker_session_holders', 'dw_stream_reclaims', 'dw_service_call_deadlines', 'dw_stream_reclaims_due', 'dw_service_call_deadlines_due', 'dw_service_admission_counters', 'dw_service_admission_counters_expiry', 'dw_external_payload_deletions', 'dw_external_payload_deletions_uri', 'dw_external_payload_deletions_due', 'dw_run_command_contracts', 'dw_run_command_contracts_namespace', 'dw_task_queue_pauses', 'dw_command_intents', 'dw_command_intents_namespace']; $native = array_values(array_filter($native, static fn (array $row): bool => ! in_array($row['name'], $nativeOnly, true))); if ($php !== $native) { diff --git a/tests/Unit/NativeDispatchSummarySchemaTest.php b/tests/Unit/NativeDispatchSummarySchemaTest.php new file mode 100644 index 000000000..d8b945aa9 --- /dev/null +++ b/tests/Unit/NativeDispatchSummarySchemaTest.php @@ -0,0 +1,84 @@ + 15, 'mariadb' => 14, 'postgres' => 14] as $backend => $version) { + $path = __DIR__.'/../../rust/migrations/'.$backend.'/'; + $old = json_decode(file_get_contents($path.sprintf('%04d_catalog.json', $version)), true, flags: JSON_THROW_ON_ERROR); + $new = json_decode(file_get_contents($path.sprintf('%04d_catalog.json', $version + 1)), true, flags: JSON_THROW_ON_ERROR); + $project = $backend === 'postgres' ? 'projectPostgresDispatchSummary' : 'projectMysqlDispatchSummary'; + $this->assertSame($old, $project($new)); + foreach (['type', 'default', 'missing', 'duplicate', 'other'] as $mutation) { + $changed = $new; + $duplicate = null; + foreach ($changed as $index => &$row) { + if ($backend === 'postgres') { + if ($row[0] !== 'column' || ($row[2]['name'] ?? null) !== 'dispatch_summary') { + continue; + } + if ($mutation === 'missing') { + unset($changed[$index]); + } elseif ($mutation === 'duplicate') { + $duplicate = $row; + } else { + $field = ['type' => 'type', 'default' => 'default', 'other' => 'not_null'][$mutation]; + $row[2][$field] = ['type' => 'varchar', 'default' => '0', 'other' => true][$mutation]; + } + } elseif ($row[0] === 'workflow_schedules') { + $definition = $backend === 'mysql' + ? " `dispatch_summary` text COLLATE utf8mb4_unicode_ci,\n" + : " `dispatch_summary` text DEFAULT NULL,\n"; + $replacement = match ($mutation) { + 'type' => str_replace(' text ', ' varchar(64) ', $definition), + 'default' => str_replace(",\n", " DEFAULT 0,\n", $definition), + 'missing' => '', + 'duplicate' => $definition.$definition, + 'other' => str_replace('`dispatch_summary`', '`other`', $definition), + }; + $row[1] = str_replace($definition, $replacement, $row[1]); + } + } + unset($row); + if ($duplicate !== null) { + $changed[] = $duplicate; + } + try { + $project(array_values($changed)); + $this->fail('Changed native dispatch column was hidden.'); + } catch (RuntimeException $error) { + $this->assertStringStartsWith('Native dispatch summary', $error->getMessage()); + } + } + } + } + + public function test_sqlite_projection_preserves_every_other_definition(): void + { + $base = [['type' => 'table', 'name' => 'workflow_schedules', 'tbl_name' => 'workflow_schedules', + 'sql' => 'CREATE TABLE workflow_schedules (id TEXT, primary key (id))']]; + $new = $base; + $new[0]['sql'] = str_replace(', primary key', ', dispatch_summary TEXT NULL, primary key', $base[0]['sql']); + $this->assertSame($base, projectSqliteDispatchSummary($new)); + foreach (['TEXT NULL DEFAULT 0', 'TEXT NOT NULL', 'BLOB NULL', 'TEXT NULL, dispatch_summary TEXT NULL'] as $definition) { + $changed = $new; + $changed[0]['sql'] = str_replace('TEXT NULL', $definition, $new[0]['sql']); + try { + projectSqliteDispatchSummary($changed); + $this->fail('Changed SQLite dispatch column was hidden.'); + } catch (RuntimeException $error) { + $this->assertSame('Native dispatch summary definition mismatch.', $error->getMessage()); + } + } + $new[0]['sql'] = str_replace('id TEXT', 'id BLOB', $new[0]['sql']); + $this->assertNotSame($base, projectSqliteDispatchSummary($new), 'Unrelated schema corruption remains visible.'); + } +} diff --git a/tests/Unit/ScheduleDispatchSummaryContractTest.mjs b/tests/Unit/ScheduleDispatchSummaryContractTest.mjs new file mode 100644 index 000000000..bf4d812b2 --- /dev/null +++ b/tests/Unit/ScheduleDispatchSummaryContractTest.mjs @@ -0,0 +1,57 @@ +import assert from 'node:assert/strict'; +import test from 'node:test'; +import {checkDispatchSummary, checkedPolicyDispatchSummaries} from '../../scripts/conformance/server-parity/schedule-dispatch-summary-contract.mjs'; + +const started = {id: '01ARZ3NDEKTSV4RRFFQ69G5FAV', outcome: 'started', recorded_at: '2026-11-06T08:00:00.123000Z', + reason: null, workflow_instance_id: '01ARZ3NDEKTSV4RRFFQ69G5FAW', workflow_run_id: '01ARZ3NDEKTSV4RRFFQ69G5FAX'}; +const known = () => ({version: 1, state: 'known', last_outcome: structuredClone(started), buffered_actions_count: 0}); + +test('complete unknown and never states have distinct null/count authority', () => { + checkDispatchSummary({version: 1, state: 'unavailable', last_outcome: null, buffered_actions_count: null}); + checkDispatchSummary({version: 1, state: 'never', last_outcome: null, buffered_actions_count: 0}); + assert.throws(() => checkDispatchSummary({version: 1, state: 'unavailable', last_outcome: null, buffered_actions_count: 0})); + assert.throws(() => checkDispatchSummary({version: 1, state: 'never', buffered_actions_count: 0})); +}); + +test('all recorded outcomes preserve literal reasons and current counts', () => { + checkDispatchSummary(known()); + for (const outcome of ['skipped', 'failed', 'buffered']) { + const summary = known(); + Object.assign(summary.last_outcome, {outcome, workflow_instance_id: null, workflow_run_id: null}); + for (const reason of outcome === 'buffered' ? [null] : ['', ' ', '\0', ' denied ', '😀'.repeat(64)]) { + summary.last_outcome.reason = reason; + summary.buffered_actions_count = 2; + checkDispatchSummary(summary); + summary.buffered_actions_count = 0; + checkDispatchSummary(summary); + } + } +}); + +for (const [name, mutate] of [ + ['lowercase identity', s => { s.last_outcome.id = s.last_outcome.id.toLowerCase(); }], + ['overflow identity', s => { s.last_outcome.id = '81ARZ3NDEKTSV4RRFFQ69G5FAV'; }], + ['missing outcome member', s => { delete s.last_outcome.reason; }], + ['noninteger count', s => { s.buffered_actions_count = '0'; }], + ['unsafe count', s => { s.buffered_actions_count = Number.MAX_SAFE_INTEGER + 1; }], + ['invalid calendar', s => { s.last_outcome.recorded_at = '2026-02-30T08:00:00.123000Z'; }], + ['lost precision', s => { s.last_outcome.recorded_at = '2026-11-06T08:00:00.123Z'; }], + ['oversized reason', s => { Object.assign(s.last_outcome, {outcome: 'failed', reason: 'x'.repeat(65), workflow_instance_id: null, workflow_run_id: null}); }], +]) test(`dispatch validation refuses ${name}`, () => { + const summary = known(); mutate(summary); assert.throws(() => checkDispatchSummary(summary)); +}); + +test('native policy comparison binds raw detail to the preceding actual trigger receipt', () => { + const steps = [ + {status: 200, request: 'POST schedules/hourly/trigger', response: {schedule_id: 'hourly', outcome: 'triggered', workflow_id: started.workflow_instance_id, run_id: started.workflow_run_id}}, + {status: 200, request: 'GET schedules/hourly', response: {schedule_id: 'hourly', spec: {}, dispatch_summary: known()}}, + ]; + const original = structuredClone(steps); + assert.deepStrictEqual(checkedPolicyDispatchSummaries(steps, 'rust')[1].response, {schedule_id: 'hourly', spec: {}}); + assert.deepStrictEqual(steps, original, 'retained raw observations keep the validated summary'); + steps[1].response.dispatch_summary.last_outcome.workflow_run_id = started.workflow_instance_id; + assert.throws(() => checkedPolicyDispatchSummaries(steps, 'rust'), /complete last manual outcome/); + delete steps[1].response.dispatch_summary; + assert.throws(() => checkedPolicyDispatchSummaries(steps, 'rust'), /complete dispatch summary/); + assert.doesNotThrow(() => checkedPolicyDispatchSummaries(steps, 'php'), 'older PHP keeps its frozen response'); +}); diff --git a/tests/Unit/ServerParityScheduleCatalogContractTest.mjs b/tests/Unit/ServerParityScheduleCatalogContractTest.mjs index e0cea025b..c37fcf81d 100644 --- a/tests/Unit/ServerParityScheduleCatalogContractTest.mjs +++ b/tests/Unit/ServerParityScheduleCatalogContractTest.mjs @@ -77,6 +77,21 @@ function nativeModel() { item.last_skipped_at = '2026-11-05T12:00:01.123456Z'; } } + const lastBySchedule = new Map(); + for (const step of steps) { + if (step.status === 200 && step.request.endsWith('/backfill')) { + for (const result of step.response.results) lastBySchedule.set(step.response.schedule_id, result); + } + const rows = step.response.schedules ?? (Object.hasOwn(step.response, 'spec') && step.response.schedule_id ? [step.response] : []); + for (const item of rows) { + const last = lastBySchedule.get(item.schedule_id); + item.dispatch_summary = {version: 1, state: last ? 'known' : 'never', buffered_actions_count: 0, + last_outcome: last ? {id: String(sequence++).padStart(26, '0'), outcome: last.outcome, + recorded_at: '2026-11-05T12:00:01.123456Z', reason: last.outcome === 'started' ? null : 'status_not_triggerable', + workflow_instance_id: last.outcome === 'started' ? last.workflow_id : null, + workflow_run_id: last.outcome === 'started' ? (item.current_run?.run_id ?? '01ARZ3NDEKTSV4RRFFQ69G5FAX') : null} : null}; + } + } return observation; } @@ -90,6 +105,14 @@ test('native target cannot omit all new summary fields', () => { assert.throws(() => checkScheduleCatalog(fixture, model(), workflowId, 'rust'), /complete schedule list summary/); }); for (const [label, mutate] of [ + ['missing dispatch summary', o => { delete o.schedule_catalog.steps[4].response.schedules[0].dispatch_summary; }], + ['partial dispatch summary', o => { delete o.schedule_catalog.steps[4].response.schedules[0].dispatch_summary.last_outcome; }], + ['unsupported dispatch summary', o => { o.schedule_catalog.steps[4].response.schedules[0].dispatch_summary.version = 2; }], + ['invented never dispatch', o => { o.schedule_catalog.steps[71].response.schedules.find(item => item.schedule_id === 'beta').dispatch_summary = {version: 1, state: 'never', last_outcome: null, buffered_actions_count: 0}; }], + ['wrong dispatch workflow', o => { o.schedule_catalog.steps[71].response.schedules[0].dispatch_summary.last_outcome.workflow_instance_id = '01ARZ3NDEKTSV4RRFFQ69G5FAX'; }], + ['wrong dispatch reason', o => { o.schedule_catalog.steps[71].response.schedules.find(item => item.schedule_id === 'beta').dispatch_summary.last_outcome.reason = 'other'; }], + ['partial detail dispatch', o => { delete o.schedule_catalog.steps[59].response.dispatch_summary.buffered_actions_count; }], + ['invented buffer count', o => { o.schedule_catalog.steps[4].response.schedules[0].dispatch_summary.buffered_actions_count = '0'; }], ['partial summary', o => { delete o.schedule_catalog.steps[4].response.schedules[0].failures_count; }], ['wrong failure count', o => { o.schedule_catalog.steps[4].response.schedules[0].failures_count = 1; }], ['wrong skip count', o => { o.schedule_catalog.steps[71].response.schedules[1].skipped_trigger_count = 0; }],