After updating my gems, I'm not being able to run rails db:schema:load
. The error reported is:
ActiveRecord::MismatchedForeignKey: Column `user_id` on table
`user_applications` has a type of `int(11)`.
This does not match column `id` on `users`, which has type
`bigint(20)`.
This has to do with some default int type for primary key change from rails 5.2 (or rails 5.1, I don't know). My question is: how should I "migrate" the db/schema? Or, can I set the primary key to be 32bit integer? Because I already tried in application.rb
:
config.generators do |generator|
generator.orm :active_record, primary_key_type: :integer
end
but it didn't do anything when running the aforementioned task.