postgres: make sure to store id as varchar if uuid

This commit is contained in:
dswbx
2025-06-07 09:59:50 +02:00
parent 5b318ce485
commit e66e05b2b0
3 changed files with 51 additions and 3 deletions

View File

@@ -32,7 +32,13 @@ export abstract class PostgresConnection<DB = any> extends Connection<DB> {
override getFieldSchema(spec: FieldSpec): SchemaResponse {
this.validateFieldSpecType(spec.type);
let type: ColumnDataType = spec.primary ? "serial" : spec.type;
let type: ColumnDataType = spec.type;
if (spec.primary) {
if (spec.type === "integer") {
type = "serial";
}
}
switch (spec.type) {
case "blob":