mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 07:16:34 +00:00
chore(prisma): apply migration to remove TEACHER and STUDENT roles
This commit is contained in:
parent
190431ece6
commit
3fefee674b
@ -0,0 +1,16 @@
|
|||||||
|
/*
|
||||||
|
Warnings:
|
||||||
|
|
||||||
|
- The values [TEACHER,STUDENT] on the enum `Role` will be removed. If these variants are still used in the database, this will fail.
|
||||||
|
|
||||||
|
*/
|
||||||
|
-- AlterEnum
|
||||||
|
BEGIN;
|
||||||
|
CREATE TYPE "Role_new" AS ENUM ('ADMIN', 'GUEST');
|
||||||
|
ALTER TABLE "User" ALTER COLUMN "role" DROP DEFAULT;
|
||||||
|
ALTER TABLE "User" ALTER COLUMN "role" TYPE "Role_new" USING ("role"::text::"Role_new");
|
||||||
|
ALTER TYPE "Role" RENAME TO "Role_old";
|
||||||
|
ALTER TYPE "Role_new" RENAME TO "Role";
|
||||||
|
DROP TYPE "Role_old";
|
||||||
|
ALTER TABLE "User" ALTER COLUMN "role" SET DEFAULT 'GUEST';
|
||||||
|
COMMIT;
|
@ -484,7 +484,7 @@ public:
|
|||||||
name: "fly6516",
|
name: "fly6516",
|
||||||
email: "fly6516@outlook.com",
|
email: "fly6516@outlook.com",
|
||||||
password: "$2b$10$SD1T/dYvKTArGdTmf8ERxuBKIONxY01/wSboRNaNsHnKZzDhps/0u",
|
password: "$2b$10$SD1T/dYvKTArGdTmf8ERxuBKIONxY01/wSboRNaNsHnKZzDhps/0u",
|
||||||
role: "TEACHER",
|
role: "ADMIN",
|
||||||
problems: {
|
problems: {
|
||||||
create: [
|
create: [
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user