mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-08 11:37:25 +00:00
Added database migration files
This commit is contained in:
parent
7cde991871
commit
171c586db1
3 changed files with 10138 additions and 0 deletions
12
src/app/db/migrations/0212_sweet_the_anarchist.sql
Normal file
12
src/app/db/migrations/0212_sweet_the_anarchist.sql
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
CREATE TABLE "portfolioInvitations" (
|
||||
"id" bigserial PRIMARY KEY NOT NULL,
|
||||
"portfolio_id" bigint NOT NULL,
|
||||
"email" text NOT NULL,
|
||||
"role" "role" NOT NULL,
|
||||
"invited_by_user_id" bigint NOT NULL,
|
||||
"created_at" timestamp (6) with time zone DEFAULT now() NOT NULL,
|
||||
CONSTRAINT "portfolio_invitations_portfolio_email_unique" UNIQUE("portfolio_id","email")
|
||||
);
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE "portfolioInvitations" ADD CONSTRAINT "portfolioInvitations_portfolio_id_portfolio_id_fk" FOREIGN KEY ("portfolio_id") REFERENCES "public"."portfolio"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||
ALTER TABLE "portfolioInvitations" ADD CONSTRAINT "portfolioInvitations_invited_by_user_id_user_id_fk" FOREIGN KEY ("invited_by_user_id") REFERENCES "public"."user"("id") ON DELETE no action ON UPDATE no action;
|
||||
10119
src/app/db/migrations/meta/0212_snapshot.json
Normal file
10119
src/app/db/migrations/meta/0212_snapshot.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1485,6 +1485,13 @@
|
|||
"when": 1779898075572,
|
||||
"tag": "0211_lovely_sue_storm",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 212,
|
||||
"version": "7",
|
||||
"when": 1779900843875,
|
||||
"tag": "0212_sweet_the_anarchist",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue