@travetto/model-postgres 6.0.0 → 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 +9 -9
- package/src/connection.ts +1 -1
- package/src/dialect.ts +1 -1
- package/support/service.postgresql.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/model-postgres",
|
|
3
|
-
"version": "6.0.
|
|
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.
|
|
31
|
-
"@travetto/config": "^6.0.
|
|
32
|
-
"@travetto/context": "^6.0.
|
|
33
|
-
"@travetto/model": "^6.0.
|
|
34
|
-
"@travetto/model-query": "^6.0.
|
|
35
|
-
"@travetto/model-sql": "^6.0.
|
|
36
|
-
"@types/pg": "^8.
|
|
37
|
-
"pg": "^8.
|
|
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()
|
|
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
|
|
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});`;
|