File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed
src/Adapters/Storage/Postgres Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ export class PostgresStorageAdapter {
2222 . catch ( error => {
2323 if ( error . code === PostgresDuplicateRelationError ) {
2424 // Table already exists, must have been created by a different request. Ignore error.
25- return ;
2625 } else {
2726 throw error ;
2827 }
@@ -77,7 +76,7 @@ export class PostgresStorageAdapter {
7776 return this . _client . query ( 'SELECT "className" FROM "_SCHEMA"' )
7877 . then ( results => {
7978 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 } ) ) ) ) ;
8180 } , error => {
8281 if ( error . code === PostgresRelationDoesNotExistError ) {
8382 // No _SCHEMA collection. Don't delete anything.
You can’t perform that action at this time.
0 commit comments