@travetto/model-postgres 6.0.0-rc.3 → 6.0.1

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": "@travetto/model-postgres",
3
- "version": "6.0.0-rc.3",
3
+ "version": "6.0.1",
4
4
  "description": "PostgreSQL backing for the travetto model module, with real-time modeling support for SQL schemas.",
5
5
  "keywords": [
6
6
  "sql",
@@ -27,14 +27,14 @@
27
27
  "directory": "module/model-postgres"
28
28
  },
29
29
  "dependencies": {
30
- "@travetto/cli": "^6.0.0-rc.3",
31
- "@travetto/config": "^6.0.0-rc.2",
32
- "@travetto/context": "^6.0.0-rc.2",
33
- "@travetto/model": "^6.0.0-rc.2",
34
- "@travetto/model-query": "^6.0.0-rc.2",
35
- "@travetto/model-sql": "^6.0.0-rc.3",
36
- "@types/pg": "^8.11.14",
37
- "pg": "^8.15.5"
30
+ "@travetto/cli": "^6.0.1",
31
+ "@travetto/config": "^6.0.1",
32
+ "@travetto/context": "^6.0.1",
33
+ "@travetto/model": "^6.0.1",
34
+ "@travetto/model-query": "^6.0.1",
35
+ "@travetto/model-sql": "^6.0.1",
36
+ "@types/pg": "^8.15.5",
37
+ "pg": "^8.16.3"
38
38
  },
39
39
  "travetto": {
40
40
  "displayName": "PostgreSQL Model Service"
package/src/connection.ts CHANGED
@@ -45,7 +45,7 @@ export class PostgreSQLConnection extends Connection<PoolClient> {
45
45
  );
46
46
 
47
47
  // Close postgres
48
- ShutdownManager.onGracefulShutdown(() => this.#pool.end(), this);
48
+ ShutdownManager.onGracefulShutdown(() => this.#pool.end());
49
49
  }
50
50
 
51
51
  async execute<T = unknown>(conn: PoolClient, query: string, values?: unknown[]): Promise<{ count: number, records: T[] }> {
package/src/dialect.ts CHANGED
@@ -51,7 +51,7 @@ export class PostgreSQLDialect extends SQLDialect {
51
51
  * Define column modification
52
52
  */
53
53
  getModifyColumnSQL(stack: VisitStack[]): string {
54
- const field: FieldConfig = castTo(stack[stack.length - 1]);
54
+ const field: FieldConfig = castTo(stack.at(-1));
55
55
  const type = this.getColumnType(field);
56
56
  const ident = this.ident(field.name);
57
57
  return `ALTER TABLE ${this.parentTable(stack)} ALTER COLUMN ${ident} TYPE ${type} USING (${ident}::${type});`;
@@ -1,6 +1,6 @@
1
1
  import type { ServiceDescriptor } from '@travetto/cli';
2
2
 
3
- const version = process.env.POSTGRESQL_VERSION || '17.2';
3
+ const version = process.env.POSTGRESQL_VERSION || '17.6';
4
4
 
5
5
  export const service: ServiceDescriptor = {
6
6
  name: 'postgresql',