Skip to content

Commit b0cf572

Browse files
vitaly-tflovilmart
authored andcommitted
fixing method setIndexesWithSchemaFormat (#4454)
Fixing invalid database code in method `setIndexesWithSchemaFormat`: * It must be a transaction, not a task, as it executes multiple database changes * It should contain the initial queries inside the transaction, providing the context, not outside it; * Replaced the code with the ES6 Generator notation * Removing the use of batch, as the value of the result promise is irrelevant, only success/failure that matters
1 parent c357bd3 commit b0cf572

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Adapters/Storage/Postgres/PostgresStorageAdapter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ export class PostgresStorageAdapter implements StorageAdapter {
621621
});
622622
}
623623

624-
setIndexesWithSchemaFormat(className: string, submittedIndexes: any, existingIndexes: any = {}, fields: any, conn: any): Promise<void> {
624+
setIndexesWithSchemaFormat(className: string, submittedIndexes: any, existingIndexes: any = {}, fields: any, conn: ?any): Promise<void> {
625625
conn = conn || this._client;
626626
const self = this;
627627
if (submittedIndexes === undefined) {

0 commit comments

Comments
 (0)