@travetto/model-mysql 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/model-mysql",
3
- "version": "6.0.0",
3
+ "version": "6.0.1",
4
4
  "description": "MySQL backing for the travetto model module, with real-time modeling support for SQL schemas.",
5
5
  "keywords": [
6
6
  "sql",
@@ -27,13 +27,13 @@
27
27
  "directory": "module/model-mysql"
28
28
  },
29
29
  "dependencies": {
30
- "@travetto/cli": "^6.0.0",
31
- "@travetto/config": "^6.0.0",
32
- "@travetto/context": "^6.0.0",
33
- "@travetto/model": "^6.0.0",
34
- "@travetto/model-query": "^6.0.0",
35
- "@travetto/model-sql": "^6.0.0",
36
- "mysql2": "^3.14.0"
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
+ "mysql2": "^3.15.1"
37
37
  },
38
38
  "travetto": {
39
39
  "displayName": "MySQL Model Service"
package/src/connection.ts CHANGED
@@ -41,7 +41,7 @@ export class MySQLConnection extends Connection<PoolConnection> {
41
41
  }).promise();
42
42
 
43
43
  // Close mysql
44
- ShutdownManager.onGracefulShutdown(() => this.#pool.end(), this);
44
+ ShutdownManager.onGracefulShutdown(() => this.#pool.end());
45
45
  }
46
46
 
47
47
  /**
package/src/dialect.ts CHANGED
@@ -79,7 +79,7 @@ export class MySQLDialect extends SQLDialect {
79
79
  * Define column modification
80
80
  */
81
81
  getModifyColumnSQL(stack: VisitStack[]): string {
82
- const field: FieldConfig = castTo(stack[stack.length - 1]);
82
+ const field: FieldConfig = castTo(stack.at(-1));
83
83
  return `ALTER TABLE ${this.parentTable(stack)} MODIFY COLUMN ${this.getColumnDefinition(field)};`;
84
84
  }
85
85
 
@@ -1,6 +1,6 @@
1
1
  import type { ServiceDescriptor } from '@travetto/cli';
2
2
 
3
- const version = process.env.MYSQL_VERSION || '9.1';
3
+ const version = process.env.MYSQL_VERSION || '9.4';
4
4
 
5
5
  export const service: ServiceDescriptor = {
6
6
  name: 'mysql',