At one point, when I tried rails db: migrate
,
StandardError: An error has occurred, all later migrations canceled:
An error has occurred.
First rake db: reset
and then
Trying to solve it by rails db: migrate
again,
I get an error and can't even rake db: reset
.
Check here if there are any mistakes in the migration file.
However, no matter how many times I checked, there was no spelling mistake.
I searched quite a bit. And at one point
** "Oh, full-width characters are included." **
Yes, it's a solution.
When I couldn't rails db: migrate
, I had a misspelling or double-byte characters.
I have a lot of things like that.
It's a simple matter, but this time it took some time to investigate the cause.
I think that beginners, including myself, often have trouble with migration files. rails At the beginning of the beginning I accidentally deleted the migration file, or corrected it without rolling back ... It's scary.
"You have to be careful when handling migration files" I realized again that.
Recommended Posts