MCPcopy
hub / github.com/sequelize/sequelize / drop

Method drop

lib/sequelize.js:863–873  ·  view source on GitHub ↗

* Drop all tables defined through this sequelize instance. * This is done by calling Model.drop on each model. * * @see * {@link Model.drop} for options * * @param {object} [options] The options passed to each call to Model.drop * @param {boolean|Function} [options.logging] A fu

(options)

Source from the content-addressed store, hash-verified

861 * @returns {Promise}
862 */
863 async drop(options) {
864 const models = [];
865
866 this.modelManager.forEachModel(model => {
867 if (model) {
868 models.push(model);
869 }
870 }, { reverse: false });
871
872 for (const model of models) await model.drop(options);
873 }
874
875 /**
876 * Test the connection by trying to authenticate. It runs `SELECT 1+1 AS result` query.

Callers 1

syncMethod · 0.95

Calls 1

forEachModelMethod · 0.80

Tested by

no test coverage detected