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?