···9696 created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
9797 updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
9898 )`,
9999+100100+ // Sync statuses table (no dependencies)
101101+ sql`CREATE TABLE IF NOT EXISTS sync_statuses (
102102+ id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
103103+ curator_id TEXT NOT NULL UNIQUE,
104104+ sync_state TEXT NOT NULL,
105105+ last_synced_at TIMESTAMP WITH TIME ZONE,
106106+ last_sync_attempt_at TIMESTAMP WITH TIME ZONE,
107107+ sync_error_message TEXT,
108108+ records_processed INTEGER,
109109+ created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
110110+ updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
111111+ )`,
99112 ];
100113101114 // Execute table creation queries in order