judge4c/prisma/migrations/20250616020439_add_random/migration.sql
dioxide 3aa0a52b9e Add random function to help create a series of test.
Add the answerType key to restrict the type of answer.
Add the lengthOfArray key to rule the length of array or matrix. While if a single number just put null.
Add new content of seed.ts like above all.
2025-06-16 14:06:49 +08:00

14 lines
448 B
SQL

/*
Warnings:
- Added the required column `type` to the `Problem` table without a default value. This is not possible if the table is not empty.
*/
-- CreateEnum
CREATE TYPE "Type" AS ENUM ('NS', 'INT', 'FLOAT', 'CHAR', 'INTARRAY', 'FLOATARRAY', 'STRING', 'MATRIX');
-- AlterTable
ALTER TABLE "Problem" ADD COLUMN "isRandom" BOOLEAN NOT NULL DEFAULT false,
ADD COLUMN "lengthOfArray" INTEGER[],
ADD COLUMN "type" "Type" NOT NULL;