-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switched competition_id foreign key in microservice_registrations com…
…p cascade (#10052) * switched microservice_registrations comp key to cascade * switched to on_delete: :cascade * actually ran the migration oops
- Loading branch information
Showing
2 changed files
with
10 additions
and
2 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
db/migrate/20241009111904_add_cascade_to_microservice_competition_id.rb
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,8 @@ | ||
# frozen_string_literal: true | ||
|
||
class AddCascadeToMicroserviceCompetitionId < ActiveRecord::Migration[7.2] | ||
def change | ||
remove_foreign_key :microservice_registrations, :Competitions | ||
add_foreign_key :microservice_registrations, :Competitions, on_update: :cascade, on_delete: :cascade | ||
end | ||
end |
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