/** * SQL schema definitions for checkpoint storage adapters. * * Provides DDL strings for both Postgres and SQLite that define the * checkpoints table with proper indexing for query performance. */ /** * Postgres DDL for the checkpoints table. * Uses JSONB for context and TIMESTAMPTZ for timestamps. * Composite primary key on (run_id, step) for checkpoint ordering. */ export declare const POSTGRES_CHECKPOINTS_DDL = "\nCREATE TABLE IF NOT EXISTS checkpoints (\n run_id TEXT NOT NULL,\n pipeline_id TEXT NOT NULL,\n step INTEGER NOT NULL,\n status TEXT NOT NULL,\n context JSONB NOT NULL,\n created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n expires_at TIMESTAMPTZ,\n step_name TEXT,\n pause_metadata JSONB,\n PRIMARY KEY (run_id, step)\n);\n\nCREATE INDEX IF NOT EXISTS idx_checkpoints_run_id ON checkpoints (run_id);\nCREATE INDEX IF NOT EXISTS idx_checkpoints_pipeline_id ON checkpoints (pipeline_id);\nCREATE INDEX IF NOT EXISTS idx_checkpoints_status ON checkpoints (status);\nCREATE INDEX IF NOT EXISTS idx_checkpoints_expires_at ON checkpoints (expires_at) WHERE expires_at IS NOT NULL;\n"; /** * SQLite DDL for the checkpoints table. * Uses TEXT for JSON storage and timestamps (ISO 8601 strings). * Composite primary key on (run_id, step) for checkpoint ordering. */ export declare const SQLITE_CHECKPOINTS_DDL = "\nCREATE TABLE IF NOT EXISTS checkpoints (\n run_id TEXT NOT NULL,\n pipeline_id TEXT NOT NULL,\n step INTEGER NOT NULL,\n status TEXT NOT NULL,\n context TEXT NOT NULL,\n created_at TEXT NOT NULL DEFAULT (datetime('now')),\n updated_at TEXT NOT NULL DEFAULT (datetime('now')),\n expires_at TEXT,\n step_name TEXT,\n pause_metadata TEXT,\n PRIMARY KEY (run_id, step)\n);\n\nCREATE INDEX IF NOT EXISTS idx_checkpoints_run_id ON checkpoints (run_id);\nCREATE INDEX IF NOT EXISTS idx_checkpoints_pipeline_id ON checkpoints (pipeline_id);\nCREATE INDEX IF NOT EXISTS idx_checkpoints_status ON checkpoints (status);\nCREATE INDEX IF NOT EXISTS idx_checkpoints_expires_at ON checkpoints (expires_at);\n"; //# sourceMappingURL=schema.d.ts.map