Merge pull request #273 from emrysal/bugfix/add-email-verification-to-migrations

Added migrations for adding external users
This commit is contained in:
Bailey Pumfleet 2021-06-18 17:01:31 +01:00 committed by GitHub
commit ecc36a5a0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,20 @@
-- AlterTable
ALTER TABLE "users" ADD COLUMN "emailVerified" TIMESTAMP(3);
-- CreateTable
CREATE TABLE "VerificationRequest" (
"id" SERIAL NOT NULL,
"identifier" TEXT NOT NULL,
"token" TEXT NOT NULL,
"expires" TIMESTAMP(3) NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMP(3) NOT NULL,
PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "VerificationRequest.token_unique" ON "VerificationRequest"("token");
-- CreateIndex
CREATE UNIQUE INDEX "VerificationRequest.identifier_token_unique" ON "VerificationRequest"("identifier", "token");