summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/sqlite/sqlite_forge.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-01-26 13:45:45 +0100
committerAndrey Andreev <narf@bofh.bg>2012-01-26 13:45:45 +0100
commitb537c4d32d109cef2ddf541aa976c3e96736bf06 (patch)
treeadd357409f88b529e37f53317431e0fce7f08ad7 /system/database/drivers/sqlite/sqlite_forge.php
parent20ebf1459b6dc1449a545156b70e7cb2932fa9eb (diff)
Fix _limit()
Diffstat (limited to 'system/database/drivers/sqlite/sqlite_forge.php')
-rw-r--r--system/database/drivers/sqlite/sqlite_forge.php8
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