* refactor: move migrations to new structure * refactor: convert all findMany to new structure * fix(backups-schedule): missing null matching for last backup status * chore: move root lib to server
15 lines
651 B
SQL
15 lines
651 B
SQL
UPDATE volumes_table
|
|
SET organization_id = (SELECT id FROM organization ORDER BY created_at ASC LIMIT 1)
|
|
WHERE organization_id IS NULL;
|
|
--> statement-breakpoint
|
|
UPDATE backup_schedules_table
|
|
SET organization_id = (SELECT id FROM organization ORDER BY created_at ASC LIMIT 1)
|
|
WHERE organization_id IS NULL;
|
|
--> statement-breakpoint
|
|
UPDATE notification_destinations_table
|
|
SET organization_id = (SELECT id FROM organization ORDER BY created_at ASC LIMIT 1)
|
|
WHERE organization_id IS NULL;
|
|
--> statement-breakpoint
|
|
UPDATE repositories_table
|
|
SET organization_id = (SELECT id FROM organization ORDER BY created_at ASC LIMIT 1)
|
|
WHERE organization_id IS NULL;
|