(sequelize)
| 148 | }, |
| 149 | |
| 150 | async dropTestSchemas(sequelize) { |
| 151 | const queryInterface = sequelize.getQueryInterface(); |
| 152 | if (!queryInterface.queryGenerator._dialect.supports.schemas) { |
| 153 | return this.sequelize.drop({}); |
| 154 | } |
| 155 | |
| 156 | const schemas = await sequelize.showAllSchemas(); |
| 157 | const schemasPromise = []; |
| 158 | schemas.forEach(schema => { |
| 159 | const schemaName = schema.name ? schema.name : schema; |
| 160 | if (schemaName !== sequelize.config.database) { |
| 161 | schemasPromise.push(sequelize.dropSchema(schemaName)); |
| 162 | } |
| 163 | }); |
| 164 | |
| 165 | await Promise.all(schemasPromise.map(p => p.catch(e => e))); |
| 166 | }, |
| 167 | |
| 168 | getSupportedDialects() { |
| 169 | return fs.readdirSync(path.join(distDir, class="st">'lib/dialects')) |
nothing calls this directly
no test coverage detected