Commit 7ad84066 authored by wycers's avatar wycers
Browse files

judge

parent 83b7a3c8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -88,6 +88,7 @@
		"@tiptap/extension-collaboration-cursor": "^2.2.4",
		"@tiptap/pm": "^2.2.4",
		"@tiptap/starter-kit": "^2.2.4",
		"ansi_up": "^6.0.2",
		"axios": "^1.6.8",
		"clsx": "^2.1.0",
		"cmdk-sv": "^0.0.15",
+7 −0
Original line number Diff line number Diff line
@@ -65,6 +65,9 @@ dependencies:
  '@tiptap/starter-kit':
    specifier: ^2.2.4
    version: 2.2.4(@tiptap/pm@2.2.4)
  ansi_up:
    specifier: ^6.0.2
    version: 6.0.2
  axios:
    specifier: ^1.6.8
    version: 1.6.8
@@ -2896,6 +2899,10 @@ packages:
    resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==}
    engines: {node: '>=12'}

  /ansi_up@6.0.2:
    resolution: {integrity: sha512-3G3vKvl1ilEp7J1u6BmULpMA0xVoW/f4Ekqhl8RTrJrhEBkonKn5k3bUc5Xt+qDayA6iDX0jyUh3AbZjB/l0tw==}
    dev: false

  /any-promise@1.3.0:
    resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==}

+49 −0
Original line number Diff line number Diff line
/*
  Warnings:

  - You are about to drop the column `judgementId` on the `SubmissionFeedback` table. All the data in the column will be lost.
  - You are about to drop the `Judgement` table. If the table is not empty, all the data it contains will be lost.

*/
-- DropForeignKey
ALTER TABLE `SubmissionFeedback` DROP FOREIGN KEY `SubmissionFeedback_judgementId_fkey`;

-- AlterTable
ALTER TABLE `SubmissionFeedback` DROP COLUMN `judgementId`;

-- DropTable
DROP TABLE `Judgement`;

-- CreateTable
CREATE TABLE `TaskRunner` (
    `id` INTEGER NOT NULL AUTO_INCREMENT,
    `secret` VARCHAR(191) NOT NULL,

    PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- CreateTable
CREATE TABLE `Task` (
    `id` INTEGER NOT NULL AUTO_INCREMENT,
    `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
    `status` ENUM('PENDING', 'INQUEUE', 'JUDGING', 'COMPLETED', 'CANCLED') NOT NULL,
    `feedbackId` INTEGER NULL,

    PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- CreateTable
CREATE TABLE `TaskLog` (
    `id` INTEGER NOT NULL AUTO_INCREMENT,
    `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
    `data` VARCHAR(191) NOT NULL,
    `taskId` INTEGER NOT NULL,

    PRIMARY KEY (`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

-- AddForeignKey
ALTER TABLE `Task` ADD CONSTRAINT `Task_feedbackId_fkey` FOREIGN KEY (`feedbackId`) REFERENCES `SubmissionFeedback`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE `TaskLog` ADD CONSTRAINT `TaskLog_taskId_fkey` FOREIGN KEY (`taskId`) REFERENCES `Task`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
+8 −0
Original line number Diff line number Diff line
/*
  Warnings:

  - Added the required column `data` to the `Task` table without a default value. This is not possible if the table is not empty.

*/
-- AlterTable
ALTER TABLE `Task` ADD COLUMN `data` VARCHAR(191) NOT NULL;
+23 −0
Original line number Diff line number Diff line
/*
  Warnings:

  - You are about to drop the column `data` on the `Task` table. All the data in the column will be lost.
  - Added the required column `args` to the `Task` table without a default value. This is not possible if the table is not empty.
  - Added the required column `fileKey` to the `Task` table without a default value. This is not possible if the table is not empty.
  - Added the required column `language` to the `Task` table without a default value. This is not possible if the table is not empty.
  - Added the required column `submissionId` to the `Task` table without a default value. This is not possible if the table is not empty.
  - Added the required column `testdataKey` to the `Task` table without a default value. This is not possible if the table is not empty.

*/
-- AlterTable
ALTER TABLE `Task` DROP COLUMN `data`,
    ADD COLUMN `args` JSON NOT NULL,
    ADD COLUMN `fileKey` VARCHAR(191) NOT NULL,
    ADD COLUMN `language` VARCHAR(191) NOT NULL,
    ADD COLUMN `result` TEXT NULL,
    ADD COLUMN `submissionId` INTEGER NOT NULL,
    ADD COLUMN `testdataKey` VARCHAR(191) NOT NULL,
    MODIFY `status` ENUM('PENDING', 'INQUEUE', 'JUDGING', 'COMPLETED', 'CANCLED') NOT NULL DEFAULT 'PENDING';

-- AlterTable
ALTER TABLE `TaskLog` MODIFY `data` TEXT NOT NULL;
Loading