diff options
author | Tomasz T <tomasz154@10g.pl> | 2011-12-05 15:30:05 +0100 |
---|---|---|
committer | Tomasz T <tomasz154@10g.pl> | 2011-12-05 15:30:05 +0100 |
commit | c9fc88c09c1a0accdddd3710907fee2f5b42d7ad (patch) | |
tree | c12c4c636eb9234a136c3fccf410383ba7df33a2 /system/database/drivers/postgre | |
parent | b9ec402de2ad190df899426f4bbcebbcc759d01f (diff) |
changed _create_table to return true if table already exists
Diffstat (limited to 'system/database/drivers/postgre')
-rw-r--r-- | system/database/drivers/postgre/postgre_forge.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/system/database/drivers/postgre/postgre_forge.php b/system/database/drivers/postgre/postgre_forge.php index ddbce6062..df0338e73 100644 --- a/system/database/drivers/postgre/postgre_forge.php +++ b/system/database/drivers/postgre/postgre_forge.php @@ -81,9 +81,10 @@ class CI_DB_postgre_forge extends CI_DB_forge { if ($if_not_exists === TRUE) { + // PostgreSQL doesn't support IF NOT EXISTS syntax so we check if table exists manually if ($this->db->table_exists($table)) { - return "SELECT 1"; // Needs to return innocous but valid SQL statement + return TRUE; } } |