Drop
Dropping tables straightforward in qb
.
For dropping columns or constraints, see Alter.
drop
Drop a table from the database.
Argument | Type | Required | Default | Description |
table | string |
| The name of the table to drop. | |
options | struct |
|
| Options to pass to |
execute | boolean |
|
| Run the query immediately after building it. |
Example:
SchemaBuilder
SQL (MySQL)
dropIfExists
Drop a table from the database if it exists.
Argument | Type | Required | Default | Description |
table | string |
| The name of the table to drop. | |
options | struct |
|
| Options to pass to |
execute | boolean |
|
| Run the query immediately after building it. |
Example:
SchemaBuilder
SQL (MySQL)