summaryrefslogtreecommitdiffstats
path: root/system/database
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 /system/database
parent3be20e26b7d3c0f60bc60b314a85138100edab52 (diff)
Fixed a bug in DB Forge, when inserting an id field (#3456).
Diffstat (limited to 'system/database')
-rw-r--r--system/database/DB_forge.php13
1 files changed, 7 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