File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55echo " Running Datatracker checks..."
66./ietf/manage.py check
77
8- if ! ietf/manage.py migrate --check ; then
8+ # Check whether the blobdb database exists - inspectdb will return a false
9+ # status if not.
10+ if ietf/manage.py inspectdb --database blobdb > /dev/null 2>&1 ; then
11+ HAVE_BLOBDB=" yes"
12+ fi
13+
14+ migrations_applied_for () {
15+ local DATABASE=${1:- default}
16+ ietf/manage.py migrate --check --database " $DATABASE "
17+ }
18+
19+ migrations_all_applied () {
20+ if [[ " $HAVE_BLOBDB " == " yes" ]]; then
21+ migrations_applied_for default && migrations_applied_for blobdb
22+ else
23+ migrations_applied_for default
24+ fi
25+ }
26+
27+ if ! migrations_all_applied; then
928 echo " Unapplied migrations found, waiting to start..."
1029 sleep 5
11- while ! ietf/manage.py migrate --check ; do
30+ while ! migrations_all_applied ; do
1231 echo " ... still waiting for migrations..."
1332 sleep 5
1433 done
Original file line number Diff line number Diff line change 33echo " Running Datatracker checks..."
44./ietf/manage.py check
55
6- if ! ietf/manage.py migrate --check ; then
6+ # Check whether the blobdb database exists - inspectdb will return a false
7+ # status if not.
8+ if ietf/manage.py inspectdb --database blobdb > /dev/null 2>&1 ; then
9+ HAVE_BLOBDB=" yes"
10+ fi
11+
12+ migrations_applied_for () {
13+ local DATABASE=${1:- default}
14+ ietf/manage.py migrate --check --database " $DATABASE "
15+ }
16+
17+ migrations_all_applied () {
18+ if [[ " $HAVE_BLOBDB " == " yes" ]]; then
19+ migrations_applied_for default && migrations_applied_for blobdb
20+ else
21+ migrations_applied_for default
22+ fi
23+ }
24+
25+ if ! migrations_all_applied; then
726 echo " Unapplied migrations found, waiting to start..."
827 sleep 5
9- while ! ietf/manage.py migrate --check ; do
28+ while ! migrations_all_applied ; do
1029 echo " ... still waiting for migrations..."
1130 sleep 5
1231 done
You can’t perform that action at this time.
0 commit comments