This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
-- RedefineTables
|
||||
PRAGMA defer_foreign_keys=ON;
|
||||
PRAGMA foreign_keys=OFF;
|
||||
CREATE TABLE "new_UserPreferences" (
|
||||
"userId" TEXT NOT NULL PRIMARY KEY,
|
||||
"toggleInputHotkey" TEXT,
|
||||
"toggleOutputHotkey" TEXT,
|
||||
"volumes" JSONB,
|
||||
CONSTRAINT "UserPreferences_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
||||
);
|
||||
INSERT INTO "new_UserPreferences" ("toggleInputHotkey", "toggleOutputHotkey", "userId", "volumes") SELECT "toggleInputHotkey", "toggleOutputHotkey", "userId", "volumes" FROM "UserPreferences";
|
||||
DROP TABLE "UserPreferences";
|
||||
ALTER TABLE "new_UserPreferences" RENAME TO "UserPreferences";
|
||||
PRAGMA foreign_keys=ON;
|
||||
PRAGMA defer_foreign_keys=OFF;
|
||||
@@ -32,9 +32,9 @@ model Session {
|
||||
|
||||
model UserPreferences {
|
||||
userId String @id
|
||||
toggleInputHotkey String
|
||||
toggleOutputHotkey String
|
||||
volumes Json
|
||||
toggleInputHotkey String?
|
||||
toggleOutputHotkey String?
|
||||
volumes Json?
|
||||
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
Reference in New Issue
Block a user