Skip to content
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

Rollback fails when parsing string id #84

Open
garethmdavies opened this issue Jan 27, 2016 · 0 comments
Open

Rollback fails when parsing string id #84

garethmdavies opened this issue Jan 27, 2016 · 0 comments

Comments

@garethmdavies
Copy link

When performing a rollback with a migration id (and not a number of migrations to revert) the parsing of the id throws a "java.lang.NumberFormatException".

It looks like ragtime should handle this rollback scenario by performing an integer check. If the amount-or-id is an integer then the rollbacks perfoms x rollback iterations else the specific migration id is rolled back.

see joplin.alias rollback func:

(defn rollback [config-file env & [db num]]
  (let [conf (*load-config* config-file)]
    (when (and db num)
      (repl/rollback conf
                     (keyword env) (keyword db)
                     (Long/parseLong num)))) ;;<<---- is this needed??
  (System/exit 0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant