The edits to Rails models, generated in Docker, do not update in Docker when migrating

35 Views Asked by At

I am trying to generate a migration, for which I first enter with

docker compose exec rails bash.

Then I create the migration using

rails generate model 

and it is successfully created locally. After that, I edit this migration in VSCode. However, when I run

rails db:migrate 

the migration is created as if it were generated with 'rails generate,' without taking into account the edits.

If I bring up the containers again, perform a rollback, and migrate again, the error persists.

How can I ensure that the Docker environment executes the edits to the migration file so that it migrates correctly?

0

There are 0 best solutions below