mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-14 00:31:25 +10:00
feat: migrate to tailwind v4 and fix user token API
This commit is contained in:
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- Added the required column `name` to the `APIToken` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "APIToken" ADD COLUMN "name" TEXT NOT NULL;
|
||||
@ -0,0 +1,14 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- The primary key for the `APIToken` table will be changed. If it partially fails, the table could be left without primary key constraint.
|
||||
- The required column `id` was added to the `APIToken` table with a prisma-level default value. This is not possible if the table is not empty. Please add this column as optional, then populate it before making it required.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "APIToken" DROP CONSTRAINT "APIToken_pkey",
|
||||
ADD COLUMN "id" TEXT NOT NULL,
|
||||
ADD CONSTRAINT "APIToken_pkey" PRIMARY KEY ("id");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "APIToken_token_idx" ON "APIToken"("token");
|
||||
@ -0,0 +1,20 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- Made the column `launchCommand` on table `GameVersion` required. This step will fail if there are existing NULL values in that column.
|
||||
- Made the column `setupCommand` on table `GameVersion` required. This step will fail if there are existing NULL values in that column.
|
||||
|
||||
*/
|
||||
UPDATE "GameVersion"
|
||||
SET "launchCommand" = ''
|
||||
WHERE "launchCommand" is NULL;
|
||||
|
||||
UPDATE "GameVersion"
|
||||
SET "setupCommand" = ''
|
||||
WHERE "launchCommand" is NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "GameVersion" ALTER COLUMN "launchCommand" SET NOT NULL,
|
||||
ALTER COLUMN "launchCommand" SET DEFAULT '',
|
||||
ALTER COLUMN "setupCommand" SET NOT NULL,
|
||||
ALTER COLUMN "setupCommand" SET DEFAULT '';
|
||||
@ -28,11 +28,15 @@ enum APITokenMode {
|
||||
}
|
||||
|
||||
model APIToken {
|
||||
token String @id @default(uuid())
|
||||
id String @id @default(uuid())
|
||||
token String @default(uuid())
|
||||
mode APITokenMode
|
||||
name String
|
||||
|
||||
userId String?
|
||||
user User? @relation(fields: [userId], references: [id])
|
||||
|
||||
acls String[]
|
||||
|
||||
@@index([token])
|
||||
}
|
||||
|
||||
@ -46,9 +46,9 @@ model GameVersion {
|
||||
|
||||
platform Platform
|
||||
|
||||
launchCommand String? // Command to run to start. Platform-specific. Windows games on Linux will wrap this command in Proton/Wine
|
||||
launchCommand String @default("") // Command to run to start. Platform-specific. Windows games on Linux will wrap this command in Proton/Wine
|
||||
launchArgs String[]
|
||||
setupCommand String? // Command to setup game (dependencies and such)
|
||||
setupCommand String @default("") // Command to setup game (dependencies and such)
|
||||
setupArgs String[]
|
||||
onlySetup Boolean @default(false)
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
generator client {
|
||||
provider = "prisma-client-js"
|
||||
previewFeatures = ["prismaSchemaFolder"]
|
||||
previewFeatures = ["prismaSchemaFolder", "omitApi"]
|
||||
}
|
||||
|
||||
datasource db {
|
||||
|
||||
Reference in New Issue
Block a user