33 lines
1.0 KiB
MySQL
33 lines
1.0 KiB
MySQL
|
/*
|
||
|
Warnings:
|
||
|
|
||
|
- You are about to drop the column `email` on the `User` table. All the data in the column will be lost.
|
||
|
- A unique constraint covering the columns `[username]` on the table `User` will be added. If there are existing duplicate values, this will fail.
|
||
|
- Added the required column `username` to the `User` table without a default value. This is not possible if the table is not empty.
|
||
|
|
||
|
*/
|
||
|
-- DropIndex
|
||
|
DROP INDEX "User_email_key";
|
||
|
|
||
|
ALTER TABLE "User" RENAME COLUMN "email" TO "username";
|
||
|
|
||
|
-- AlterTable
|
||
|
ALTER TABLE "User" ADD COLUMN "emailVerified" TIMESTAMP(3),
|
||
|
ADD COLUMN "image" TEXT;
|
||
|
|
||
|
-- CreateTable
|
||
|
CREATE TABLE "VerificationToken" (
|
||
|
"identifier" TEXT NOT NULL,
|
||
|
"token" TEXT NOT NULL,
|
||
|
"expires" TIMESTAMP(3) NOT NULL
|
||
|
);
|
||
|
|
||
|
-- CreateIndex
|
||
|
CREATE UNIQUE INDEX "VerificationToken_token_key" ON "VerificationToken"("token");
|
||
|
|
||
|
-- CreateIndex
|
||
|
CREATE UNIQUE INDEX "VerificationToken_identifier_token_key" ON "VerificationToken"("identifier", "token");
|
||
|
|
||
|
-- CreateIndex
|
||
|
CREATE UNIQUE INDEX "User_username_key" ON "User"("username");
|