43 lines
1.2 KiB
SQL
43 lines
1.2 KiB
SQL
/*
|
|
Warnings:
|
|
|
|
- You are about to drop the column `email` on the `User` table. All the data in the column will be lost.
|
|
- You are about to drop the `Note` table. If the table is not empty, all the data it contains will be lost.
|
|
- You are about to drop the `Password` table. If the table is not empty, all the data it contains will be lost.
|
|
- A unique constraint covering the columns `[discord_id]` on the table `User` will be added. If there are existing duplicate values, this will fail.
|
|
|
|
*/
|
|
-- DropForeignKey
|
|
ALTER TABLE "Note" DROP CONSTRAINT "Note_userId_fkey";
|
|
|
|
-- DropForeignKey
|
|
ALTER TABLE "Password" DROP CONSTRAINT "Password_userId_fkey";
|
|
|
|
-- DropIndex
|
|
DROP INDEX "User_email_key";
|
|
|
|
-- AlterTable
|
|
ALTER TABLE "User" DROP COLUMN "email",
|
|
ADD COLUMN "border_id" TEXT,
|
|
ADD COLUMN "discord_id" TEXT;
|
|
|
|
-- DropTable
|
|
DROP TABLE "Note";
|
|
|
|
-- DropTable
|
|
DROP TABLE "Password";
|
|
|
|
-- CreateTable
|
|
CREATE TABLE "Border" (
|
|
"id" TEXT NOT NULL,
|
|
"filename" TEXT NOT NULL,
|
|
|
|
CONSTRAINT "Border_pkey" PRIMARY KEY ("id")
|
|
);
|
|
|
|
-- CreateIndex
|
|
CREATE UNIQUE INDEX "Border_filename_key" ON "Border"("filename");
|
|
|
|
-- CreateIndex
|
|
CREATE UNIQUE INDEX "User_discord_id_key" ON "User"("discord_id");
|