shellphone.app/db/migrations/20210727125716_user_role_enum/migration.sql

13 lines
323 B
MySQL
Raw Normal View History

2021-07-31 14:33:18 +00:00
/*
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';