Skip to content

Commit

Permalink
Merge pull request #217 from techtastet/master
Browse files Browse the repository at this point in the history
Correction for MySQL drop
  • Loading branch information
eveningkid committed Apr 3, 2021
2 parents 7bf060c + 9b71e39 commit 3dd3171
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ export class Database {
*/
async sync(options: SyncOptions = {}) {
if (options.drop) {
for (const model of this._models) {
await model.drop();
for (let i = this._models.length - 1; i >= 0; i--){
await this._models[i].drop();
}
}

Expand Down

0 comments on commit 3dd3171

Please sign in to comment.