@mikro-orm/sql 7.0.13-dev.3 → 7.0.13-dev.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.
@@ -46,6 +46,7 @@ export declare class BasePostgreSqlPlatform extends AbstractSqlPlatform {
46
46
  precision?: number;
47
47
  scale?: number;
48
48
  autoincrement?: boolean;
49
+ columnTypes?: string[];
49
50
  }): string;
50
51
  getMappedType(type: string): Type<unknown>;
51
52
  getRegExpOperator(val?: unknown, flags?: string): string;
@@ -114,6 +114,12 @@ export class BasePostgreSqlPlatform extends AbstractSqlPlatform {
114
114
  if (['interval'].includes(simpleType)) {
115
115
  return this.getIntervalTypeDeclarationSQL(options);
116
116
  }
117
+ // TimeType.getColumnType drops the timezone qualifier, so detect tz aliases from the original column type.
118
+ const originalType = options.columnTypes?.[0]?.toLowerCase() ?? type;
119
+ if (/^timetz\b/.test(originalType) || /^time\s+with\s+time\s+zone\b/.test(originalType)) {
120
+ const length = options.length ?? this.getDefaultDateTimeLength();
121
+ return `timetz(${length})`;
122
+ }
117
123
  return super.normalizeColumnType(type, options);
118
124
  }
119
125
  getMappedType(type) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/sql",
3
- "version": "7.0.13-dev.3",
3
+ "version": "7.0.13-dev.5",
4
4
  "description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
5
5
  "keywords": [
6
6
  "data-mapper",
@@ -53,7 +53,7 @@
53
53
  "@mikro-orm/core": "^7.0.12"
54
54
  },
55
55
  "peerDependencies": {
56
- "@mikro-orm/core": "7.0.13-dev.3"
56
+ "@mikro-orm/core": "7.0.13-dev.5"
57
57
  },
58
58
  "engines": {
59
59
  "node": ">= 22.17.0"