-- AlterTable
-- SQLite doesn't support DROP COLUMN directly, so we need to recreate the table
CREATE TABLE "SitePreferences_new" (
    "id" TEXT NOT NULL PRIMARY KEY,
    "homeBackground" TEXT,
    "eventsBackground" TEXT,
    "leaderboardBackground" TEXT,
    "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "updatedAt" DATETIME NOT NULL
);

-- Copy data without primaryColor column
INSERT INTO "SitePreferences_new" ("id", "homeBackground", "eventsBackground", "leaderboardBackground", "createdAt", "updatedAt")
SELECT "id", "homeBackground", "eventsBackground", "leaderboardBackground", "createdAt", "updatedAt"
FROM "SitePreferences";

-- Drop old table
DROP TABLE "SitePreferences";

-- Rename new table
ALTER TABLE "SitePreferences_new" RENAME TO "SitePreferences";

