Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface SyncOptions

Sync Options

Hierarchy

Index

Properties

alter?: boolean | SyncAlterOptions

If alter is true, each DAO will do ALTER TABLE ... CHANGE ... Alters tables to fit models. Provide an object for additional configuration. Not recommended for production use. If not further configured deletes data in columns that were removed or had their type changed in the model.

benchmark?: boolean

Pass query execution time in milliseconds as second argument to logging function (options.logging).

force?: boolean

If force is true, each DAO will do DROP TABLE IF EXISTS ..., before it tries to create its own table

hooks?: boolean

If false the applicable hooks will not be called. The default value depends on the context.

default

true

logging?: boolean | ((sql: string, timing?: number) => void)

A function that gets executed while running the query to log the sql.

match?: RegExp

Match a regex against the database name before syncing, a safety check for cases where force: true is used in tests but not live code

schema?: string

The schema that the tables should be created in. This can be overridden for each table in sequelize.define

searchPath?: string

An optional parameter to specify the schema search_path (Postgres only)

Generated using TypeDoc