Commit 2905966 1 parent 92df6c0 commit 2905966 Copy full SHA for 2905966
File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
set -eux
3
3
4
- # copy old migrations to temporary directory
4
+ # create temporary directory (if it doesn't already exist)
5
5
6
- cp -r benefits/core/migrations benefits/core/old_migrations
6
+ mkdir -p benefits/core/old_migrations
7
+
8
+ # move old migrations to temporary directory, but keep init file
9
+
10
+ mv benefits/core/migrations/* benefits/core/old_migrations
11
+ cp benefits/core/old_migrations/__init__.py benefits/core/migrations
7
12
8
13
# regenerate
9
14
@@ -14,8 +19,9 @@ python manage.py makemigrations
14
19
cp benefits/core/old_migrations/* benefits/core/migrations --no-clobber --recursive
15
20
16
21
# clean up temporary directory
22
+
17
23
rm -rf benefits/core/old_migrations
18
24
19
25
# reformat with black
20
26
21
- python -m black benefits/core/migrations/0001_initial.py
27
+ python -m black benefits/core/migrations/*
You can’t perform that action at this time.
0 commit comments