From ce5e1a3cc639b1709c11580a6e6764d81e3fa56f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 25 Jan 2019 15:23:28 +0200 Subject: [ci skip] Fix #5681 --- system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php | 2 +- system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php | 2 +- system/database/drivers/postgre/postgre_forge.php | 2 +- user_guide_src/source/changelog.rst | 4 ++++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php b/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php index 54752f153..eceb59796 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php @@ -150,7 +150,7 @@ class CI_DB_pdo_firebird_forge extends CI_DB_pdo_forge { if ( ! empty($field[$i]['default'])) { $sqls[] = $sql.' ALTER COLUMN '.$this->db->escape_identifiers($field[$i]['name']) - .' SET DEFAULT '.$field[$i]['default']; + .' SET '.$field[$i]['default']; } if (isset($field[$i]['null'])) diff --git a/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php b/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php index ff7a11075..a4ccff407 100644 --- a/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php +++ b/system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php @@ -130,7 +130,7 @@ class CI_DB_pdo_pgsql_forge extends CI_DB_pdo_forge { if ( ! empty($field[$i]['default'])) { $sqls[] = $sql.' ALTER COLUMN '.$this->db->escape_identifiers($field[$i]['name']) - .' SET DEFAULT '.$field[$i]['default']; + .' SET '.$field[$i]['default']; } if (isset($field[$i]['null'])) diff --git a/system/database/drivers/postgre/postgre_forge.php b/system/database/drivers/postgre/postgre_forge.php index 353ddac99..481e222b8 100644 --- a/system/database/drivers/postgre/postgre_forge.php +++ b/system/database/drivers/postgre/postgre_forge.php @@ -125,7 +125,7 @@ class CI_DB_postgre_forge extends CI_DB_forge { if ( ! empty($field[$i]['default'])) { $sqls[] = $sql.' ALTER COLUMN '.$this->db->escape_identifiers($field[$i]['name']) - .' SET DEFAULT '.$field[$i]['default']; + .' SET '.$field[$i]['default']; } if (isset($field[$i]['null'])) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index ff9e92cf5..bd66baa3f 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -8,6 +8,10 @@ Version 3.1.11 Release Date: Not Released +Bug fixes for 3.1.11 +==================== + +- Fixed a bug (#5681) - :doc:`Database Forge ` method ``modify_column()`` produced erroneous SQL for ``DEFAULT`` attribute changes under PostgreSQL, Firebird. Version 3.1.10 ============== -- cgit v1.2.3-24-g4f1b