diff --git a/server/prisma/migrations/20251009115816_init/migration.sql b/server/prisma/migrations/20251009115816_init/migration.sql new file mode 100644 index 0000000..3995ec1 --- /dev/null +++ b/server/prisma/migrations/20251009115816_init/migration.sql @@ -0,0 +1,12 @@ +-- CreateTable +CREATE TABLE "User" ( + "id" TEXT NOT NULL PRIMARY KEY, + "username" TEXT NOT NULL, + "password" TEXT NOT NULL, + "displayName" TEXT NOT NULL, + "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" DATETIME NOT NULL +); + +-- CreateIndex +CREATE UNIQUE INDEX "User_username_key" ON "User"("username"); diff --git a/server/prisma/migrations/20251009120427_lucia/migration.sql b/server/prisma/migrations/20251009120427_lucia/migration.sql new file mode 100644 index 0000000..2bb43c5 --- /dev/null +++ b/server/prisma/migrations/20251009120427_lucia/migration.sql @@ -0,0 +1,7 @@ +-- CreateTable +CREATE TABLE "Session" ( + "id" TEXT NOT NULL PRIMARY KEY, + "userId" TEXT NOT NULL, + "expiresAt" DATETIME NOT NULL, + CONSTRAINT "Session_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE CASCADE ON UPDATE CASCADE +); diff --git a/server/prisma/migrations/migration_lock.toml b/server/prisma/migrations/migration_lock.toml new file mode 100644 index 0000000..2a5a444 --- /dev/null +++ b/server/prisma/migrations/migration_lock.toml @@ -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"