Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: update default data type list (#9749)

Danny Xu5035a4748ede
diff --git a/frontend/src/utils/schemaEditor/index.ts b/frontend/src/utils/schemaEditor/index.ts
index aa496eb64b..14447d0632 100644
--- a/frontend/src/utils/schemaEditor/index.ts
+++ b/frontend/src/utils/schemaEditor/index.ts
@@ -20,27 +20,94 @@ export const allowUsingSchemaEditorV1 = (
export const getDataTypeSuggestionList = (engine: Engine = Engine.MYSQL) => {
if (engine === Engine.MYSQL || engine === Engine.TIDB) {
return [
- "BIT",
- "BOOLEAN",
- "CHAR(1)",
- "DATE",
- "DATETIME",
- "DOUBLE",
- "INT",
- "JSON",
- "VARCHAR(255)",
+ "bigint",
+ "binary",
+ "bit",
+ "blob",
+ "boolean",
+ // char is equivalent to char(1).
+ "char",
+ "char(255)",
+ "date",
+ "datetime",
+ "decimal",
+ "double",
+ "enum",
+ "float",
+ "geometry",
+ "geometrycollection",
+ "int",
+ "json",
+ "linestring",
+ "longblob",
+ "longtext",
+ "mediumblob",
+ "mediumint",
+ "mediumtext",
+ "multilinestring",
+ "multipoint",
+ "multipolygon",
+ "point",
+ "polygon",
+ "smallint",
+ "text",
+ "time",
+ "timestamp",
+ "tinublob",
+ "tinyint",
+ "tinytext",
+ // Unlike Postgres, MySQL does not support varchar with no length specified.
+ "varchar(255)",
+ "year",
];
} else if (engine === Engine.POSTGRES) {
return [
- "BOOLEAN",
- "CHAR(1)",
- "DATE",
- "INTEGER",
- "JSON",
- "REAL",
- "SERIAL",
- "TEXT",
- "VARCHAR(255)",
+ "bigserial",
+ "bit",
+ "bool",
+ "box",
+ "bytea",
+ "char",
+ "char(255)",
+ "cidr",
+ "circle",
+ "date",
+ "decimal",
+ "float4",
+ "float8",
+ "inet",
+ "int2",
+ "int4",
+ "int8",
+ "interval",
+ "json",
+ "jsonb",
+ "line",
+ "lseg",
+ "macaddr",
+ "money",
+ "numeric",
+ "path",
+ "point",
+ "polygon",
+ "serial",
+ "serial2",
+ "serial4",
+ "serial8",
+ "smallserial",
+ "text",
+ "time",
+ "timestamp",
+ "timestamptz",
+ "timetz",
+ "tsquery",
+ "tsvector",
+ "txid_snaps",
+ "uuid",
+ "varbit",
+ "varchar",
+ "varchar(255)",
+ "xml",
];
}