Files
dev-puppeteer/packages/db/src/migrations/meta/0000_snapshot.json
2026-05-09 22:30:49 +09:00

1598 lines
42 KiB
JSON

{
"id": "b51e53f8-fff2-4d57-9ec7-fbd597bde7f6",
"prevId": "00000000-0000-0000-0000-000000000000",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.agent_personas": {
"name": "agent_personas",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"version": {
"name": "version",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"hash": {
"name": "hash",
"type": "text",
"primaryKey": false,
"notNull": true
},
"definition": {
"name": "definition",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {
"agent_personas_hash_unique": {
"name": "agent_personas_hash_unique",
"columns": [
{
"expression": "hash",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": true,
"concurrently": false,
"method": "btree",
"with": {}
},
"agent_personas_name_version_unique": {
"name": "agent_personas_name_version_unique",
"columns": [
{
"expression": "name",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "version",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": true,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.approval_decisions": {
"name": "approval_decisions",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"approval_request_id": {
"name": "approval_request_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"action": {
"name": "action",
"type": "text",
"primaryKey": false,
"notNull": true
},
"comment": {
"name": "comment",
"type": "text",
"primaryKey": false,
"notNull": false
},
"decided_at": {
"name": "decided_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"idempotency_key": {
"name": "idempotency_key",
"type": "text",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {
"approval_decisions_idempotency_key_unique": {
"name": "approval_decisions_idempotency_key_unique",
"columns": [
{
"expression": "idempotency_key",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": true,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {
"approval_decisions_approval_request_id_approval_requests_id_fk": {
"name": "approval_decisions_approval_request_id_approval_requests_id_fk",
"tableFrom": "approval_decisions",
"tableTo": "approval_requests",
"columnsFrom": ["approval_request_id"],
"columnsTo": ["id"],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.approval_requests": {
"name": "approval_requests",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"run_id": {
"name": "run_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"phase_id": {
"name": "phase_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"gate_key": {
"name": "gate_key",
"type": "text",
"primaryKey": false,
"notNull": true
},
"state": {
"name": "state",
"type": "text",
"primaryKey": false,
"notNull": true
},
"idempotency_key": {
"name": "idempotency_key",
"type": "text",
"primaryKey": false,
"notNull": true
},
"payload": {
"name": "payload",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"resolved_at": {
"name": "resolved_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"approval_requests_idempotency_key_unique": {
"name": "approval_requests_idempotency_key_unique",
"columns": [
{
"expression": "idempotency_key",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": true,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {
"approval_requests_run_id_runs_id_fk": {
"name": "approval_requests_run_id_runs_id_fk",
"tableFrom": "approval_requests",
"tableTo": "runs",
"columnsFrom": ["run_id"],
"columnsTo": ["id"],
"onDelete": "no action",
"onUpdate": "no action"
},
"approval_requests_phase_id_run_phases_id_fk": {
"name": "approval_requests_phase_id_run_phases_id_fk",
"tableFrom": "approval_requests",
"tableTo": "run_phases",
"columnsFrom": ["phase_id"],
"columnsTo": ["id"],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.artifacts": {
"name": "artifacts",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"run_id": {
"name": "run_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"phase_id": {
"name": "phase_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"path": {
"name": "path",
"type": "text",
"primaryKey": false,
"notNull": true
},
"schema_id": {
"name": "schema_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"hash": {
"name": "hash",
"type": "text",
"primaryKey": false,
"notNull": true
},
"valid": {
"name": "valid",
"type": "boolean",
"primaryKey": false,
"notNull": true
},
"validation_error": {
"name": "validation_error",
"type": "jsonb",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {
"artifacts_run_id_path_hash_unique": {
"name": "artifacts_run_id_path_hash_unique",
"columns": [
{
"expression": "run_id",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "path",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "hash",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": true,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {
"artifacts_run_id_runs_id_fk": {
"name": "artifacts_run_id_runs_id_fk",
"tableFrom": "artifacts",
"tableTo": "runs",
"columnsFrom": ["run_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
"artifacts_phase_id_run_phases_id_fk": {
"name": "artifacts_phase_id_run_phases_id_fk",
"tableFrom": "artifacts",
"tableTo": "run_phases",
"columnsFrom": ["phase_id"],
"columnsTo": ["id"],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.backtest_iterations": {
"name": "backtest_iterations",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"run_id": {
"name": "run_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"payload": {
"name": "payload",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"backtest_iterations_run_id_runs_id_fk": {
"name": "backtest_iterations_run_id_runs_id_fk",
"tableFrom": "backtest_iterations",
"tableTo": "runs",
"columnsFrom": ["run_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.backtest_metrics": {
"name": "backtest_metrics",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"run_id": {
"name": "run_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"payload": {
"name": "payload",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"backtest_metrics_run_id_runs_id_fk": {
"name": "backtest_metrics_run_id_runs_id_fk",
"tableFrom": "backtest_metrics",
"tableTo": "runs",
"columnsFrom": ["run_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.commands": {
"name": "commands",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"run_id": {
"name": "run_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"phase_id": {
"name": "phase_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"kind": {
"name": "kind",
"type": "text",
"primaryKey": false,
"notNull": true
},
"argv": {
"name": "argv",
"type": "text[]",
"primaryKey": false,
"notNull": true
},
"cwd": {
"name": "cwd",
"type": "text",
"primaryKey": false,
"notNull": true
},
"exit_code": {
"name": "exit_code",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"stdout_path": {
"name": "stdout_path",
"type": "text",
"primaryKey": false,
"notNull": false
},
"stderr_path": {
"name": "stderr_path",
"type": "text",
"primaryKey": false,
"notNull": false
},
"started_at": {
"name": "started_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"ended_at": {
"name": "ended_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"commands_run_id_runs_id_fk": {
"name": "commands_run_id_runs_id_fk",
"tableFrom": "commands",
"tableTo": "runs",
"columnsFrom": ["run_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
"commands_phase_id_run_phases_id_fk": {
"name": "commands_phase_id_run_phases_id_fk",
"tableFrom": "commands",
"tableTo": "run_phases",
"columnsFrom": ["phase_id"],
"columnsTo": ["id"],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.review_findings": {
"name": "review_findings",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"run_id": {
"name": "run_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"phase_id": {
"name": "phase_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"reviewer_role": {
"name": "reviewer_role",
"type": "text",
"primaryKey": false,
"notNull": true
},
"severity": {
"name": "severity",
"type": "text",
"primaryKey": false,
"notNull": true
},
"category": {
"name": "category",
"type": "text",
"primaryKey": false,
"notNull": true
},
"file_path": {
"name": "file_path",
"type": "text",
"primaryKey": false,
"notNull": false
},
"line": {
"name": "line",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"summary": {
"name": "summary",
"type": "text",
"primaryKey": false,
"notNull": true
},
"evidence": {
"name": "evidence",
"type": "text",
"primaryKey": false,
"notNull": false
},
"verifier_status": {
"name": "verifier_status",
"type": "text",
"primaryKey": false,
"notNull": true,
"default": "'unverified'"
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"review_findings_run_id_runs_id_fk": {
"name": "review_findings_run_id_runs_id_fk",
"tableFrom": "review_findings",
"tableTo": "runs",
"columnsFrom": ["run_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
"review_findings_phase_id_run_phases_id_fk": {
"name": "review_findings_phase_id_run_phases_id_fk",
"tableFrom": "review_findings",
"tableTo": "run_phases",
"columnsFrom": ["phase_id"],
"columnsTo": ["id"],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.run_bindings": {
"name": "run_bindings",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"run_id": {
"name": "run_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"role_id": {
"name": "role_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"persona_id": {
"name": "persona_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"persona_hash": {
"name": "persona_hash",
"type": "text",
"primaryKey": false,
"notNull": true
},
"backend": {
"name": "backend",
"type": "text",
"primaryKey": false,
"notNull": true
},
"binding_hash": {
"name": "binding_hash",
"type": "text",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {
"run_bindings_run_id_role_id_unique": {
"name": "run_bindings_run_id_role_id_unique",
"columns": [
{
"expression": "run_id",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "role_id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": true,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {
"run_bindings_run_id_runs_id_fk": {
"name": "run_bindings_run_id_runs_id_fk",
"tableFrom": "run_bindings",
"tableTo": "runs",
"columnsFrom": ["run_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
"run_bindings_persona_id_agent_personas_id_fk": {
"name": "run_bindings_persona_id_agent_personas_id_fk",
"tableFrom": "run_bindings",
"tableTo": "agent_personas",
"columnsFrom": ["persona_id"],
"columnsTo": ["id"],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.run_events": {
"name": "run_events",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "bigserial",
"primaryKey": true,
"notNull": true
},
"run_id": {
"name": "run_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"phase_id": {
"name": "phase_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"seq": {
"name": "seq",
"type": "bigint",
"primaryKey": false,
"notNull": true
},
"type": {
"name": "type",
"type": "text",
"primaryKey": false,
"notNull": true
},
"payload": {
"name": "payload",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"idempotency_key": {
"name": "idempotency_key",
"type": "text",
"primaryKey": false,
"notNull": true
},
"ts": {
"name": "ts",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {
"run_events_run_id_seq_unique": {
"name": "run_events_run_id_seq_unique",
"columns": [
{
"expression": "run_id",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "seq",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": true,
"concurrently": false,
"method": "btree",
"with": {}
},
"run_events_run_id_idempotency_key_unique": {
"name": "run_events_run_id_idempotency_key_unique",
"columns": [
{
"expression": "run_id",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "idempotency_key",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": true,
"concurrently": false,
"method": "btree",
"with": {}
},
"run_events_run_id_ts_idx": {
"name": "run_events_run_id_ts_idx",
"columns": [
{
"expression": "run_id",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "ts",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {
"run_events_run_id_runs_id_fk": {
"name": "run_events_run_id_runs_id_fk",
"tableFrom": "run_events",
"tableTo": "runs",
"columnsFrom": ["run_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
},
"run_events_phase_id_run_phases_id_fk": {
"name": "run_events_phase_id_run_phases_id_fk",
"tableFrom": "run_events",
"tableTo": "run_phases",
"columnsFrom": ["phase_id"],
"columnsTo": ["id"],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.run_inputs": {
"name": "run_inputs",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"run_id": {
"name": "run_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"requirements_md": {
"name": "requirements_md",
"type": "text",
"primaryKey": false,
"notNull": true
},
"objective": {
"name": "objective",
"type": "jsonb",
"primaryKey": false,
"notNull": false
},
"extra": {
"name": "extra",
"type": "jsonb",
"primaryKey": false,
"notNull": false
},
"input_hash": {
"name": "input_hash",
"type": "text",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {
"run_inputs_run_id_unique": {
"name": "run_inputs_run_id_unique",
"columns": [
{
"expression": "run_id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": true,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {
"run_inputs_run_id_runs_id_fk": {
"name": "run_inputs_run_id_runs_id_fk",
"tableFrom": "run_inputs",
"tableTo": "runs",
"columnsFrom": ["run_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.run_phases": {
"name": "run_phases",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"run_id": {
"name": "run_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"phase_key": {
"name": "phase_key",
"type": "text",
"primaryKey": false,
"notNull": true
},
"seq": {
"name": "seq",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"state": {
"name": "state",
"type": "text",
"primaryKey": false,
"notNull": true
},
"attempts": {
"name": "attempts",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"started_at": {
"name": "started_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"ended_at": {
"name": "ended_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {
"run_phases_run_id_phase_key_unique": {
"name": "run_phases_run_id_phase_key_unique",
"columns": [
{
"expression": "run_id",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "phase_key",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": true,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {
"run_phases_run_id_runs_id_fk": {
"name": "run_phases_run_id_runs_id_fk",
"tableFrom": "run_phases",
"tableTo": "runs",
"columnsFrom": ["run_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.runs": {
"name": "runs",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"template_id": {
"name": "template_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"template_hash": {
"name": "template_hash",
"type": "text",
"primaryKey": false,
"notNull": true
},
"state": {
"name": "state",
"type": "text",
"primaryKey": false,
"notNull": true
},
"repo_path": {
"name": "repo_path",
"type": "text",
"primaryKey": false,
"notNull": true
},
"base_branch": {
"name": "base_branch",
"type": "text",
"primaryKey": false,
"notNull": true
},
"worktree_root": {
"name": "worktree_root",
"type": "text",
"primaryKey": false,
"notNull": true
},
"current_phase_id": {
"name": "current_phase_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"started_at": {
"name": "started_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"ended_at": {
"name": "ended_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"final_report_path": {
"name": "final_report_path",
"type": "text",
"primaryKey": false,
"notNull": false
},
"paused_from_state": {
"name": "paused_from_state",
"type": "text",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {
"ux_active_run_repo_base": {
"name": "ux_active_run_repo_base",
"columns": [
{
"expression": "repo_path",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "base_branch",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": true,
"where": "\"runs\".\"state\" NOT IN ('completed', 'failed', 'aborted')",
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {
"runs_template_id_workflow_templates_id_fk": {
"name": "runs_template_id_workflow_templates_id_fk",
"tableFrom": "runs",
"tableTo": "workflow_templates",
"columnsFrom": ["template_id"],
"columnsTo": ["id"],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.tui_sessions": {
"name": "tui_sessions",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"run_id": {
"name": "run_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"role_id": {
"name": "role_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"backend": {
"name": "backend",
"type": "text",
"primaryKey": false,
"notNull": true
},
"cwd": {
"name": "cwd",
"type": "text",
"primaryKey": false,
"notNull": true
},
"expected_artifact_path": {
"name": "expected_artifact_path",
"type": "text",
"primaryKey": false,
"notNull": false
},
"expected_schema": {
"name": "expected_schema",
"type": "text",
"primaryKey": false,
"notNull": false
},
"last_prompt_hash": {
"name": "last_prompt_hash",
"type": "text",
"primaryKey": false,
"notNull": false
},
"last_prompt_at": {
"name": "last_prompt_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"last_capture_seq": {
"name": "last_capture_seq",
"type": "bigint",
"primaryKey": false,
"notNull": true,
"default": "0"
},
"last_known_pane_pid": {
"name": "last_known_pane_pid",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"tmux_session": {
"name": "tmux_session",
"type": "text",
"primaryKey": false,
"notNull": false
},
"tmux_window": {
"name": "tmux_window",
"type": "text",
"primaryKey": false,
"notNull": false
},
"state": {
"name": "state",
"type": "text",
"primaryKey": false,
"notNull": true
},
"recovery_attempts": {
"name": "recovery_attempts",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {
"tui_sessions_run_id_role_id_unique": {
"name": "tui_sessions_run_id_role_id_unique",
"columns": [
{
"expression": "run_id",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "role_id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": true,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {
"tui_sessions_run_id_runs_id_fk": {
"name": "tui_sessions_run_id_runs_id_fk",
"tableFrom": "tui_sessions",
"tableTo": "runs",
"columnsFrom": ["run_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.tui_transcript_chunks": {
"name": "tui_transcript_chunks",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "bigserial",
"primaryKey": true,
"notNull": true
},
"session_id": {
"name": "session_id",
"type": "uuid",
"primaryKey": false,
"notNull": true
},
"seq": {
"name": "seq",
"type": "bigint",
"primaryKey": false,
"notNull": true
},
"content": {
"name": "content",
"type": "text",
"primaryKey": false,
"notNull": true
},
"captured_at": {
"name": "captured_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {
"tui_transcript_chunks_session_id_seq_unique": {
"name": "tui_transcript_chunks_session_id_seq_unique",
"columns": [
{
"expression": "session_id",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "seq",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": true,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {
"tui_transcript_chunks_session_id_tui_sessions_id_fk": {
"name": "tui_transcript_chunks_session_id_tui_sessions_id_fk",
"tableFrom": "tui_transcript_chunks",
"tableTo": "tui_sessions",
"columnsFrom": ["session_id"],
"columnsTo": ["id"],
"onDelete": "cascade",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
},
"public.workflow_templates": {
"name": "workflow_templates",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "uuid",
"primaryKey": true,
"notNull": true,
"default": "gen_random_uuid()"
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"version": {
"name": "version",
"type": "integer",
"primaryKey": false,
"notNull": true
},
"hash": {
"name": "hash",
"type": "text",
"primaryKey": false,
"notNull": true
},
"definition": {
"name": "definition",
"type": "jsonb",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {
"workflow_templates_hash_unique": {
"name": "workflow_templates_hash_unique",
"columns": [
{
"expression": "hash",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": true,
"concurrently": false,
"method": "btree",
"with": {}
},
"workflow_templates_name_version_unique": {
"name": "workflow_templates_name_version_unique",
"columns": [
{
"expression": "name",
"isExpression": false,
"asc": true,
"nulls": "last"
},
{
"expression": "version",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": true,
"concurrently": false,
"method": "btree",
"with": {}
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": false
}
},
"enums": {},
"schemas": {},
"sequences": {},
"roles": {},
"policies": {},
"views": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {}
}
}