Running rails db:migrate will change some primary key from bigint to integer?
When I run rails db:migrate in an existing project, the migration files are not changed, but the schema.rb will be updated, and some of the primary keys (mostly account related) will be changed from bigint to integer.
For example:
The migration files were not changed. I can't figure out why.
Will this have bad effects on a running database (postgres)?
Update:
If I run rake db:schema:load instead of migrate, I can get the ids created as bigint. If I run rake db:migrate afterwards, it won't update the schema.
But if I run the migration with an empty database, then the schema will be changed to use integer, and the table ids created are integer as well.
Does this the migration defaults for primary keys is changed somehow?
For example:
The migration files were not changed. I can't figure out why.
Will this have bad effects on a running database (postgres)?
Update:
If I run rake db:schema:load instead of migrate, I can get the ids created as bigint. If I run rake db:migrate afterwards, it won't update the schema.
But if I run the migration with an empty database, then the schema will be changed to use integer, and the table ids created are integer as well.
Does this the migration defaults for primary keys is changed somehow?
Notifications
You’re not receiving notifications from this thread.