Q108: deliverables under review are held until approved instead of written first
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4765683b86
commit
34c5557a32
13 files changed
+325
-87
No files matched your search
@@ -0,0 +1,27 @@
|
||||
export const heldDeliverablesSchema = `
|
||||
create table if not exists held_deliverables (
|
||||
id text primary key,
|
||||
org_id text not null references organizations(id) on delete cascade,
|
||||
approval_id text not null,
|
||||
kind text not null check (kind in ('file', 'document_create', 'document_update')),
|
||||
agent_id text,
|
||||
task_id text,
|
||||
goal_id text,
|
||||
project_id text,
|
||||
workspace_root text,
|
||||
relative_path text,
|
||||
document_id text,
|
||||
base_version integer,
|
||||
title text,
|
||||
doc_type text,
|
||||
reason text,
|
||||
content text not null,
|
||||
state text not null check (state in ('held', 'published', 'declined')),
|
||||
created_at text not null
|
||||
);
|
||||
create index if not exists held_deliverables_task on held_deliverables(task_id, state);
|
||||
create index if not exists held_deliverables_goal on held_deliverables(goal_id, state);
|
||||
|
||||
insert into schema_migrations(version, name, applied_at)
|
||||
values (86, 'held_deliverables', datetime('now'));
|
||||
`;
|
||||
@@ -84,6 +84,7 @@ import { connectorPendingAccountSchema } from "./migrations/082-connector-pendin
|
||||
import { connectorAccountLabelsSchema } from "./migrations/083-connector-account-labels";
|
||||
import { connectorGrantLimitsSchema } from "./migrations/084-connector-grant-limits";
|
||||
import { approvalSubjectSnapshotSchema } from "./migrations/085-approval-subject-snapshot";
|
||||
import { heldDeliverablesSchema } from "./migrations/086-held-deliverables";
|
||||
|
||||
interface Migration {
|
||||
version: number;
|
||||
@@ -177,6 +178,7 @@ const MIGRATIONS: Migration[] = [
|
||||
{ version: 83, name: "connector_account_labels", sql: connectorAccountLabelsSchema },
|
||||
{ version: 84, name: "connector_grant_limits", sql: connectorGrantLimitsSchema },
|
||||
{ version: 85, name: "approval_subject_snapshot", sql: approvalSubjectSnapshotSchema },
|
||||
{ version: 86, name: "held_deliverables", sql: heldDeliverablesSchema },
|
||||
];
|
||||
|
||||
const SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1].version;
|
||||
|
||||
Reference in new issue
Block a user