diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-01-26 13:45:45 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-01-26 13:45:45 +0100 |
commit | b537c4d32d109cef2ddf541aa976c3e96736bf06 (patch) | |
tree | add357409f88b529e37f53317431e0fce7f08ad7 /system/database/drivers/sqlite/sqlite_forge.php | |
parent | 20ebf1459b6dc1449a545156b70e7cb2932fa9eb (diff) |
Fix _limit()
Diffstat (limited to 'system/database/drivers/sqlite/sqlite_forge.php')
-rw-r--r-- | system/database/drivers/sqlite/sqlite_forge.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/system/database/drivers/sqlite/sqlite_forge.php b/system/database/drivers/sqlite/sqlite_forge.php index 5339f6e3e..99766878b 100644 --- a/system/database/drivers/sqlite/sqlite_forge.php +++ b/system/database/drivers/sqlite/sqlite_forge.php @@ -104,11 +104,11 @@ class CI_DB_sqlite_forge extends CI_DB_forge { $sql .= "\n\t".$this->db->protect_identifiers($field) .' '.$attributes['TYPE'] - .(isset($attributes['CONSTRAINT']) ? '('.$attributes['CONSTRAINT'].')' : '') - .((isset($attributes['UNSIGNED']) && $attributes['UNSIGNED'] === TRUE) ? ' UNSIGNED' : '') + .( ! empty($attributes['CONSTRAINT']) ? '('.$attributes['CONSTRAINT'].')' : '') + .(( ! empty($attributes['UNSIGNED']) && $attributes['UNSIGNED'] === TRUE) ? ' UNSIGNED' : '') .(isset($attributes['DEFAULT']) ? ' DEFAULT \''.$attributes['DEFAULT'].'\'' : '') - .((isset($attributes['NULL']) && $attributes['NULL'] === TRUE) ? ' NULL' : ' NOT NULL') - .((isset($attributes['AUTO_INCREMENT']) && $attributes['AUTO_INCREMENT'] === TRUE) ? ' AUTO_INCREMENT' : ''); + .(( ! empty($attributes['NULL']) && $attributes['NULL'] === TRUE) ? ' NULL' : ' NOT NULL') + .(( ! empty($attributes['AUTO_INCREMENT']) && $attributes['AUTO_INCREMENT'] === TRUE) ? ' AUTO_INCREMENT' : ''); } // don't add a comma on the end of the last field |