13 lines
381 B
MySQL
13 lines
381 B
MySQL
|
-- CreateTable
|
||
|
CREATE TABLE "Avatar" (
|
||
|
"id" TEXT NOT NULL PRIMARY KEY,
|
||
|
"userId" TEXT NOT NULL,
|
||
|
CONSTRAINT "Avatar_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("userId") ON DELETE RESTRICT ON UPDATE CASCADE
|
||
|
);
|
||
|
|
||
|
-- CreateIndex
|
||
|
CREATE UNIQUE INDEX "Avatar_id_key" ON "Avatar"("id");
|
||
|
|
||
|
-- CreateIndex
|
||
|
CREATE UNIQUE INDEX "Avatar_userId_key" ON "Avatar"("userId");
|