]> ToastFreeware Gitweb - philipp/winterrodeln/wradmin.git/blobdiff - tests/testdb.md
Optimize order of delete from statement.
[philipp/winterrodeln/wradmin.git] / tests / testdb.md
index 1a9da8d29638ae8a3854fcaadb15221921bf5e08..a0ce7d9e35870a3448b600d131246588f3371a73 100644 (file)
@@ -5,7 +5,7 @@ First import a "real" database snapshot in a temparary database on a non-product
     mysql philipp_winterrodeln_wiki < philipp_winterrodeln_wiki.sql
 
 
-Delete unnessary tables (execute it a few times until no more "Cannot delete or update a parent row: a foreign key constraint fails" errors occur):
+Delete unnessary tables:
 ```{sql}
 DROP TABLE IF EXISTS
 wrintermapsreport,
@@ -80,7 +80,11 @@ watchlist
 ;
 ```
 
-Should remain:
+The command
+
+    show tables;
+
+should show the following remaining tables:
 ```
 categorylinks
 page
@@ -175,11 +179,11 @@ Drop entries from Winterrodeln related tables:
 DELETE FROM wrreport;
 DELETE FROM wrsledruncache;
 DELETE FROM wrinncache;
-DELETE FROM wrregion;
 DELETE FROM wrregioncache;
+DELETE FROM wrregion;
 ```
 
 
 Export data to SQL:
 
-    mysqldump philipp_winterrodeln_wiki --skip-extended-insert --skip-add-locks > philipp_winterrodeln_wiki.sql
\ No newline at end of file
+    mysqldump philipp_winterrodeln_wiki --skip-extended-insert --skip-add-locks > testdb.sql