-
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.
feat: introduced bio field in member
- Loading branch information
1 parent
56ba696
commit 0eab92d
Showing
14 changed files
with
1,901 additions
and
1,814 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
48 changes: 48 additions & 0 deletions
48
apps/web-api/prisma/migrations/20240902052447_discover_question/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,48 @@ | ||
-- AlterTable | ||
ALTER TABLE "Member" ADD COLUMN "bio" TEXT; | ||
|
||
-- CreateTable | ||
CREATE TABLE "DiscoveryQuestion" ( | ||
"id" SERIAL NOT NULL, | ||
"uid" TEXT NOT NULL, | ||
"title" TEXT, | ||
"content" TEXT NOT NULL, | ||
"viewCount" INTEGER, | ||
"shareCount" INTEGER, | ||
"slug" TEXT NOT NULL, | ||
"isActive" BOOLEAN NOT NULL DEFAULT true, | ||
"teamUid" TEXT, | ||
"projectUid" TEXT, | ||
"eventUid" TEXT, | ||
"createdBy" TEXT NOT NULL, | ||
"modifiedBy" TEXT NOT NULL, | ||
"answer" TEXT, | ||
"answerSources" JSONB[], | ||
"answerSourceFrom" TEXT, | ||
"relatedQuestions" JSONB[], | ||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updatedAt" TIMESTAMP(3) NOT NULL, | ||
|
||
CONSTRAINT "DiscoveryQuestion_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "DiscoveryQuestion_uid_key" ON "DiscoveryQuestion"("uid"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "DiscoveryQuestion_slug_key" ON "DiscoveryQuestion"("slug"); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "DiscoveryQuestion" ADD CONSTRAINT "DiscoveryQuestion_teamUid_fkey" FOREIGN KEY ("teamUid") REFERENCES "Team"("uid") ON DELETE SET NULL ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "DiscoveryQuestion" ADD CONSTRAINT "DiscoveryQuestion_projectUid_fkey" FOREIGN KEY ("projectUid") REFERENCES "Project"("uid") ON DELETE SET NULL ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "DiscoveryQuestion" ADD CONSTRAINT "DiscoveryQuestion_eventUid_fkey" FOREIGN KEY ("eventUid") REFERENCES "PLEvent"("uid") ON DELETE SET NULL ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "DiscoveryQuestion" ADD CONSTRAINT "DiscoveryQuestion_createdBy_fkey" FOREIGN KEY ("createdBy") REFERENCES "Member"("uid") ON DELETE RESTRICT ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "DiscoveryQuestion" ADD CONSTRAINT "DiscoveryQuestion_modifiedBy_fkey" FOREIGN KEY ("modifiedBy") REFERENCES "Member"("uid") ON DELETE RESTRICT 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
Oops, something went wrong.