Browse Source

Adaptando script reset_all_migrations.sh. Sempre executará a partir da raiz do repositório

Signed-off-by: Eliseu Egewarth <eliseuegewarth@gmail.com>
pull/1933/head
Eliseu Egewarth 8 years ago
parent
commit
3abb01c177
  1. 5
      scripts/django/reset_all_migrations.sh

5
scripts/reset_all_migrations.sh → scripts/django/reset_all_migrations.sh

@ -3,6 +3,11 @@
# Sends all django migrations to the trash bin # Sends all django migrations to the trash bin
# Requires trash-cli. To install: # Requires trash-cli. To install:
# sudo apt-get install trash-cli # sudo apt-get install trash-cli
hash trash-put 2>/dev/null || { echo >&2 "I require trash-put but it's not installed. Aborting."; exit 1; }
git_project_root=$(git rev-parse --show-toplevel)
cd ${git_project_root}
find -name 00*.py | grep /migrations/ | xargs trash-put find -name 00*.py | grep /migrations/ | xargs trash-put
# Make all migrations from scratch # Make all migrations from scratch
Loading…
Cancel
Save