Migrated to Prisma

Migrated to the Prisma ORM.
Text TODO: Change code
This commit is contained in:
rudi committed 2026-07-30 11:22:52 +02:00
1 parent 4948946c0d
commit 9aa94638d9
98 files changed
+19930 -3

No files matched your search

@@ -0,0 +1,16 @@
-- CreateTable
CREATE TABLE "User" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"email" TEXT NOT NULL,
"username" TEXT NOT NULL,
"password" TEXT NOT NULL,
"role" TEXT NOT NULL DEFAULT 'user',
"firstname" TEXT NOT NULL,
"lastname" TEXT
);
-- CreateIndex
CREATE UNIQUE INDEX "User_email_key" ON "User"("email");
-- CreateIndex
CREATE UNIQUE INDEX "User_username_key" ON "User"("username");
+3
View File
@@ -0,0 +1,3 @@
# Please do not edit this file manually
# It should be added in your version-control system (e.g., Git)
provider = "sqlite"
+24
View File
@@ -0,0 +1,24 @@
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
// Get a free hosted Postgres database in seconds: `npx create-db`
generator client {
provider = "prisma-client"
output = "../lib/generated/prisma"
}
datasource db {
provider = "sqlite"
}
model User {
id Int @id @default(autoincrement())
email String @unique
username String @unique
password String
role String @default("user")
firstname String
lastname String?
}