Skip to content

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 ​

ParameterTypeDescription
tableNamestringThe table's name or id.

Returns ​

boolean

true if the table was deleted, otherwise false.

Examples ​

js
const deleted = table.delete("users");