From 7a0dbf79773785634b0e16720ba6067fb2c034d3 Mon Sep 17 00:00:00 2001 From: ljf Date: Wed, 14 Aug 2019 13:05:23 +0200 Subject: [PATCH] [fix] Ask for specifying migrations to skip --- data/actionsmap/yunohost.yml | 4 ++-- src/yunohost/tools.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data/actionsmap/yunohost.yml b/data/actionsmap/yunohost.yml index a4dc8d453..054171133 100644 --- a/data/actionsmap/yunohost.yml +++ b/data/actionsmap/yunohost.yml @@ -1736,10 +1736,10 @@ tools: help: Skip specified migrations (to be used only if you know what you are doing) action: store_true --revert: - help: Attempt to revert already-ran migrations (to be used only if you know what you are doing) + help: Attempt to revert already-ran specified migrations (to be used only if you know what you are doing) action: store_true --force-rerun: - help: Re-run already-ran migrations (to be used only if you know what you are doing) + help: Re-run already-ran specified migration (to be used only if you know what you are doing) action: store_true --auto: help: Automatic mode, won't run manual migrations (to be used only if you know what you are doing) diff --git a/src/yunohost/tools.py b/src/yunohost/tools.py index 8c07855a3..9d341ca3d 100644 --- a/src/yunohost/tools.py +++ b/src/yunohost/tools.py @@ -1044,7 +1044,7 @@ def tools_migrations_migrate(targets=[], skip=False, auto=False, force_rerun=Fal targets A list migrations to run (all pendings by default) --skip Skip specified migrations (to be used only if you know what you are doing) (must explicit which migrations) - --auto Automatic mode, won't run manual migrations (to be used only if you know what you are doing) (must explicit which migrations) + --auto Automatic mode, won't run manual migrations (to be used only if you know what you are doing) --force-rerun Re-run already-ran migrations (to be used only if you know what you are doing)(must explicit which migrations) --revert Attempt to revert already-ran migrations (to be used only if you know what you are doing)(must explicit which migrations) --accept-disclaimer Accept disclaimers of migrations (please read them before using this option) (only valid for one migration) @@ -1067,7 +1067,7 @@ def tools_migrations_migrate(targets=[], skip=False, auto=False, force_rerun=Fal # If no target specified if not targets: # skip, revert or force require explicit targets - if (revert or force_rerun): + if (skip or revert or force_rerun): raise YunohostError("migrations_must_provide_explicit_targets") # Otherwise, targets are all pending migrations