-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Conversation
@abonander
abonander
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for taking so long to get to this.
However, I think silently ignoring the file is going to be just as annoying if not more so. Imagine how confused you might have been then!
It would be better if this returned an error mentioning the name of the file and explaining why it's invalid.
indlin
commented
Jan 22, 2024
This will break the current contract - run migration only for files with number_ prefix:
if parts.len() != 2 || !parts[1].ends_with(".sql") {
// not of the format: <VERSION>_<DESCRIPTION>.sql; ignore
continue;
}
And may be some one use the other files in migration dir...
About being confused, not at all. I checked this myself :) My tests just failed with a helpful message - the relation "tbl_name" does not exist, and I understand that something is wrong with the migration.
abonander
commented
Feb 19, 2024
@indlin if it's already emitting an error for these files, changing the error message doesn't break the contract.
abonander
commented
Mar 5, 2024
Superceded by #3089
Hello,
As a noob, I lost a few hours of my life with this cryptic error message
This error was result of wrong naming in my migration file. I copied file app_user.sql into the migrations dir.
After some digging, I make this small pr.
Thanks.