Skip to content

Commit afc932f

Browse files
committed
Removed the table-list.json file and support for it; there are better ways of cleaning out extra local tables (see bin/drop-new-tables for a starting point)
- Legacy-Id: 13459
1 parent e0c994f commit afc932f

3 files changed

Lines changed: 13 additions & 1055 deletions

File tree

bin/drop-new-tables

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
# Drop tables which don't exist in the database dump.
4+
5+
[ -n "$1" ] || { echo -e "\nUsage: $0 DUMPFILE\n\nError: No database dump file given"; exit 1; }
6+
7+
zcat $1 | head | grep "Database: ietf_utf8" || { echo "Is this a database dump? Expected to see 'Database: ietf_utf8' "; exit 1; }
8+
9+
echo -e "\nSQL commands:\n"
10+
11+
diff <(zcat $1 | grep '^DROP TABLE IF EXISTS' | tr -d '`;' | field 5) <(ietf/manage.py dbshell <<< 'show tables;' | tail -n +2) | grep '^>' | awk '{print "drop table if exists", $2, ";";}' | tee /dev/stderr | ietf/manage.py dbshell
12+
13+
echo -e "\nDone"

bin/mkrelease

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,6 @@ $do ietf/manage.py makemigrations | tee /dev/stderr | grep -q "^No changes detec
227227
note "Making sure all migrations have been run ..."
228228
$do ietf/manage.py migrate
229229

230-
note "Saving the current list of tables (for later use)"
231-
$do ietf/manage.py dbshell <<< "show tables;" | tail -n +2 | jq -R -s "split(\"\n\") | {\"$VER\":.}" | jq -s 'add' - table-list.json | $do update table-list.json
232-
$do svn commit table-list.json -m "List of tables at the time of release $VER"
233-
234230
note "Running the tests suite and writing release coverage data ..."
235231
$do ietf/manage.py test --settings=ietf.settings_releasetest --save-version-coverage=$VER
236232

0 commit comments

Comments
 (0)