-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(deployment): reworks top up deployments to rely on db setting
refs #714
- Loading branch information
1 parent
9723093
commit 852fdbd
Showing
31 changed files
with
1,317 additions
and
761 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
CREATE TABLE IF NOT EXISTS "deployment_settings" ( | ||
"id" serial PRIMARY KEY NOT NULL, | ||
"user_id" uuid NOT NULL, | ||
"dseq" varchar NOT NULL, | ||
"auto_top_up_enabled" boolean DEFAULT false NOT NULL, | ||
"created_at" timestamp DEFAULT now(), | ||
"updated_at" timestamp DEFAULT now(), | ||
CONSTRAINT "dseq_user_id_idx" UNIQUE("dseq","user_id") | ||
); | ||
--> statement-breakpoint | ||
DO $$ BEGIN | ||
ALTER TABLE "deployment_settings" ADD CONSTRAINT "deployment_settings_user_id_userSetting_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."userSetting"("id") ON DELETE cascade ON UPDATE no action; | ||
EXCEPTION | ||
WHEN duplicate_object THEN null; | ||
END $$; | ||
--> statement-breakpoint | ||
CREATE INDEX IF NOT EXISTS "auto_top_up_enabled_id_idx" ON "deployment_settings" USING btree ("auto_top_up_enabled","id"); |
Oops, something went wrong.