summaryrefslogblamecommitdiff
path: root/makima/migrations/20250110000005_create_placeholder_owners.sql
blob: 05c946e59488775e844f97ae8db227e2b54be98e (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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';