Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit b586f7cda259060fa127f654bfb2034daf1bd8c2 1 parent 7c109f7
defacer authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/datalib.php
View
8 lib/datalib.php
@@ -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 .'\'';
Please sign in to comment.
Something went wrong with that request. Please try again.