File tree 1 file changed +1
-2
lines changed
src/Adapters/Storage/Postgres
1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ export class PostgresStorageAdapter {
22
22
. catch ( error => {
23
23
if ( error . code === PostgresDuplicateRelationError ) {
24
24
// Table already exists, must have been created by a different request. Ignore error.
25
- return ;
26
25
} else {
27
26
throw error ;
28
27
}
@@ -77,7 +76,7 @@ export class PostgresStorageAdapter {
77
76
return this . _client . query ( 'SELECT "className" FROM "_SCHEMA"' )
78
77
. then ( results => {
79
78
const classes = [ '_SCHEMA' , ...results . map ( result => result . className ) ] ;
80
- return Promise . all ( classes . map ( className => this . _client . query ( 'DROP TABLE $<className:name>' , { className } ) ) ) ;
79
+ return this . _client . task ( t => t . batch ( classes . map ( className => t . none ( 'DROP TABLE $<className:name>' , { className } ) ) ) ) ;
81
80
} , error => {
82
81
if ( error . code === PostgresRelationDoesNotExistError ) {
83
82
// No _SCHEMA collection. Don't delete anything.
You can’t perform that action at this time.
0 commit comments