Right now, the output of running or reverting migrations only lists the timestamp:
$ diesel migration revert
Rolling back migration 20170812171255
$ diesel migration run
Running migration 20170812171255
These aren't very informative, so it would be nice if it printed the name as well. Even just the full migration folder name would be preferable.
Diesel CLI version: 0.15.0
@killercup I Can take this since I'm pretty familiar with that code if that's cool!
@juliusdelta Go ahead
So the first way I can think to do this would be:
migration.file_path() which returns something like: "/path/diesel_cli_test/migrations/20170924041631_create_posts". Then parse it to just print 20170924041631 -> Create Posts (or something similar) and use that to replace https://github.com/diesel-rs/diesel/blob/master/diesel/src/migrations/mod.rs#L313 and corresponding revert output.It'd have to be it's own method for sure. I'd probably call it migration_output_information() or something.
Thoughts?
Actually std::Path might have what I need to parse the path https://doc.rust-lang.org/std/path/enum.Component.html
Can this issue be closed as this is fixed?
Most helpful comment
Can this issue be closed as this is fixed?