@sprucelabs/postgres-data-store 2.0.5 → 2.0.6

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.
@@ -84,10 +84,17 @@ class PostgresDatabase {
84
84
  return results.rowCount;
85
85
  }
86
86
  async dropDatabase() {
87
+ var _a;
87
88
  await this.truncateTables();
88
89
  const names = await this.getTables();
89
90
  for (const name of names) {
90
- await this.dropAllNonPrimaryKeyIndexes(name);
91
+ try {
92
+ await this.dropAllNonPrimaryKeyIndexes(name);
93
+ }
94
+ catch (err) {
95
+ console.error('Failed to drop indexe1');
96
+ console.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message);
97
+ }
91
98
  }
92
99
  }
93
100
  async dropAllNonPrimaryKeyIndexes(name) {
@@ -106,11 +106,18 @@ export default class PostgresDatabase {
106
106
  });
107
107
  }
108
108
  dropDatabase() {
109
+ var _a;
109
110
  return __awaiter(this, void 0, void 0, function* () {
110
111
  yield this.truncateTables();
111
112
  const names = yield this.getTables();
112
113
  for (const name of names) {
113
- yield this.dropAllNonPrimaryKeyIndexes(name);
114
+ try {
115
+ yield this.dropAllNonPrimaryKeyIndexes(name);
116
+ }
117
+ catch (err) {
118
+ console.error('Failed to drop indexe1');
119
+ console.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message);
120
+ }
114
121
  }
115
122
  });
116
123
  }
package/package.json CHANGED
@@ -23,7 +23,7 @@
23
23
  "sprucebot",
24
24
  "sprucelabs"
25
25
  ],
26
- "version": "2.0.5",
26
+ "version": "2.0.6",
27
27
  "scripts": {
28
28
  "build.ci": "yarn build.tsc && yarn build.resolve-paths && yarn lint",
29
29
  "build.dev": "yarn build.tsc --sourceMap ; yarn resolve-paths.lint",