You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After creating the above migration, I added migrate.cr to my application's dependencies, but failed to notice that shards pulled down the previous version instead, v0.1.1. v0.1.1 still uses !migrate as the command prefix. I configured migrate via code and ran it. Migrate's log output shows that everything is successful:
migrator.to_latest
# => Successfully migrated from version 0 to 1 in 28.449ms
I was confused... migrating up didn't create the table! Especially after creating the table manually and then migrating down to find it was not, in fact, dropped. The above output of migrate is technically correct. The commands which were executed (none!) were not unsuccessful, therefore the migration succeeds.
I believe this raises an important question. Should migrate display a warning when no commands are executed in a migration? If a warning were displayed, it would have helped me not waste a silly amount of time because of a dumb mistake.
The text was updated successfully, but these errors were encountered:
Hello, @t-richards. You can specify tag: v0.2.0-pre.1 in dependencies, so it installs the latest version. As far as I understand, the issue is that it displays success message even if the migration file is empty or formatted incorrectly, right?
As far as I understand, the issue is that it displays success message even if the migration file is empty or formatted incorrectly, right?
Correct. Is this the intended behavior and I just have to be extra careful, or would it be appropriate to display some kind of message in these situations?
I read through the README for
v0.2.0
and saw the following migration syntax:After creating the above migration, I added migrate.cr to my application's dependencies, but failed to notice that shards pulled down the previous version instead,
v0.1.1
.v0.1.1
still uses!migrate
as the command prefix. I configured migrate via code and ran it. Migrate's log output shows that everything is successful:migrator.to_latest # => Successfully migrated from version 0 to 1 in 28.449ms
I was confused... migrating up didn't create the table! Especially after creating the table manually and then migrating down to find it was not, in fact, dropped. The above output of migrate is technically correct. The commands which were executed (none!) were not unsuccessful, therefore the migration succeeds.
I believe this raises an important question. Should migrate display a warning when no commands are executed in a migration? If a warning were displayed, it would have helped me not waste a silly amount of time because of a dumb mistake.
The text was updated successfully, but these errors were encountered: