{ "version": "6", "dialect": "sqlite", "id": "43bf93b7-da71-4b69-b289-2991b6e54a69", "prevId": "d2fc5ac9-8232-401a-a55f-a97a4d9b6f21", "tables": { "agents": { "name": "agents", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true, "autoincrement": false }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "task_id": { "name": "task_id", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "session_id": { "name": "session_id", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "worktree_id": { "name": "worktree_id", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "'idle'" }, "mode": { "name": "mode", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "'execute'" }, "created_at": { "name": "created_at", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "updated_at": { "name": "updated_at", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false } }, "indexes": { "agents_name_unique": { "name": "agents_name_unique", "columns": [ "name" ], "isUnique": true } }, "foreignKeys": { "agents_task_id_tasks_id_fk": { "name": "agents_task_id_tasks_id_fk", "tableFrom": "agents", "tableTo": "tasks", "columnsFrom": [ "task_id" ], "columnsTo": [ "id" ], "onDelete": "set null", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "initiatives": { "name": "initiatives", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true, "autoincrement": false }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "'active'" }, "created_at": { "name": "created_at", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "updated_at": { "name": "updated_at", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "messages": { "name": "messages", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true, "autoincrement": false }, "sender_type": { "name": "sender_type", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "sender_id": { "name": "sender_id", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "recipient_type": { "name": "recipient_type", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "recipient_id": { "name": "recipient_id", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "type": { "name": "type", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "'info'" }, "content": { "name": "content", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "requires_response": { "name": "requires_response", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false, "default": false }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "'pending'" }, "parent_message_id": { "name": "parent_message_id", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "created_at": { "name": "created_at", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "updated_at": { "name": "updated_at", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false } }, "indexes": {}, "foreignKeys": { "messages_sender_id_agents_id_fk": { "name": "messages_sender_id_agents_id_fk", "tableFrom": "messages", "tableTo": "agents", "columnsFrom": [ "sender_id" ], "columnsTo": [ "id" ], "onDelete": "set null", "onUpdate": "no action" }, "messages_recipient_id_agents_id_fk": { "name": "messages_recipient_id_agents_id_fk", "tableFrom": "messages", "tableTo": "agents", "columnsFrom": [ "recipient_id" ], "columnsTo": [ "id" ], "onDelete": "set null", "onUpdate": "no action" }, "messages_parent_message_id_messages_id_fk": { "name": "messages_parent_message_id_messages_id_fk", "tableFrom": "messages", "tableTo": "messages", "columnsFrom": [ "parent_message_id" ], "columnsTo": [ "id" ], "onDelete": "set null", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "phase_dependencies": { "name": "phase_dependencies", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true, "autoincrement": false }, "phase_id": { "name": "phase_id", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "depends_on_phase_id": { "name": "depends_on_phase_id", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "created_at": { "name": "created_at", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false } }, "indexes": {}, "foreignKeys": { "phase_dependencies_phase_id_phases_id_fk": { "name": "phase_dependencies_phase_id_phases_id_fk", "tableFrom": "phase_dependencies", "tableTo": "phases", "columnsFrom": [ "phase_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" }, "phase_dependencies_depends_on_phase_id_phases_id_fk": { "name": "phase_dependencies_depends_on_phase_id_phases_id_fk", "tableFrom": "phase_dependencies", "tableTo": "phases", "columnsFrom": [ "depends_on_phase_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "phases": { "name": "phases", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true, "autoincrement": false }, "initiative_id": { "name": "initiative_id", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "number": { "name": "number", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "'pending'" }, "created_at": { "name": "created_at", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "updated_at": { "name": "updated_at", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false } }, "indexes": {}, "foreignKeys": { "phases_initiative_id_initiatives_id_fk": { "name": "phases_initiative_id_initiatives_id_fk", "tableFrom": "phases", "tableTo": "initiatives", "columnsFrom": [ "initiative_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "plans": { "name": "plans", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true, "autoincrement": false }, "phase_id": { "name": "phase_id", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "number": { "name": "number", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "'pending'" }, "created_at": { "name": "created_at", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "updated_at": { "name": "updated_at", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false } }, "indexes": {}, "foreignKeys": { "plans_phase_id_phases_id_fk": { "name": "plans_phase_id_phases_id_fk", "tableFrom": "plans", "tableTo": "phases", "columnsFrom": [ "phase_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "task_dependencies": { "name": "task_dependencies", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true, "autoincrement": false }, "task_id": { "name": "task_id", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "depends_on_task_id": { "name": "depends_on_task_id", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "created_at": { "name": "created_at", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false } }, "indexes": {}, "foreignKeys": { "task_dependencies_task_id_tasks_id_fk": { "name": "task_dependencies_task_id_tasks_id_fk", "tableFrom": "task_dependencies", "tableTo": "tasks", "columnsFrom": [ "task_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" }, "task_dependencies_depends_on_task_id_tasks_id_fk": { "name": "task_dependencies_depends_on_task_id_tasks_id_fk", "tableFrom": "task_dependencies", "tableTo": "tasks", "columnsFrom": [ "depends_on_task_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "tasks": { "name": "tasks", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true, "autoincrement": false }, "plan_id": { "name": "plan_id", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "type": { "name": "type", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "'auto'" }, "priority": { "name": "priority", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "'medium'" }, "status": { "name": "status", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false, "default": "'pending'" }, "order": { "name": "order", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false, "default": 0 }, "created_at": { "name": "created_at", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "updated_at": { "name": "updated_at", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false } }, "indexes": {}, "foreignKeys": { "tasks_plan_id_plans_id_fk": { "name": "tasks_plan_id_plans_id_fk", "tableFrom": "tasks", "tableTo": "plans", "columnsFrom": [ "plan_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} } }, "views": {}, "enums": {}, "_meta": { "schemas": {}, "tables": {}, "columns": {} }, "internal": { "indexes": {} } }