13 lines
388 B
MySQL
13 lines
388 B
MySQL
|
-- CreateTable
|
||
|
CREATE TABLE "Profile" (
|
||
|
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||
|
"bio" TEXT NOT NULL,
|
||
|
"avatar" TEXT,
|
||
|
"userId" INTEGER NOT NULL,
|
||
|
"enabled" BOOLEAN NOT NULL DEFAULT true,
|
||
|
FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
||
|
);
|
||
|
|
||
|
-- CreateIndex
|
||
|
CREATE UNIQUE INDEX "Profile.userId_unique" ON "Profile"("userId");
|