-
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.
Removed userMetadataToClubs title dependencies; added db migration
- Loading branch information
Showing
7 changed files
with
872 additions
and
18 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 $$; |
Oops, something went wrong.