MCPcopy
hub / github.com/sequelize/sequelize / dropTestSchemas

Function dropTestSchemas

test/support.js:150–166  ·  test/support.js::dropTestSchemas
(sequelize)

Source from the content-addressed store, hash-verified

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'))

Callers

nothing calls this directly

Calls 5

getQueryInterfaceMethod · 0.80
allMethod · 0.80
dropMethod · 0.45
showAllSchemasMethod · 0.45
dropSchemaMethod · 0.45

Tested by

no test coverage detected