summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2019-02-14 17:58:01 +0100
committerAndrey Andreev <narf@devilix.net>2019-02-14 17:58:01 +0100
commit02cd9a097ea63593d3439ed89ddbfb0a19a2a7bd (patch)
treef385b4b0ef710bf9696b5eb49c9b256a08d7dee3
parent15eaca036d2b43df1a8c3e1d7db2c44ec3de4aaf (diff)
parenta0744323430f78e869e61d5412dff927fc512878 (diff)
Merge branch '3.1-stable' into develop
-rw-r--r--system/database/drivers/oci8/oci8_forge.php10
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_firebird_forge.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_oci_forge.php7
-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.rst5
6 files changed, 20 insertions, 8 deletions
diff --git a/system/database/drivers/oci8/oci8_forge.php b/system/database/drivers/oci8/oci8_forge.php
index 2f491d8f4..58f3c3913 100644
--- a/system/database/drivers/oci8/oci8_forge.php
+++ b/system/database/drivers/oci8/oci8_forge.php
@@ -82,11 +82,11 @@ class CI_DB_oci8_forge extends CI_DB_forge {
protected $_unsigned = FALSE;
/**
- * NULL value representation in CREATE/ALTER TABLE statements
- *
- * @var string
- */
- protected $_null = 'NULL';
+ * NULL value representation in CREATE/ALTER TABLE statements
+ *
+ * @var string
+ */
+ protected $_null = 'NULL';
// --------------------------------------------------------------------
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_oci_forge.php b/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php
index 0abda5930..b5d3eb143 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_oci_forge.php
@@ -74,6 +74,13 @@ class CI_DB_pdo_oci_forge extends CI_DB_pdo_forge {
*/
protected $_unsigned = FALSE;
+ /**
+ * NULL value representation in CREATE/ALTER TABLE statements
+ *
+ * @var string
+ */
+ protected $_null = '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 9d6bce4c7..5a99dfe9c 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -134,6 +134,11 @@ 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.
+- Fixed a bug (#5692) - :doc:`Database Forge <database/forge>` didn't handle column nullability with the 'oci8', 'pdo/oci' drivers.
Version 3.1.10
==============