-
Notifications
You must be signed in to change notification settings - Fork 7
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 #252 from UTDNebula/JUP-71
JUP-71 Backend Changes
- Loading branch information
Showing
11 changed files
with
1,722 additions
and
19 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
CREATE TABLE IF NOT EXISTS "officers" ( | ||
"id" text NOT NULL, | ||
"club_id" text NOT NULL, | ||
"name" text NOT NULL, | ||
"position" text NOT NULL, | ||
"image" text DEFAULT '/nebula-logo.png' NOT NULL, | ||
"is_president" boolean DEFAULT false NOT NULL, | ||
CONSTRAINT officers_club_id_id PRIMARY KEY("club_id","id") | ||
); | ||
--> statement-breakpoint | ||
ALTER TABLE "user_metadata_to_clubs" DROP COLUMN IF EXISTS "title";--> statement-breakpoint | ||
DO $$ BEGIN | ||
ALTER TABLE "officers" ADD CONSTRAINT "officers_club_id_club_id_fk" FOREIGN KEY ("club_id") REFERENCES "club"("id") ON DELETE no action ON UPDATE no action; | ||
EXCEPTION | ||
WHEN duplicate_object THEN null; | ||
END $$; |
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,4 @@ | ||
ALTER TABLE "officers" DROP CONSTRAINT "officers_club_id_id";--> statement-breakpoint | ||
ALTER TABLE "officers" ADD PRIMARY KEY ("id");--> statement-breakpoint | ||
ALTER TABLE "officers" ALTER COLUMN "id" SET DATA TYPE uuid;--> statement-breakpoint | ||
ALTER TABLE "officers" ALTER COLUMN "id" SET DEFAULT gen_random_uuid(); |
Oops, something went wrong.