joplin icon indicating copy to clipboard operation
joplin copied to clipboard

Rollback fails when parsing string id

Open garethmdavies opened this issue 9 years ago • 0 comments

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))

garethmdavies avatar Jan 27 '16 14:01 garethmdavies