From 33f542487a89da4a8edad934b82aae7484f70ca3 Mon Sep 17 00:00:00 2001 From: Rafael Bodill Date: Thu, 18 Sep 2014 22:02:26 +0300 Subject: Migrations support for PostgreSQL --- application/migrations/010_files_innodb.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'application/migrations/010_files_innodb.php') diff --git a/application/migrations/010_files_innodb.php b/application/migrations/010_files_innodb.php index b32f94724..f965344d2 100644 --- a/application/migrations/010_files_innodb.php +++ b/application/migrations/010_files_innodb.php @@ -5,9 +5,12 @@ class Migration_files_innodb extends CI_Migration { public function up() { - $this->db->query(" - ALTER TABLE `files` ENGINE = InnoDB; - "); + if ($this->db->dbdriver != 'postgre') + { + $this->db->query(" + ALTER TABLE `files` ENGINE = InnoDB; + "); + } } public function down() -- cgit v1.2.3-24-g4f1b From fe7f15dbfb8020daf96110e86e359ec01558fcb8 Mon Sep 17 00:00:00 2001 From: Rafael Bodill Date: Thu, 18 Sep 2014 22:47:21 +0300 Subject: Correcting bracket style for 'if' --- application/migrations/010_files_innodb.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'application/migrations/010_files_innodb.php') diff --git a/application/migrations/010_files_innodb.php b/application/migrations/010_files_innodb.php index f965344d2..318314bd3 100644 --- a/application/migrations/010_files_innodb.php +++ b/application/migrations/010_files_innodb.php @@ -5,8 +5,7 @@ class Migration_files_innodb extends CI_Migration { public function up() { - if ($this->db->dbdriver != 'postgre') - { + if ($this->db->dbdriver != 'postgre') { $this->db->query(" ALTER TABLE `files` ENGINE = InnoDB; "); -- cgit v1.2.3-24-g4f1b