@opprs/db-prisma 1.1.3-canary.0385ef0 → 1.1.4-canary.f9e09f2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opprs/db-prisma",
3
- "version": "1.1.3-canary.0385ef0",
3
+ "version": "1.1.4-canary.f9e09f2",
4
4
  "description": "Database backend for OPPR (Open Pinball Player Ranking System) using Prisma and PostgreSQL",
5
5
  "keywords": [
6
6
  "oppr",
@@ -54,7 +54,7 @@
54
54
  "vitest": "^4.0.16"
55
55
  },
56
56
  "peerDependencies": {
57
- "@opprs/core": "^1.1.3-canary.0385ef0"
57
+ "@opprs/core": "^1.1.4-canary.f9e09f2"
58
58
  },
59
59
  "engines": {
60
60
  "node": ">=18.0.0"
@@ -0,0 +1,28 @@
1
+ -- CreateEnum
2
+ CREATE TYPE "Role" AS ENUM ('USER', 'ADMIN');
3
+
4
+ -- CreateTable
5
+ CREATE TABLE "User" (
6
+ "id" TEXT NOT NULL,
7
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
8
+ "updatedAt" TIMESTAMP(3) NOT NULL,
9
+ "email" TEXT NOT NULL,
10
+ "passwordHash" TEXT NOT NULL,
11
+ "role" "Role" NOT NULL DEFAULT 'USER',
12
+ "playerId" TEXT,
13
+ "refreshTokenHash" TEXT,
14
+
15
+ CONSTRAINT "User_pkey" PRIMARY KEY ("id")
16
+ );
17
+
18
+ -- CreateIndex
19
+ CREATE UNIQUE INDEX "User_email_key" ON "User"("email");
20
+
21
+ -- CreateIndex
22
+ CREATE UNIQUE INDEX "User_playerId_key" ON "User"("playerId");
23
+
24
+ -- CreateIndex
25
+ CREATE INDEX "User_email_idx" ON "User"("email");
26
+
27
+ -- AddForeignKey
28
+ ALTER TABLE "User" ADD CONSTRAINT "User_playerId_fkey" FOREIGN KEY ("playerId") REFERENCES "Player"("id") ON DELETE SET NULL ON UPDATE CASCADE;