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
This commit is contained in:
Henrik Levkowetz 2017-05-30 00:03:26 +00:00
parent e0c994ffea
commit afc932feaa
3 changed files with 13 additions and 1055 deletions

13
bin/drop-new-tables Executable file
View file

@ -0,0 +1,13 @@
#!/bin/bash
# Drop tables which don't exist in the database dump.
[ -n "$1" ] || { echo -e "\nUsage: $0 DUMPFILE\n\nError: No database dump file given"; exit 1; }
zcat $1 | head | grep "Database: ietf_utf8" || { echo "Is this a database dump? Expected to see 'Database: ietf_utf8' "; exit 1; }
echo -e "\nSQL commands:\n"
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
echo -e "\nDone"

View file

@ -227,10 +227,6 @@ $do ietf/manage.py makemigrations | tee /dev/stderr | grep -q "^No changes detec
note "Making sure all migrations have been run ..."
$do ietf/manage.py migrate
note "Saving the current list of tables (for later use)"
$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
$do svn commit table-list.json -m "List of tables at the time of release $VER"
note "Running the tests suite and writing release coverage data ..."
$do ietf/manage.py test --settings=ietf.settings_releasetest --save-version-coverage=$VER

File diff suppressed because it is too large Load diff