Close P0 auth gaps for lineage/runs, stage ABAC fail-closed, and project:create; add IAM migrations 00021-23, me settings APIs, schema v2 manifests, orchestrator skeleton, and gate A regression coverage. Co-authored-by: Cursor <cursoragent@cursor.com>
20 lines
721 B
SQL
20 lines
721 B
SQL
-- +goose Up
|
|
-- Instance integrity: stage position unique, frozen task metadata columns
|
|
|
|
CREATE UNIQUE INDEX IF NOT EXISTS uq_stage_instance_position
|
|
ON project_stage_instances (workflow_instance_id, position)
|
|
WHERE position > 0;
|
|
|
|
ALTER TABLE project_doc_task_instances
|
|
ADD COLUMN IF NOT EXISTS executor_key TEXT NOT NULL DEFAULT '',
|
|
ADD COLUMN IF NOT EXISTS template_version INT NOT NULL DEFAULT 0,
|
|
ADD COLUMN IF NOT EXISTS quality_gate_key TEXT NOT NULL DEFAULT '';
|
|
|
|
-- +goose Down
|
|
ALTER TABLE project_doc_task_instances
|
|
DROP COLUMN IF EXISTS quality_gate_key,
|
|
DROP COLUMN IF EXISTS template_version,
|
|
DROP COLUMN IF EXISTS executor_key;
|
|
|
|
DROP INDEX IF EXISTS uq_stage_instance_position;
|