casa icon indicating copy to clipboard operation
casa copied to clipboard

Fix problem where running migrations changes db ids from integer to bigint and back

Open compwron opened this issue 2 years ago • 3 comments

Fix problem where running migrations changes db ids from integer to bigint and back

They should be bigint

The problem seems to be the difference between rake db:drop db:create db:migrate and rake db:setup

compwron avatar Jun 22 '22 01:06 compwron

Hi! Is this still happening? I couldn't reproduce the error.

andreLumor avatar Jul 01 '22 17:07 andreLumor

Hi, yes it's still happening. For me, for example, when I run rake db:migrate some ids change from bigint to integer image

mussajoop avatar Jul 25 '22 23:07 mussajoop

The problem seems to be the difference between rake db:drop db:create db:migrate and rake db:setup :/

compwron avatar Jul 26 '22 20:07 compwron

This is a known bug that has been addressed in Rails: https://github.com/rails/rails/issues/45093 If you're having this issue locally, you have to drop your database locally and recreate it!

johncarlocerna avatar Oct 27 '22 15:10 johncarlocerna