From 8b17a175c3e7e27b789812eba4e3cd760beadb10 Mon Sep 17 00:00:00 2001
From: soryu <soryu@soryu.co>
Date: Tue, 6 Jan 2026 04:08:11 +0000
Subject: Initial Control system

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

(limited to 'makima/migrations/20250110000005_create_placeholder_owners.sql')

diff --git a/makima/migrations/20250110000005_create_placeholder_owners.sql b/makima/migrations/20250110000005_create_placeholder_owners.sql
new file mode 100644
index 0000000..05c946e
--- /dev/null
+++ b/makima/migrations/20250110000005_create_placeholder_owners.sql
@@ -0,0 +1,18 @@
+-- Create placeholder owners for existing data with hardcoded owner_ids
+-- These will be migrated to real owners when users sign up
+
+-- Note: The existing codebase uses the same UUID (00000000-0000-0000-0000-000000000002)
+-- for both files, tasks, and daemons based on the existing migrations.
+
+-- Placeholder owner for existing legacy data (used in files, tasks, daemons)
+INSERT INTO owners (id, name, owner_type)
+VALUES ('00000000-0000-0000-0000-000000000002', 'Legacy Owner', 'personal')
+ON CONFLICT (id) DO NOTHING;
+
+-- Additional placeholder in case files migration used different ID
+-- (keeping both for backward compatibility)
+INSERT INTO owners (id, name, owner_type)
+VALUES ('00000000-0000-0000-0000-000000000001', 'Legacy Files Owner', 'personal')
+ON CONFLICT (id) DO NOTHING;
+
+COMMENT ON TABLE owners IS 'NOTE: IDs 00000000-0000-0000-0000-00000000000[12] are legacy placeholders';
-- 
cgit v1.2.3

