dbgate-tools 6.1.0 → 6.1.2

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/lib/diffTools.js CHANGED
@@ -519,7 +519,7 @@ function sortViewsByDependency(views) {
519
519
  }
520
520
  function createAlterDatabasePlan(oldDb, newDb, opts, wholeOldDb, wholeNewDb, driver) {
521
521
  const plan = new alterPlan_1.AlterPlan(wholeOldDb, wholeNewDb, driver.dialect, opts);
522
- for (const objectTypeField of ['tables', 'views', 'procedures', 'matviews', 'functions']) {
522
+ for (const objectTypeField of ['tables', 'views', 'procedures', 'matviews', 'functions', 'triggers']) {
523
523
  for (const oldobj of oldDb[objectTypeField] || []) {
524
524
  const newobj = (newDb[objectTypeField] || []).find(x => x.pairingId == oldobj.pairingId);
525
525
  if (objectTypeField == 'tables') {
@@ -175,6 +175,7 @@ function databaseInfoFromYamlModel(filesOrDbInfo) {
175
175
  }
176
176
  if (file.name.endsWith('.trigger.sql')) {
177
177
  model.triggers.push({
178
+ objectId: `triggers:${file.name.slice(0, -'.trigger.sql'.length)}`,
178
179
  pureName: file.name.slice(0, -'.trigger.sql'.length),
179
180
  createSql: file.text,
180
181
  });
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "6.1.0",
2
+ "version": "6.1.2",
3
3
  "name": "dbgate-tools",
4
4
  "main": "lib/index.js",
5
5
  "typings": "lib/index.d.ts",
@@ -25,14 +25,14 @@
25
25
  ],
26
26
  "devDependencies": {
27
27
  "@types/node": "^13.7.0",
28
- "dbgate-types": "^6.1.0",
28
+ "dbgate-types": "^6.1.2",
29
29
  "jest": "^24.9.0",
30
30
  "ts-jest": "^25.2.1",
31
31
  "typescript": "^4.4.3"
32
32
  },
33
33
  "dependencies": {
34
34
  "dbgate-query-splitter": "^4.11.2",
35
- "dbgate-sqltree": "^6.1.0",
35
+ "dbgate-sqltree": "^6.1.2",
36
36
  "debug": "^4.3.4",
37
37
  "json-stable-stringify": "^1.0.1",
38
38
  "lodash": "^4.17.21",