import { type Kysely } from 'kysely';
/**
 * `execution_runs` / `execution_jobs` / `execution_steps` cold-store
 * schema additions.
 *
 * Phase C of the cold-storage archival system. See
 *
 * Each table gets `archived_at TIMESTAMPTZ NULL` and
 * `archive_object_key TEXT NULL` (set inside the archive tx before the
 * DELETE; survivors carry NULL — same pattern as Phase B's migration
 * 004 for `run_events`).
 *
 * Tenant column denormalization: the orchestrator side partitions by
 * `routing_key`, but only `execution_runs` carries the column today.
 * `execution_jobs` and `execution_steps` reference the run by `run_id`
 * and would otherwise need a 3-table JOIN at every archive cycle. We
 * denormalize `routing_key` onto both tables and backfill from the
 * existing run rows. Backfill is one-shot inside this migration. New
 * inserts must populate the column going forward (enforced at the
 * application layer in the same phase).
 *
 * The denormalized column is left NULLable for safety: if an insert
 * site is missed in the rollout, the row still lands in PG; the
 * cold-store adapter's `listEligiblePartitions` skips NULLs (no
 * tenant ⇒ no archive). A follow-up migration may tighten to NOT NULL
 * once we're confident every insert site is updated.
 *
 * Composite indexes added for the archiver's
 * `listEligiblePartitions` discovery query
 * (`GROUP BY routing_key, DATE(created_at)`):
 *
 *   - `idx_execution_runs_routing_key_created  (routing_key, created_at)`
 *   - `idx_execution_jobs_routing_key_created  (routing_key, created_at)`
 *   - `idx_execution_steps_routing_key_created (routing_key, created_at)`
 */
export declare function up(db: Kysely<unknown>): Promise<void>;
export declare function down(db: Kysely<unknown>): Promise<void>;
//# sourceMappingURL=006_runs_jobs_steps_archived_at.d.ts.map