@vibeorm/migrate 1.1.4 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibeorm/migrate",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "Migration, introspection, and schema diff toolkit for VibeORM",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -37,9 +37,9 @@ function resolveColumnType(params: { field: ScalarField }): string {
37
37
  return field.prismaType === "BigInt" ? "BIGSERIAL" : "SERIAL";
38
38
  }
39
39
 
40
- // Native type override (e.g., @db.VarChar(255))
40
+ // Native type override (e.g., @db.VarChar(255)) — lowercased to canonical PG form
41
41
  if (field.nativeType) {
42
- return field.nativeType;
42
+ return field.nativeType.toLowerCase();
43
43
  }
44
44
 
45
45
  // List fields use PostgreSQL arrays
@@ -53,7 +53,7 @@ function resolveColumnType(params: { field: ScalarField }): string {
53
53
  /** Resolve to the base column type (no SERIAL — used for FK reference columns) */
54
54
  function resolveBaseColumnType(params: { field: ScalarField }): string {
55
55
  const { field } = params;
56
- if (field.nativeType) return field.nativeType;
56
+ if (field.nativeType) return field.nativeType.toLowerCase();
57
57
  if (field.isList) return `${PRISMA_TO_PG[field.prismaType]}[]`;
58
58
  return PRISMA_TO_PG[field.prismaType];
59
59
  }
@@ -77,7 +77,7 @@ function resolveColumnType(params: { field: ScalarField | EnumField; enums: Enum
77
77
  if (field.default?.kind === "autoincrement") {
78
78
  return field.prismaType === "BigInt" ? "BIGSERIAL" : "SERIAL";
79
79
  }
80
- if (field.nativeType) return field.nativeType;
80
+ if (field.nativeType) return field.nativeType.toLowerCase();
81
81
  if (field.isList) return `${PRISMA_TO_PG[field.prismaType]}[]`;
82
82
  return PRISMA_TO_PG[field.prismaType];
83
83
  }
@@ -89,7 +89,7 @@ function resolveBaseColumnType(params: { field: ScalarField | EnumField; enums:
89
89
  const enumDef = enums.find((e) => e.name === field.enumName);
90
90
  return q({ name: enumDef?.dbName ?? field.enumName });
91
91
  }
92
- if (field.nativeType) return field.nativeType;
92
+ if (field.nativeType) return field.nativeType.toLowerCase();
93
93
  if (field.isList) return `${PRISMA_TO_PG[field.prismaType]}[]`;
94
94
  return PRISMA_TO_PG[field.prismaType];
95
95
  }