summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Allard <derek.allard@ellislab.com>2008-05-06 02:17:10 +0200
committerDerek Allard <derek.allard@ellislab.com>2008-05-06 02:17:10 +0200
commit7f309810a6d3da76c1a2c4ef8e900c88f47afee4 (patch)
treec0a7b62552b3ad2bb99d6703c792588e56d85a44
parent3be20e26b7d3c0f60bc60b314a85138100edab52 (diff)
Fixed a bug in DB Forge, when inserting an id field (#3456).
-rw-r--r--system/database/DB_forge.php13
-rw-r--r--user_guide/changelog.html1
2 files changed, 8 insertions, 6 deletions
diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php
index 5f25ebedc..2ddb21be7 100644
--- a/system/database/DB_forge.php
+++ b/system/database/DB_forge.php
@@ -132,12 +132,13 @@ class CI_DB_forge {
{
if ($field == 'id')
{
- $this->fields[] = array('id' => array(
- 'type' => 'INT',
- 'constraint' => 9,
- 'auto_increment' => TRUE
- )
- );
+ $this->add_field(array(
+ 'id' => array(
+ 'type' => 'INT',
+ 'constraint' => 9,
+ 'auto_increment' => TRUE
+ )
+ ));
$this->add_key('id', TRUE);
}
else
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 615d363bc..ffbf2e18b 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -109,6 +109,7 @@ SVN Commit: not currently released</p>
<li>Fixed assorted user guide typos (#3453, #4364, #4379, #4399, #4408, #4412, #4448, #4488).</li>
<li>Fixed an AR_caching error where it wasn't tracking table aliases (#3463).</li>
<li>Fixed an AR bug when joining with a table alias and table prefix (#4400).</li>
+ <li>Fixed a bug in DB Forge, when inserting an id field (#3456).</li>
<li>Fixed a bug in the DB class testing the $params argument.</li>
<li>Fixed a bug in the Table library where the integer 0 in cell data would be displayed as a blank cell.</li>
<li>Fixed bugs (#3523, #4350) in get_filenames() with recursion and problems with Windows when $include_path is used.</li>