Upgrade to CodeIgniter 2.0.3

This commit is contained in:
Eike Foken
2011-09-13 19:15:50 +02:00
parent 8dd1099e04
commit a8c2551be2
53 changed files with 1949 additions and 578 deletions

View File

@@ -119,9 +119,13 @@ class CI_DB_mysql_forge extends CI_DB_forge {
$sql .= ' DEFAULT \''.$attributes['DEFAULT'].'\'';
}
if (array_key_exists('NULL', $attributes))
if (array_key_exists('NULL', $attributes) && $attributes['NULL'] === TRUE)
{
$sql .= ($attributes['NULL'] === TRUE) ? ' NULL' : ' NOT NULL';
$sql .= ' NULL';
}
else
{
$sql .= ' NOT NULL';
}
if (array_key_exists('AUTO_INCREMENT', $attributes) && $attributes['AUTO_INCREMENT'] === TRUE)