I recently generated migrations to migrate my foreign keys to big ints on our Rails application, but I receive the following error when loading the application.
ActiveRecord::StatementInvalid (Mysql2::Error: Field 'id' doesn't have a default value
Any ideas as to why I'm getting this error? I was following this blog post about the new Rails convention - http://www.mccartie.com/2016/12/05/rails-5.1.html
Sample migration:
class ChangePrimaryKeyToBigintOnOrganizations < ActiveRecord::Migration[5.0]
def change
change_column :organizations, :id, :bigint
end
end