-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from HF6-PROJECT/ara-17
feat: Added starred endpoints
- Loading branch information
Showing
20 changed files
with
1,113 additions
and
3 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
prisma/migrations/20231011083919_item_starred/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
-- CreateTable | ||
CREATE TABLE "ItemStarred" ( | ||
"id" SERIAL NOT NULL, | ||
"itemId" INTEGER NOT NULL, | ||
"userId" INTEGER NOT NULL, | ||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updatedAt" TIMESTAMP(3) NOT NULL, | ||
|
||
CONSTRAINT "ItemStarred_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateIndex | ||
CREATE INDEX "ItemStarred_itemId_idx" ON "ItemStarred"("itemId"); | ||
|
||
-- CreateIndex | ||
CREATE INDEX "ItemStarred_userId_idx" ON "ItemStarred"("userId"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "ItemStarred_itemId_userId_key" ON "ItemStarred"("itemId", "userId"); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "ItemStarred" ADD CONSTRAINT "ItemStarred_itemId_fkey" FOREIGN KEY ("itemId") REFERENCES "Item"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "ItemStarred" ADD CONSTRAINT "ItemStarred_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.