BaseModel.sync() method
Creates this model's table, or does nothing when the model is a view.
Signature:
static sync(options?: SyncOptions): Promise<any>;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
options |
(Optional) Sequelize's own sync options. |
Returns:
Promise<any>
Resolves when the table exists, or immediately for a view.
Remarks
A view is skipped deliberately: it normally selects from tables that do not exist yet, so views are left to the second pass Sequelize.sync() runs once every table is there.