table.delete
Deletes a table from the model, along with all its rows. To keep the table and remove its rows, use table.truncate.
TIP
For more control, such as other column types, indexes or keys, manage tables with SQL instead. Run CREATE, ALTER and DROP TABLE statements with DatasourceClient's execute.
js
table.delete(tableName)Parameters
| Parameter | Type | Description |
|---|---|---|
tableName | string | The table's name or id. |
Returns
booleantrue if the table was deleted, otherwise false.
Examples
js
const deleted = table.delete("users");