diff --git a/ExpressAPI/prisma/migrations/20230809104043_alter_result_for_add_missing_fields/migration.sql b/ExpressAPI/prisma/migrations/20230809104043_alter_result_for_add_missing_fields/migration.sql new file mode 100644 index 0000000000000000000000000000000000000000..85581c37799dc561f07e0e0863df7b72ec83b98e --- /dev/null +++ b/ExpressAPI/prisma/migrations/20230809104043_alter_result_for_add_missing_fields/migration.sql @@ -0,0 +1,20 @@ +/* + Warnings: + + - You are about to drop the column `details` on the `Result` table. All the data in the column will be lost. + - You are about to drop the column `pass` on the `Result` table. All the data in the column will be lost. + - Added the required column `commit` to the `Result` table without a default value. This is not possible if the table is not empty. + - Added the required column `exitCode` to the `Result` table without a default value. This is not possible if the table is not empty. + - Added the required column `files` to the `Result` table without a default value. This is not possible if the table is not empty. + - Added the required column `results` to the `Result` table without a default value. This is not possible if the table is not empty. + - Added the required column `success` to the `Result` table without a default value. This is not possible if the table is not empty. + +*/ +-- AlterTable +ALTER TABLE `Result` DROP COLUMN `details`, + DROP COLUMN `pass`, + ADD COLUMN `commit` JSON NOT NULL, + ADD COLUMN `exitCode` INTEGER NOT NULL, + ADD COLUMN `files` JSON NOT NULL, + ADD COLUMN `results` JSON NOT NULL, + ADD COLUMN `success` BOOLEAN NOT NULL; diff --git a/ExpressAPI/prisma/schema.prisma b/ExpressAPI/prisma/schema.prisma index 90224e54f931b315ecdec903e135b9ea9080f4b4..7f3f418b1e9fac3d2d952ea3fda1e1289b41a51c 100644 --- a/ExpressAPI/prisma/schema.prisma +++ b/ExpressAPI/prisma/schema.prisma @@ -54,8 +54,11 @@ model Exercice { model Result { exerciceId String @db.Char(36) dateTime DateTime @default(now()) - pass Boolean - details String @db.Text + success Boolean + exitCode Int + commit Json @db.Json + results Json @db.Json + files Json @db.Json exercice Exercice @relation(fields: [exerciceId], references: [id], onDelete: Cascade, onUpdate: Cascade)