Skip to content

Commit

Permalink
Merge pull request #137 from southbridgeio/#998042_change_foreign_key…
Browse files Browse the repository at this point in the history
…_to_issue

#998042 change foreign key to issue
  • Loading branch information
annovikava authored Apr 8, 2024
2 parents ceb99e1 + 9fc6686 commit c08d5c0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions db/migrate/014_add_on_delete_cascade_to_issue_reference.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class AddOnDeleteCascadeToIssueReference < Rails.version < '5.0' ? ActiveRecord::Migration : ActiveRecord::Migration[[Rails::VERSION::MAJOR, Rails::VERSION::MINOR].join('.')]
def change
remove_foreign_key :intouch_telegram_chat_subscriptions, :issues
add_foreign_key :intouch_telegram_chat_subscriptions, :issues, column: :issue_id, on_delete: :cascade
end
end

0 comments on commit c08d5c0

Please sign in to comment.