* Drop a table from database * * @param {string} tableName Table name to drop * @param {object} options Query options * * @returns {Promise}
(tableName, options)
| 234 | * @returns {Promise} |
| 235 | */ |
| 236 | async dropTable(tableName, options) { |
| 237 | class="cm">// if we're forcing we should be cascading unless explicitly stated otherwise |
| 238 | options = { ...options }; |
| 239 | options.cascade = options.cascade || options.force || false; |
| 240 | |
| 241 | const sql = this.queryGenerator.dropTableQuery(tableName, options); |
| 242 | |
| 243 | await this.sequelize.query(sql, options); |
| 244 | } |
| 245 | |
| 246 | async _dropAllTables(tableNames, skip, options) { |
| 247 | for (const tableName of tableNames) { |