From 151e9d87e117b7980e6aad522ac8f3633eeca87a Mon Sep 17 00:00:00 2001 From: soryu Date: Mon, 2 Feb 2026 02:34:50 +0000 Subject: Make makima more opinionated and structured --- .../migrations/20260202000000_remove_red_team_system.sql | 15 +++++++++++++++ .../migrations/20260202100000_add_contract_worktree.sql | 13 +++++++++++++ .../migrations/20260202200000_remove_custom_templates.sql | 4 ++++ 3 files changed, 32 insertions(+) create mode 100644 makima/migrations/20260202000000_remove_red_team_system.sql create mode 100644 makima/migrations/20260202100000_add_contract_worktree.sql create mode 100644 makima/migrations/20260202200000_remove_custom_templates.sql (limited to 'makima/migrations') diff --git a/makima/migrations/20260202000000_remove_red_team_system.sql b/makima/migrations/20260202000000_remove_red_team_system.sql new file mode 100644 index 0000000..0a5bbf8 --- /dev/null +++ b/makima/migrations/20260202000000_remove_red_team_system.sql @@ -0,0 +1,15 @@ +-- Remove red team system +-- This migration drops all red team related tables, columns, and indexes + +-- Drop red team notifications table +DROP TABLE IF EXISTS red_team_notifications; + +-- Drop red team index on tasks +DROP INDEX IF EXISTS idx_tasks_contract_red_team; + +-- Remove red team column from tasks +ALTER TABLE tasks DROP COLUMN IF EXISTS is_red_team; + +-- Remove red team columns from contracts +ALTER TABLE contracts DROP COLUMN IF EXISTS red_team_enabled; +ALTER TABLE contracts DROP COLUMN IF EXISTS red_team_prompt; diff --git a/makima/migrations/20260202100000_add_contract_worktree.sql b/makima/migrations/20260202100000_add_contract_worktree.sql new file mode 100644 index 0000000..26c54ba --- /dev/null +++ b/makima/migrations/20260202100000_add_contract_worktree.sql @@ -0,0 +1,13 @@ +-- Add worktree tracking to contracts +-- Each contract now has a single worktree managed by a specific daemon + +ALTER TABLE contracts + ADD COLUMN worktree_path VARCHAR(512), + ADD COLUMN worktree_daemon_id UUID REFERENCES daemons(id), + ADD COLUMN worktree_base_branch VARCHAR(255), + ADD COLUMN worktree_branch VARCHAR(255); + +COMMENT ON COLUMN contracts.worktree_path IS 'Path to the worktree directory on the assigned daemon'; +COMMENT ON COLUMN contracts.worktree_daemon_id IS 'The daemon that owns/manages this contract worktree'; +COMMENT ON COLUMN contracts.worktree_base_branch IS 'The base branch the worktree was created from'; +COMMENT ON COLUMN contracts.worktree_branch IS 'The working branch in the worktree'; diff --git a/makima/migrations/20260202200000_remove_custom_templates.sql b/makima/migrations/20260202200000_remove_custom_templates.sql new file mode 100644 index 0000000..0c80110 --- /dev/null +++ b/makima/migrations/20260202200000_remove_custom_templates.sql @@ -0,0 +1,4 @@ +-- Remove custom templates system +-- Only built-in contract types (simple, specification, execute) are supported now + +DROP TABLE IF EXISTS contract_type_templates; -- cgit v1.2.3