Rails 7.0 Added Option To Avoid Foreign Key Migration Exceptions

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 https://rubyonrails.ba/single/rails-7-0-added-option-to-avoid-foreign-key-migration-exceptions

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles