aboutsummaryrefslogtreecommitdiffstats
path: root/utility/remove_migrations.sh
diff options
context:
space:
mode:
Diffstat (limited to 'utility/remove_migrations.sh')
-rwxr-xr-xutility/remove_migrations.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/utility/remove_migrations.sh b/utility/remove_migrations.sh
new file mode 100755
index 0000000..8e3d6d1
--- /dev/null
+++ b/utility/remove_migrations.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+echo "Removing migrations from all migrations directories, except in .venv and contrib..."
+
+find . -path "*/migrations/*.py" -not -name "__init__.py" -not -path "./contrib/*" -not -path "./.venv/*" -delete
+find . -path "*/migrations/*.pyc" -not -path "./contrib/*" -not -path "./.venv/*" -delete
+find . -path "*/migrations/__pycache__" -not -path "./contrib/*" -not -path "./.venv/*" -delete