summaryrefslogtreecommitdiffstats
path: root/application/controllers/tools.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-07-18 16:25:34 +0200
committerFlorian Pritz <bluewind@xinu.at>2015-09-20 15:19:49 +0200
commit49c8b94e5a2839da7fb9c370ce199b9c06b4a6cf (patch)
tree0d3cffbaf843299ad99f9d9a96ca4b8703abd09b /application/controllers/tools.php
parentd52fe43782b23f2de62d0ccf0535586df0560b19 (diff)
Implement migration 14 for postgres
Signed-off-by: Florian Pritz <bluewind@xinu.at>
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()