New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--migration-dir option does not work #1301

Closed
agentsim opened this Issue Nov 11, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@agentsim

agentsim commented Nov 11, 2017

Setup

Versions

  • Rust: 1.21
  • Diesel: 0.16
  • Database: SQLite
  • Operating System MacOS 10.13.1

Problem Description

The CLI does not respect the --migration-dir option.

What are you trying to accomplish?

Perform diesel migration commands on a custom migration directory. Specifically the following command: diesel migration --database-url my.db --migration-dir migrations/sqlite list

The migrations/sqlite folder contains a folder called 2017-11-11-060348_initial, which contains only up.sql and down.sql. my.db has had no migrations applied.

What is the expected output?

The command should show the list of available migrations.

What is the actual output?

Invalid migration directory, the directory's name should be <timestamp>_<name_of_migration>, and it should only contain up.sql and down.sql.

@weiznich

This comment has been minimized.

Contributor

weiznich commented Nov 12, 2017

I think this may be a similar issue as #1201

weiznich added a commit to weiznich/diesel that referenced this issue Nov 14, 2017

Fix diesel-rs#1301
Here we could not use the global argument thing because --migration_dir is
no global argument, instead we have to look in each subcommand for the
corresponding argument
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment