Commit 3b09ed0f56011128eab684373bcf27502ff4740a
Committed by
Paulo Meireles
1 parent
fb0f86a6
Exists in
master
and in
28 other branches
[Mezuro] Foreign keys disabled for kalibro database cleaning and then enabled again
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
plugins/mezuro/script/delete_all_kalibro_entries.sh
@@ -10,7 +10,7 @@ LENGTH=${#TABLES} | @@ -10,7 +10,7 @@ LENGTH=${#TABLES} | ||
10 | i=1 | 10 | i=1 |
11 | while [ $i -le $LENGTH ] | 11 | while [ $i -le $LENGTH ] |
12 | do if [ ${#TABLES[$i]} -ne 0 ] | 12 | do if [ ${#TABLES[$i]} -ne 0 ] |
13 | - then mysql --force $MYSQL_PARAMS -e "delete from $DATABASE.${TABLES[$i]}" | 13 | + then mysql $MYSQL_PARAMS -e "SET FOREIGN_KEY_CHECKS = 0; delete from $DATABASE.${TABLES[$i]}; SET FOREIGN_KEY_CHECKS = 1;" |
14 | fi | 14 | fi |
15 | i=$(($i+1)) | 15 | i=$(($i+1)) |
16 | -done | 16 | -done |
17 | +done | ||
17 | \ No newline at end of file | 18 | \ No newline at end of file |