table.create
Creates a table in the model, stored in a datasource, usually the Internal Datastore. It starts with no fields; add them with table.fieldAdd.
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.create(datasourceName, tableName)Parameters
| Parameter | Type | Description |
|---|---|---|
datasourceName | string | The datasource to store the table in, such as Internal Datastore. |
tableName | string | The table's name. |
Returns
booleantrue if the table was created. false if a table with that name already exists or the datasource can't be found.
Examples
js
const created = table.create("Internal Datastore", "users");