mirror of
https://github.com/coleam00/Archon
synced 2026-04-21 13:37:41 +00:00
Complete migration to work-centric isolation model by removing: - worktree_path column - isolation_env_id_legacy column - isolation_provider column - Legacy fallback patterns in code - Migration helper functions The codebase now exclusively uses isolation_env_id (UUID FK) for all isolation references. This removes ~190 lines of technical debt.
27 lines
1.1 KiB
SQL
27 lines
1.1 KiB
SQL
-- Drop legacy isolation columns
|
|
-- Version: 7.0
|
|
-- Description: Complete migration to work-centric isolation model
|
|
-- PREREQUISITE: Run verification query to ensure no orphaned data before applying!
|
|
--
|
|
-- Verification query (should return 0 rows):
|
|
-- SELECT id, platform_conversation_id, worktree_path, isolation_env_id_legacy
|
|
-- FROM remote_agent_conversations
|
|
-- WHERE (worktree_path IS NOT NULL OR isolation_env_id_legacy IS NOT NULL)
|
|
-- AND isolation_env_id IS NULL;
|
|
|
|
-- Drop columns (order matters - drop FK references first if any)
|
|
ALTER TABLE remote_agent_conversations
|
|
DROP COLUMN IF EXISTS worktree_path;
|
|
|
|
ALTER TABLE remote_agent_conversations
|
|
DROP COLUMN IF EXISTS isolation_env_id_legacy;
|
|
|
|
ALTER TABLE remote_agent_conversations
|
|
DROP COLUMN IF EXISTS isolation_provider;
|
|
|
|
-- Drop the legacy index created in migration 005 (if it exists)
|
|
DROP INDEX IF EXISTS idx_conversations_isolation;
|
|
|
|
-- Add comment for documentation
|
|
COMMENT ON COLUMN remote_agent_conversations.isolation_env_id IS
|
|
'UUID reference to isolation_environments table (the only isolation reference)';
|