diff --git a/migrations/1710748785469_set_fk_public_contest_team_member_team_id/down.sql b/migrations/1710748785469_set_fk_public_contest_team_member_team_id/down.sql new file mode 100644 index 0000000..924087f --- /dev/null +++ b/migrations/1710748785469_set_fk_public_contest_team_member_team_id/down.sql @@ -0,0 +1,5 @@ +alter table "public"."contest_team_member" drop constraint "contest_team_member_team_id_fkey", + add constraint "contest_team_member_team_id_fkey" + foreign key ("team_id") + references "public"."contest_team" + ("team_id") on update cascade on delete cascade; diff --git a/migrations/1710748785469_set_fk_public_contest_team_member_team_id/up.sql b/migrations/1710748785469_set_fk_public_contest_team_member_team_id/up.sql new file mode 100644 index 0000000..0b1eb35 --- /dev/null +++ b/migrations/1710748785469_set_fk_public_contest_team_member_team_id/up.sql @@ -0,0 +1,5 @@ +alter table "public"."contest_team_member" drop constraint "contest_team_member_team_id_fkey", + add constraint "contest_team_member_team_id_fkey" + foreign key ("team_id") + references "public"."contest_team" + ("team_id") on update restrict on delete cascade; diff --git a/migrations/1710748811122_set_fk_public_contest_team_member_user_uuid/down.sql b/migrations/1710748811122_set_fk_public_contest_team_member_user_uuid/down.sql new file mode 100644 index 0000000..80036a6 --- /dev/null +++ b/migrations/1710748811122_set_fk_public_contest_team_member_user_uuid/down.sql @@ -0,0 +1,5 @@ +alter table "public"."contest_team_member" drop constraint "contest_team_member_user_uuid_fkey", + add constraint "contest_team_member_user_uuid_fkey" + foreign key ("user_uuid") + references "public"."users" + ("uuid") on update cascade on delete cascade; diff --git a/migrations/1710748811122_set_fk_public_contest_team_member_user_uuid/up.sql b/migrations/1710748811122_set_fk_public_contest_team_member_user_uuid/up.sql new file mode 100644 index 0000000..1f5f9f3 --- /dev/null +++ b/migrations/1710748811122_set_fk_public_contest_team_member_user_uuid/up.sql @@ -0,0 +1,5 @@ +alter table "public"."contest_team_member" drop constraint "contest_team_member_user_uuid_fkey", + add constraint "contest_team_member_user_uuid_fkey" + foreign key ("user_uuid") + references "public"."users" + ("uuid") on update restrict on delete cascade;