All this time, table_column() didn't handle CHAR fields correctly! :o

This commit is contained in:
defacer
2005-07-20 17:42:55 +00:00
parent 7c109f7b2c
commit b586f7cda2
+8
View File
@@ -231,6 +231,10 @@ function table_column($table, $oldfield, $field, $type='integer', $size='10',
case 'integer':
$type = 'INTEGER('. $size .')';
break;
case 'char':
$type = 'CHAR('. $size .')';
$signed = '';
break;
case 'varchar':
$type = 'VARCHAR('. $size .')';
$signed = '';
@@ -345,6 +349,10 @@ function table_column($table, $oldfield, $field, $type='integer', $size='10',
case 'varchar':
$type = 'VARCHAR';
break;
case 'char':
$type = 'CHAR('. $size .')';
$signed = '';
break;
}
$default = 'DEFAULT \''. $default .'\'';