MCPcopy
hub / github.com/sequelize/sequelize / clearDatabase

Function clearDatabase

test/support.js:146–156  ·  view source on GitHub ↗
(sequelize)

Source from the content-addressed store, hash-verified

144 },
145
146 async clearDatabase(sequelize) {
147 const qi = sequelize.getQueryInterface();
148 await qi.dropAllTables();
149 sequelize.modelManager.models = [];
150 sequelize.models = {};
151
152 if (qi.dropAllEnums) {
153 await qi.dropAllEnums();
154 }
155 await this.dropTestSchemas(sequelize);
156 },
157
158 async dropTestSchemas(sequelize) {
159 const queryInterface = sequelize.getQueryInterface();

Callers

nothing calls this directly

Calls 3

getQueryInterfaceMethod · 0.80
dropAllEnumsMethod · 0.80
dropAllTablesMethod · 0.45

Tested by

no test coverage detected