feat(mysql): add unsigned integer types to column type options

This commit is contained in:
t8y2
2026-06-11 18:34:51 +08:00
parent edeee4f7d9
commit 3f25a69d23
@@ -4,11 +4,17 @@ import type { ColumnExtra, EditableStructureColumn, EditableStructureIndex } fro
export const DATA_TYPE_OPTIONS: Record<string, string[]> = {
mysql: [
"tinyint",
"tinyint unsigned",
"smallint",
"smallint unsigned",
"mediumint",
"mediumint unsigned",
"int",
"int unsigned",
"integer",
"integer unsigned",
"bigint",
"bigint unsigned",
"float",
"double",
"double precision",
@@ -256,12 +262,18 @@ export function getDataTypeOptions(dbType: DatabaseType | undefined): string[] {
export const DEFAULT_TYPE_LENGTHS: Record<string, string> = {
tinyint: "4",
"tinyint unsigned": "4",
smallint: "6",
"smallint unsigned": "6",
mediumint: "9",
"mediumint unsigned": "9",
int: "11",
"int unsigned": "11",
integer: "11",
"integer unsigned": "11",
int4: "11",
bigint: "20",
"bigint unsigned": "20",
int8: "20",
float: "10,2",
real: "10,2",