Minor bug fixes (testing on remote machines)

This commit is contained in:
Jon Stephens 2021-12-09 21:12:37 -08:00
parent 70b9fd7bab
commit b1a1c3ecf3

View File

@ -97,12 +97,12 @@ fi
export_tables () {
$SUDO sqlite3 $gravity_db ".dump --preserve-rowids $DB_TABLES" > $DB_DUMP_FILE
for t in $DB_TABLES; do
sed -i "/BEGIN TRAN/a DROP TABLE IF EXISTS $t;" $DB_DUMP_FILE
sed -i "/BEGIN TRAN/a DROP TABLE IF EXISTS '$t';" $DB_DUMP_FILE
done
}
import_tables () {
$SUDO sqlite3 $gravity_db ".read '|$DB_DUMP_FILE'"
$SUDO sqlite3 $gravity_db ".read $DB_DUMP_FILE"
}
# FUNCTIONS