dcrey7's picture
Upload 522 files
811126d verified
raw
history blame
741 Bytes
/*
Warnings:
- The values [PLAYING] on the enum `GameStatus` will be removed. If these variants are still used in the database, this will fail.
*/
-- AlterEnum
BEGIN;
CREATE TYPE "GameStatus_new" AS ENUM ('WAITING', 'ANSWERS', 'DEBATE', 'VOTE', 'FINISHED', 'CANCELLED');
ALTER TABLE "GameState" ALTER COLUMN "status" DROP DEFAULT;
ALTER TABLE "GameState" ALTER COLUMN "status" TYPE "GameStatus_new" USING ("status"::text::"GameStatus_new");
ALTER TYPE "GameStatus" RENAME TO "GameStatus_old";
ALTER TYPE "GameStatus_new" RENAME TO "GameStatus";
DROP TYPE "GameStatus_old";
ALTER TABLE "GameState" ALTER COLUMN "status" SET DEFAULT 'WAITING';
COMMIT;
-- AlterTable
ALTER TABLE "GameState" ADD COLUMN "stolenVoicePlayerId" INTEGER;