summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2019-01-25 14:23:28 +0100
committerAndrey Andreev <narf@devilix.net>2019-01-25 14:23:28 +0100
commitce5e1a3cc639b1709c11580a6e6764d81e3fa56f (patch)
treed4656a3d1cb4e729b24c462fb1d735c3a69477aa
parent1a1269149c1a56032740782aa957f76477d0311a (diff)
[ci skip] Fix #5681
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_pgsql_forge.php2
-rw-r--r--system/database/drivers/postgre/postgre_forge.php2
-rw-r--r--user_guide_src/source/changelog.rst4
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 <database/forge>` method ``modify_column()`` produced erroneous SQL for ``DEFAULT`` attribute changes under PostgreSQL, Firebird.
Version 3.1.10
==============