columnType static method
Implementation
static String columnType(MigrationColumn column) {
var str = column.type.name;
// Map timestamp time to datetime
if (column.type == ColumnType.timeStamp) {
str = ColumnType.dateTime.name;
}
switch (str) {
case 'clob':
str = 'text';
break;
}
if (column.type.hasLength) {
return '$str(${column.length})';
} else {
return str;
}
}