diff options
author | Florian Pritz <bluewind@xinu.at> | 2015-02-08 01:14:26 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2015-02-08 01:14:26 +0100 |
commit | 89191e702cad9dae78151addd19185695fb19d39 (patch) | |
tree | 7343e1891d61068dddeb3558abc08179fdc323ec /application/controllers | |
parent | 5b225c751d60d79916da4a7db761f823e12148de (diff) |
run-tests.sh: Clean up old database before running tests
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/controllers')
-rw-r--r-- | application/controllers/tools.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/application/controllers/tools.php b/application/controllers/tools.php index f04f86224..e36b09b79 100644 --- a/application/controllers/tools.php +++ b/application/controllers/tools.php @@ -55,6 +55,10 @@ class Tools extends MY_Controller { } } + if (empty($tables_to_drop)) { + return; + } + $this->db->query('SET FOREIGN_KEY_CHECKS = 0'); $this->db->query('DROP TABLE '.implode(", ", $tables_to_drop)); $this->db->query('SET FOREIGN_KEY_CHECKS = 1'); |