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

Function clearDatabase

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

Source from the content-addressed store, hash-verified

136 },
137
138 async clearDatabase(sequelize) {
139 const qi = sequelize.getQueryInterface();
140 await qi.dropAllTables();
141 sequelize.modelManager.models = [];
142 sequelize.models = {};
143
144 if (qi.dropAllEnums) {
145 await qi.dropAllEnums();
146 }
147 await this.dropTestSchemas(sequelize);
148 },
149
150 async dropTestSchemas(sequelize) {
151 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