shellphone.app/db/migrations/20210727125716_user_role_enum/migration.sql
2021-07-31 22:33:18 +08:00

13 lines
323 B
SQL

/*
Warnings:
- The `role` column on the `User` table would be dropped and recreated. This will lead to data loss if there is data in the column.
*/
-- CreateEnum
CREATE TYPE "Role" AS ENUM ('USER', 'ADMIN');
-- AlterTable
ALTER TABLE "User" DROP COLUMN "role",
ADD COLUMN "role" "Role" NOT NULL DEFAULT E'USER';