If you have recently migrated your rails application and tried the rails db:setup or rails db:schema:load commands, you might have noticed an error like this:
aaa_id on table
bbb does not match column
aaaa, which has type
bigint(20). To resolve this issue, change the type of the
aaa_id column on
bbb to be :bigint. (For example
I will recommend the use of bigint if you are creating a new rails application, in the case of existing application, please add the following code into application.rb file to avoid this issue.
In the Schema.rb file, make sure that you mention id: :integer in create table block
3 thoughts on “Rails: How to resolve db schema load bigint issue”
Great content! Super high-quality! Keep it up! 🙂
Wow because this is great job! Congrats and keep it up.