-
Notifications
You must be signed in to change notification settings - Fork 59
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
b7e647a
commit 2762b97
Showing
30 changed files
with
1,316 additions
and
760 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.