mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-22 13:15:31 +00:00
feat(mysql): add unsigned integer types to column type options
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user