From 3662b334dfd68cfdf00ed44ae88927c2e1b2aabe Mon Sep 17 00:00:00 2001
From: soryu <soryu@soryu.co>
Date: Sun, 8 Feb 2026 21:07:30 +0000
Subject: Remove directive mechanism

---
 .../20260209000000_remove_directive_system.sql         | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 makima/migrations/20260209000000_remove_directive_system.sql

(limited to 'makima/migrations/20260209000000_remove_directive_system.sql')

diff --git a/makima/migrations/20260209000000_remove_directive_system.sql b/makima/migrations/20260209000000_remove_directive_system.sql
new file mode 100644
index 0000000..1cb49dc
--- /dev/null
+++ b/makima/migrations/20260209000000_remove_directive_system.sql
@@ -0,0 +1,18 @@
+-- ============================================================================
+-- Migration: remove_directive_system.sql
+-- Removes the entire directive/chain system.
+-- ============================================================================
+
+-- Drop directive tables in reverse dependency order
+DROP TABLE IF EXISTS directive_approvals CASCADE;
+DROP TABLE IF EXISTS directive_verifiers CASCADE;
+DROP TABLE IF EXISTS directive_events CASCADE;
+DROP TABLE IF EXISTS directive_evaluations CASCADE;
+DROP TABLE IF EXISTS chain_steps CASCADE;
+DROP TABLE IF EXISTS directive_chains CASCADE;
+DROP TABLE IF EXISTS directives CASCADE;
+
+-- Remove directive-related columns from contracts
+ALTER TABLE contracts DROP COLUMN IF EXISTS directive_id;
+ALTER TABLE contracts DROP COLUMN IF EXISTS is_directive_orchestrator;
+ALTER TABLE contracts DROP COLUMN IF EXISTS spawned_directive_id;
-- 
cgit v1.2.3

