summaryrefslogtreecommitdiffstats
path: root/application/controllers/tools.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-09-20 16:03:22 +0200
committerFlorian Pritz <bluewind@xinu.at>2015-09-20 16:03:22 +0200
commit7da9de48d2b3bbb0309d6311e4dc7d275d3bf26d (patch)
treebc90956bccaad107255e350ed29cad242eede5cc /application/controllers/tools.php
parentf149a0d1abb4a79b1d5de9ddb5963b2eab4b126d (diff)
parente79c1c45dcd23dde1f4b072993829cc008f4858b (diff)
Merge branch 'postgres' into dev
Diffstat (limited to 'application/controllers/tools.php')
-rw-r--r--application/controllers/tools.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/application/controllers/tools.php b/application/controllers/tools.php
index f0d8ce6f9..664a9e324 100644
--- a/application/controllers/tools.php
+++ b/application/controllers/tools.php
@@ -59,9 +59,14 @@ class Tools extends MY_Controller {
return;
}
- $this->db->query('SET FOREIGN_KEY_CHECKS = 0');
+
+ if ($this->db->dbdriver !== 'postgre') {
+ $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');
+ if ($this->db->dbdriver !== 'postgre') {
+ $this->db->query('SET FOREIGN_KEY_CHECKS = 1');
+ }
}
function test()