This commit is contained in:
Zacharias-Brohn
2026-01-14 20:02:17 +01:00
parent 8ddd4e47ec
commit f5197d92f7
14 changed files with 10823 additions and 13030 deletions
@@ -0,0 +1,14 @@
-- RedefineTables
PRAGMA foreign_keys=OFF;
CREATE TABLE "new_User" (
"id" TEXT NOT NULL PRIMARY KEY,
"username" TEXT NOT NULL,
"password" TEXT NOT NULL,
"accentColor" TEXT NOT NULL DEFAULT 'blue'
);
INSERT INTO "new_User" ("id", "password", "username") SELECT "id", "password", "username" FROM "User";
DROP TABLE "User";
ALTER TABLE "new_User" RENAME TO "User";
CREATE UNIQUE INDEX "User_username_key" ON "User"("username");
PRAGMA foreign_key_check;
PRAGMA foreign_keys=ON;
+2 -2
View File
@@ -1,3 +1,3 @@
# Please do not edit this file manually
# It should be added in your version-control system (e.g., Git)
provider = "sqlite"
# It should be added in your version-control system (i.e. Git)
provider = "sqlite"
+7 -6
View File
@@ -2,19 +2,20 @@
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
provider = "prisma-client"
output = "./generated/prisma"
}
datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}
model User {
id String @id @default(cuid())
username String @unique
password String
chats Chat[]
id String @id @default(cuid())
username String @unique
password String
accentColor String @default("blue")
chats Chat[]
}
model Chat {