Rails 7.0 Added Option To Avoid Foreign Key Migration Exceptions
14-Jul-2021 1790
Sometimes in a Ruby on Rails application, we might have a foreign key constraint defined in production database but there may not be a migration file for this.If we add a migration file with add_foreign_keystep, then that migration will run successfully against development and staging databases.But when this migration file will be executed in production, it will raise an exception as follows.
Rails 7.0 Added Option To Avoid Foreign Key Migration Exceptions #ruby #rubydeveloper #rubyonrails #Rails #Added #Option #Avoid #Foreign #Migration #Exceptions https://rubyonrails.ba/link/rails-7-0-added-option-to-avoid-foreign-key-migration-exceptions