-
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: added contributors field in projects
- Loading branch information
1 parent
c46e606
commit 67510e3
Showing
9 changed files
with
367 additions
and
82 deletions.
There are no files selected for viewing
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
23 changes: 23 additions & 0 deletions
23
apps/web-api/prisma/migrations/20231201115425_project_contributors/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,23 @@ | ||
-- CreateTable | ||
CREATE TABLE "ProjectContributor" ( | ||
"id" SERIAL NOT NULL, | ||
"uid" TEXT NOT NULL, | ||
"type" TEXT NOT NULL, | ||
"projectUid" TEXT NOT NULL, | ||
"teamUid" TEXT NOT NULL, | ||
"memberUid" TEXT NOT NULL, | ||
|
||
CONSTRAINT "ProjectContributor_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "ProjectContributor_uid_key" ON "ProjectContributor"("uid"); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "ProjectContributor" ADD CONSTRAINT "ProjectContributor_projectUid_fkey" FOREIGN KEY ("projectUid") REFERENCES "Project"("uid") ON DELETE RESTRICT ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "ProjectContributor" ADD CONSTRAINT "ProjectContributor_teamUid_fkey" FOREIGN KEY ("teamUid") REFERENCES "Team"("uid") ON DELETE RESTRICT ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "ProjectContributor" ADD CONSTRAINT "ProjectContributor_memberUid_fkey" FOREIGN KEY ("memberUid") REFERENCES "Member"("uid") ON DELETE RESTRICT ON UPDATE CASCADE; |
12 changes: 12 additions & 0 deletions
12
apps/web-api/prisma/migrations/20231211103733_contributor_type_enum/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,12 @@ | ||
/* | ||
Warnings: | ||
- Changed the type of `type` on the `ProjectContributor` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required. | ||
*/ | ||
-- CreateEnum | ||
CREATE TYPE "ProjectContributorType" AS ENUM ('MAINTENER', 'COLLABORATOR'); | ||
|
||
-- AlterTable | ||
ALTER TABLE "ProjectContributor" DROP COLUMN "type", | ||
ADD COLUMN "type" "ProjectContributorType" NOT NULL; |
Oops, something went wrong.