# BaseModel.syncView() method · @imqueue/pg-sequelize

Source: https://imqueue.org/api/pg-sequelize/latest/pg-sequelize.basemodel.syncview/
Published: 2026-08-01
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/pg-sequelize 4.2.0 — generated reference, not hand-written

Creates this view, replacing whatever definition is in the database.

**Signature:**

```typescript
static syncView(options?: SyncOptions): Promise<any>;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| options | [SyncOptions](https://imqueue.org/api/pg-sequelize/latest/pg-sequelize.syncoptions/) | _(Optional)_ `withoutDrop` skips the drop. |


**Returns:**

Promise<any>

The result of the create statement.

## Remarks

Drops the view first unless `withoutDrop` is set. That drop is why a view another view selects from cannot be replaced this way, and why `withoutDrop` exists.

Only meaningful on a model declared with `View` or `DynamicView` — anything else has no definition to create.

