Feature/add user id to tag database schema (#3837)
* Add user id to tag database schema * Update changelogpull/3838/head
parent
e8f0d2bb14
commit
85cc72627b
@ -0,0 +1,11 @@
|
||||
-- DropIndex
|
||||
DROP INDEX "Tag_name_key";
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "Tag" ADD COLUMN "userId" TEXT;
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "Tag_name_userId_key" ON "Tag"("name", "userId");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "Tag" ADD CONSTRAINT "Tag_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
Loading…
Reference in new issue