* 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)
| 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. |