mirror of
https://github.com/Drop-OSS/drop.git
synced 2026-07-25 17:24:48 +10:00
completed game importing; partial work on version importing
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- A unique constraint covering the columns `[libraryBasePath]` on the table `Game` will be added. If there are existing duplicate values, this will fail.
|
||||
- Added the required column `libraryBasePath` to the `Game` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `versionOrder` to the `Game` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "Game" ADD COLUMN "libraryBasePath" TEXT NOT NULL,
|
||||
ADD COLUMN "versionOrder" TEXT NOT NULL;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "GameVersion" (
|
||||
"gameId" TEXT NOT NULL,
|
||||
"versionName" TEXT NOT NULL,
|
||||
|
||||
CONSTRAINT "GameVersion_pkey" PRIMARY KEY ("gameId","versionName")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "Game_libraryBasePath_key" ON "Game"("libraryBasePath");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "GameVersion" ADD CONSTRAINT "GameVersion_gameId_fkey" FOREIGN KEY ("gameId") REFERENCES "Game"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- The `versionOrder` column on the `Game` table would be dropped and recreated. This will lead to data loss if there is data in the column.
|
||||
- Changed the type of `platform` on the `Client` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
||||
- Added the required column `launchCommand` to the `GameVersion` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `platform` to the `GameVersion` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `setupCommand` to the `GameVersion` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- CreateEnum
|
||||
CREATE TYPE "Platform" AS ENUM ('windows', 'linux');
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "Client" DROP COLUMN "platform",
|
||||
ADD COLUMN "platform" "Platform" NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "Game" DROP COLUMN "versionOrder",
|
||||
ADD COLUMN "versionOrder" TEXT[];
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "GameVersion" ADD COLUMN "launchCommand" TEXT NOT NULL,
|
||||
ADD COLUMN "platform" "Platform" NOT NULL,
|
||||
ADD COLUMN "setupCommand" TEXT NOT NULL;
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- Added the required column `metadataOriginalQuery` to the `Developer` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `metadataOriginalQuery` to the `Publisher` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "Developer" ADD COLUMN "metadataOriginalQuery" TEXT NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "Publisher" ADD COLUMN "metadataOriginalQuery" TEXT NOT NULL;
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- A unique constraint covering the columns `[metadataSource,metadataId,metadataOriginalQuery]` on the table `Developer` will be added. If there are existing duplicate values, this will fail.
|
||||
- A unique constraint covering the columns `[metadataSource,metadataId,metadataOriginalQuery]` on the table `Publisher` will be added. If there are existing duplicate values, this will fail.
|
||||
|
||||
*/
|
||||
-- DropIndex
|
||||
DROP INDEX "Developer_metadataSource_metadataId_key";
|
||||
|
||||
-- DropIndex
|
||||
DROP INDEX "Publisher_metadataSource_metadataId_key";
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "Developer_metadataSource_metadataId_metadataOriginalQuery_key" ON "Developer"("metadataSource", "metadataId", "metadataOriginalQuery");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "Publisher_metadataSource_metadataId_metadataOriginalQuery_key" ON "Publisher"("metadataSource", "metadataId", "metadataOriginalQuery");
|
||||
Reference in New Issue
Block a user