/*
  Warnings:

  - You are about to drop the column `ipAddress` on the `Client` table. All the data in the column will be lost.

*/
-- RedefineTables
PRAGMA defer_foreign_keys=ON;
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_Client" (
    "id" TEXT NOT NULL PRIMARY KEY,
    "username" TEXT NOT NULL,
    "totalPoints" INTEGER NOT NULL DEFAULT 0,
    "totalRounds" INTEGER NOT NULL DEFAULT 0,
    "lastPlayed" DATETIME,
    "lastFeedback" DATETIME,
    "lastFeedbackIP" TEXT,
    "themePreference" TEXT NOT NULL DEFAULT 'dark',
    "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "updatedAt" DATETIME NOT NULL
);
INSERT INTO "new_Client" ("createdAt", "id", "lastFeedback", "lastFeedbackIP", "lastPlayed", "themePreference", "totalPoints", "totalRounds", "updatedAt", "username") SELECT "createdAt", "id", "lastFeedback", "lastFeedbackIP", "lastPlayed", "themePreference", "totalPoints", "totalRounds", "updatedAt", "username" FROM "Client";
DROP TABLE "Client";
ALTER TABLE "new_Client" RENAME TO "Client";
CREATE UNIQUE INDEX "Client_username_key" ON "Client"("username");
PRAGMA foreign_keys=ON;
PRAGMA defer_foreign_keys=OFF;
