You've already forked agentic-coding-workflow
原型阶段
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
DROP TABLE IF EXISTS requirement_prototypes;
|
||||
-- 回滚前把 prototyping 行归并到 planning,否则重建不含 prototyping 的 CHECK 会失败。
|
||||
UPDATE requirements SET phase = 'planning' WHERE phase = 'prototyping';
|
||||
ALTER TABLE requirements DROP CONSTRAINT requirements_phase_check;
|
||||
ALTER TABLE requirements ADD CONSTRAINT requirements_phase_check
|
||||
CHECK (phase IN ('planning','auditing','implementing','reviewing','done'));
|
||||
@@ -0,0 +1,15 @@
|
||||
ALTER TABLE requirements DROP CONSTRAINT requirements_phase_check;
|
||||
ALTER TABLE requirements ADD CONSTRAINT requirements_phase_check
|
||||
CHECK (phase IN ('planning','prototyping','auditing','implementing','reviewing','done'));
|
||||
|
||||
CREATE TABLE requirement_prototypes (
|
||||
id UUID PRIMARY KEY,
|
||||
requirement_id UUID NOT NULL REFERENCES requirements(id) ON DELETE CASCADE,
|
||||
version INT NOT NULL,
|
||||
content TEXT NOT NULL,
|
||||
note TEXT NOT NULL DEFAULT '',
|
||||
created_by UUID NOT NULL REFERENCES users(id) ON DELETE RESTRICT,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
UNIQUE (requirement_id, version)
|
||||
);
|
||||
CREATE INDEX idx_requirement_prototypes_req ON requirement_prototypes(requirement_id);
|
||||
Reference in New Issue
Block a user