gg-mysql-connector 1.0.104 → 1.0.107

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.
@@ -76,7 +76,7 @@ class ModelGenerator {
76
76
  const endTime = new Date();
77
77
  const executionTime = endTime.getTime() - startTime.getTime();
78
78
  if (this.isForcePrintSQLStatement === true) {
79
- console.log("sql query > ", chalk_1.default.green(statment), parameter);
79
+ console.log(`(${this.dbInfo.database}) sql query > `, chalk_1.default.green(statment), parameter);
80
80
  }
81
81
  if (isPrint === true)
82
82
  this.printResultLength(result, executionTime, queryResult);
@@ -28,7 +28,12 @@ class MyDBMigrator {
28
28
  await this.alterUniqueKey(row.tableName, col.COLUMN_NAME, col.IS_UNIQUE, indexList);
29
29
  await this.alterIndex(row.tableName, col.COLUMN_NAME, col.IS_INDEX, indexList);
30
30
  //!! delete this next version. need to execute only 1 time on production
31
- await this.deleteOldIndexVersion(row.tableName, col.COLUMN_NAME, indexList);
31
+ try {
32
+ await this.deleteOldIndexVersion(row.tableName, col.COLUMN_NAME, indexList);
33
+ }
34
+ catch (error) {
35
+ console.log(error);
36
+ }
32
37
  await this.alterPossibleEnum(row.tableName, col.COLUMN_NAME, col.POSSIBLE_VALUE, col.IS_NOT_NULL);
33
38
  await this.alterForeignKey(row.tableName, col);
34
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gg-mysql-connector",
3
- "version": "1.0.104",
3
+ "version": "1.0.107",
4
4
  "description": "",
5
5
  "main": "dist/src/index.js",
6
6
  "scripts": {
@@ -84,7 +84,11 @@ export default class ModelGenerator {
84
84
  const executionTime = endTime.getTime() - startTime.getTime()
85
85
 
86
86
  if (this.isForcePrintSQLStatement === true) {
87
- console.log("sql query > ", chalk.green(statment), parameter)
87
+ console.log(
88
+ `(${this.dbInfo.database}) sql query > `,
89
+ chalk.green(statment),
90
+ parameter
91
+ )
88
92
  }
89
93
  if (isPrint === true)
90
94
  this.printResultLength(result, executionTime, queryResult)
@@ -56,11 +56,15 @@ export default class MyDBMigrator {
56
56
  indexList
57
57
  )
58
58
  //!! delete this next version. need to execute only 1 time on production
59
- await this.deleteOldIndexVersion(
60
- row.tableName,
61
- col.COLUMN_NAME,
62
- indexList
63
- )
59
+ try {
60
+ await this.deleteOldIndexVersion(
61
+ row.tableName,
62
+ col.COLUMN_NAME,
63
+ indexList
64
+ )
65
+ } catch (error) {
66
+ console.log(error)
67
+ }
64
68
 
65
69
  await this.alterPossibleEnum(
66
70
  row.tableName,