-- Backup original text dates before migration
ALTER TABLE "Reservation" ADD COLUMN IF NOT EXISTS "date_backup" text;
UPDATE "Reservation" SET "date_backup" = date WHERE "date_backup" IS NULL;

ALTER TABLE "BusinessMetrics" ADD COLUMN IF NOT EXISTS "date_backup" text;
UPDATE "BusinessMetrics" SET "date_backup" = date WHERE "date_backup" IS NULL;

ALTER TABLE "WaitingList" ADD COLUMN IF NOT EXISTS "preferredDate_backup" text;
UPDATE "WaitingList" SET "preferredDate_backup" = "preferredDate" WHERE "preferredDate_backup" IS NULL;
