21 lines
855 B
SQL
21 lines
855 B
SQL
/*
|
|
Warnings:
|
|
|
|
- You are about to drop the column `isVerified` on the `user` table. All the data in the column will be lost.
|
|
- You are about to drop the column `generatedOn` on the `user_otp` table. All the data in the column will be lost.
|
|
- Added the required column `expiresAt` to the `user_otp` table without a default value. This is not possible if the table is not empty.
|
|
|
|
*/
|
|
-- CreateEnum
|
|
CREATE TYPE "USER_ACCOUNT_STATUS" AS ENUM ('pending', 'active', 'suspended', 'deleted');
|
|
|
|
-- AlterTable
|
|
ALTER TABLE "user" DROP COLUMN "isVerified",
|
|
ADD COLUMN "status" "USER_ACCOUNT_STATUS" NOT NULL DEFAULT 'pending',
|
|
ALTER COLUMN "password" DROP NOT NULL;
|
|
|
|
-- AlterTable
|
|
ALTER TABLE "user_otp" DROP COLUMN "generatedOn",
|
|
ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
ADD COLUMN "expiresAt" TIMESTAMP(3) NOT NULL;
|