commit
7bbe9254eb
3546
package-lock.json
generated
3546
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -31,7 +31,7 @@
|
||||
"handlebars": "^4.7.6",
|
||||
"inquirer": "^7.3.3",
|
||||
"mssql": "^6.3.0",
|
||||
"mysql": "^2.18.1",
|
||||
"mysql2": "^2.2.5",
|
||||
"pg": "^8.5.1",
|
||||
"pluralize": "^8.0.0",
|
||||
"prettier": "^2.2.1",
|
||||
|
@ -1,4 +1,4 @@
|
||||
import type * as MYSQL from "mysql";
|
||||
import type * as MYSQL from "mysql2";
|
||||
import { ConnectionOptions } from "typeorm";
|
||||
import * as TypeormDriver from "typeorm/driver/mysql/MysqlDriver";
|
||||
import { DataTypeDefaults } from "typeorm/driver/types/DataTypeDefaults";
|
||||
@ -32,7 +32,7 @@ export default class MysqlDriver extends AbstractDriver {
|
||||
super();
|
||||
try {
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies, global-require, import/no-unresolved
|
||||
this.MYSQL = require("mysql");
|
||||
this.MYSQL = require("mysql2");
|
||||
} catch (error) {
|
||||
TomgUtils.LogError("", false, error);
|
||||
throw error;
|
||||
@ -466,7 +466,7 @@ export default class MysqlDriver extends AbstractDriver {
|
||||
|
||||
public async ConnectToServer(connectionOptons: IConnectionOptions) {
|
||||
const databaseName = connectionOptons.databaseNames[0];
|
||||
let config: MYSQL.ConnectionConfig;
|
||||
let config: MYSQL.ConnectionOptions;
|
||||
if (connectionOptons.ssl) {
|
||||
config = {
|
||||
database: databaseName,
|
||||
@ -476,7 +476,7 @@ export default class MysqlDriver extends AbstractDriver {
|
||||
ssl: {
|
||||
rejectUnauthorized: false,
|
||||
},
|
||||
timeout: 60 * 60 * 1000,
|
||||
connectTimeout: 60 * 60 * 1000,
|
||||
user: connectionOptons.user,
|
||||
};
|
||||
} else {
|
||||
@ -485,7 +485,7 @@ export default class MysqlDriver extends AbstractDriver {
|
||||
host: connectionOptons.host,
|
||||
password: connectionOptons.password,
|
||||
port: connectionOptons.port,
|
||||
timeout: 60 * 60 * 1000,
|
||||
connectTimeout: 60 * 60 * 1000,
|
||||
user: connectionOptons.user,
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user