Drop a model in the database.
()
| 128 | |
| 129 | /** Drop a model in the database. */ |
| 130 | static async drop() { |
| 131 | const dropQuery = this._options.queryBuilder |
| 132 | .queryForSchema(this) |
| 133 | .table(this.table) |
| 134 | .dropIfExists() |
| 135 | .toDescription(); |
| 136 | |
| 137 | await this._options.database.query(dropQuery); |
| 138 | |
| 139 | this._isCreatedInDatabase = false; |
| 140 | } |
| 141 | |
| 142 | /** Truncate a model in the database. */ |
| 143 | static async truncate() { |
no test coverage detected