File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
server/prisma/migrations/1_v2 Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ -- AlterTable
2+ ALTER TABLE " Message" ADD COLUMN " isPicture" BOOLEAN NOT NULL DEFAULT false,
3+ ADD COLUMN " read" BOOLEAN NOT NULL DEFAULT false;
4+
5+ -- AlterTable
6+ ALTER TABLE " User" ALTER COLUMN " pictureUrl" SET DEFAULT ' /avatar.svg' ;
7+
8+ -- CreateTable
9+ CREATE TABLE "Picture " (
10+ " hash" TEXT NOT NULL ,
11+ " data" BYTEA NOT NULL ,
12+ " key" TEXT NOT NULL ,
13+
14+ CONSTRAINT " Picture_pkey" PRIMARY KEY (" hash" )
15+ );
16+
17+ -- CreateTable
18+ CREATE TABLE "InterestSubject " (
19+ " id" SERIAL NOT NULL ,
20+ " name" TEXT NOT NULL ,
21+ " group" TEXT NOT NULL ,
22+
23+ CONSTRAINT " InterestSubject_pkey" PRIMARY KEY (" id" )
24+ );
25+
26+ -- CreateTable
27+ CREATE TABLE "Interest " (
28+ " userId" INTEGER NOT NULL ,
29+ " subjectId" INTEGER NOT NULL
30+ );
31+
32+ -- CreateIndex
33+ CREATE UNIQUE INDEX "InterestSubject_name_group_key " ON " InterestSubject" (" name" , " group" );
34+
35+ -- CreateIndex
36+ CREATE UNIQUE INDEX "Interest_userId_subjectId_key " ON " Interest" (" userId" , " subjectId" );
37+
38+ -- AddForeignKey
39+ ALTER TABLE " Interest" ADD CONSTRAINT " Interest_userId_fkey" FOREIGN KEY (" userId" ) REFERENCES " User" (" id" ) ON DELETE CASCADE ON UPDATE CASCADE;
40+
41+ -- AddForeignKey
42+ ALTER TABLE " Interest" ADD CONSTRAINT " Interest_subjectId_fkey" FOREIGN KEY (" subjectId" ) REFERENCES " InterestSubject" (" id" ) ON DELETE CASCADE ON UPDATE CASCADE;
43+
You can’t perform that action at this time.
0 commit comments