@oliasoft-open-source/node-json-migrator 2.3.1-beta-1 → 2.3.1-beta-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.
@@ -42,8 +42,10 @@ const getExecutedMigrationsFromVersion = async (database, pgpHelpers, entity, di
42
42
  historicalPlans
43
43
  } = await (0, _git.getHistoricalPlansFromGit)(planFilePath);
44
44
  //cache the response in the entity versions table
45
- await (0, _database.insertVersions)(database, pgpHelpers, entity, historicalPlans);
46
- planFromVersion = historicalPlans.find(p => p.version === currentVersion)?.plan || null;
45
+ if (historicalPlans.length) {
46
+ await (0, _database.insertVersions)(database, pgpHelpers, entity, historicalPlans);
47
+ planFromVersion = historicalPlans.find(p => p.version === currentVersion)?.plan || null;
48
+ }
47
49
  }
48
50
  if (planFromVersion !== null) {
49
51
  let migrationsFromHistory = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/node-json-migrator",
3
- "version": "2.3.1-beta-1",
3
+ "version": "2.3.1-beta-2",
4
4
  "description": "A library for JSON migrations",
5
5
  "scripts": {
6
6
  "build": "npx babel src --ignore 'src/**/*.test.js' --out-dir dist --copy-files --no-copy-ignored",
package/release-notes.md CHANGED
@@ -3,6 +3,7 @@
3
3
  ## 2.3.1
4
4
 
5
5
  - fix support for git history search on Windows ([OW-8747](https://oliasoft.atlassian.net/browse/OW-8747))
6
+ - fix SQL error `Cannot generate an INSERT from an empty array` ([OW-10581](https://oliasoft.atlassian.net/browse/OW-10581))
6
7
 
7
8
  ## 2.3.0
8
9