Actions
Refactor #28620
closeddb:migrate fails with SQLite on Rails 6
Description
== 20140910153654 MoveHostNicsToInterfaces: migrating ========================= -- add_column(:nics, :primary, :boolean, {:default=>false}) -> 0.0015s -- add_column(:nics, :provision, :boolean, {:default=>false}) -> 0.0012s -- Migrating Host interfaces to standalone Interfaces -- remove_column(:hosts, :ip) -> 0.0594s -- remove_column(:hosts, :mac) -> 0.0626s -- remove_column(:hosts, :primary_interface) -> 0.0668s -- remove_foreign_key(:hosts, {:name=>"hosts_subnet_id_fk"}) rake aborted! StandardError: An error has occurred, this and all later migrations canceled: Table 'hosts' has no foreign key for {} /home/mmoll/mystuff/gitrepos/theforeman/foreman/vendor/ruby/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/connection_adapters/sqlite3/schema_statements.rb:75:in `remove_foreign_key' /home/mmoll/mystuff/gitrepos/theforeman/foreman/vendor/ruby/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/migration.rb:890:in `block in method_missing' /home/mmoll/mystuff/gitrepos/theforeman/foreman/vendor/ruby/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/migration.rb:858:in `block in say_with_time' /home/mmoll/mystuff/gitrepos/theforeman/foreman/vendor/ruby/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/migration.rb:858:in `say_with_time' /home/mmoll/mystuff/gitrepos/theforeman/foreman/vendor/ruby/2.7.0/gems/activerecord-6.0.2.1/lib/active_record/migration.rb:879:in `method_missing' /home/mmoll/mystuff/gitrepos/theforeman/foreman/db/migrate/20140910153654_move_host_nics_to_interfaces.rb:42:in `up'
Probably related to https://blog.bigbinary.com/2019/09/24/rails-6-adds-add_foreign_key-and-remove_foreign_key-for-sqlite3.html
Updated by Anonymous almost 5 years ago
- Blocks Tracker #24837: Rails 6.0 Tracker added
Updated by The Foreman Bot almost 5 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/7552 added
Updated by Ondřej Ezr over 4 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset a13f48bb25d4f1c039d5ae292f6da570b2d6ede3.
Actions