@sprucelabs/postgres-data-store 2.0.5 → 2.0.7
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.
|
@@ -93,7 +93,12 @@ class PostgresDatabase {
|
|
|
93
93
|
async dropAllNonPrimaryKeyIndexes(name) {
|
|
94
94
|
const indexNames = await this.getIndexNames(name);
|
|
95
95
|
for (const indexName of indexNames) {
|
|
96
|
-
|
|
96
|
+
try {
|
|
97
|
+
await this.client.query(`DROP INDEX ${indexName}`);
|
|
98
|
+
}
|
|
99
|
+
catch (err) {
|
|
100
|
+
console.info('Failed to drop index', indexName, err.stack);
|
|
101
|
+
}
|
|
97
102
|
}
|
|
98
103
|
}
|
|
99
104
|
async getIndexNames(name) {
|
|
@@ -118,7 +118,12 @@ export default class PostgresDatabase {
|
|
|
118
118
|
return __awaiter(this, void 0, void 0, function* () {
|
|
119
119
|
const indexNames = yield this.getIndexNames(name);
|
|
120
120
|
for (const indexName of indexNames) {
|
|
121
|
-
|
|
121
|
+
try {
|
|
122
|
+
yield this.client.query(`DROP INDEX ${indexName}`);
|
|
123
|
+
}
|
|
124
|
+
catch (err) {
|
|
125
|
+
console.info('Failed to drop index', indexName, err.stack);
|
|
126
|
+
}
|
|
122
127
|
}
|
|
123
128
|
});
|
|
124
129
|
}
|
package/package.json
CHANGED