OptionalforceIf true, drop all tables first before recreating them. WARNING: This will destroy all data in the tables!
OptionalalterIf true, alter tables to match model definitions. This will add new columns, remove extra columns, and change column types as needed. Preserves existing data in the table.
OptionalmatchRegular expression to match the database name. Sync will only proceed if the database name matches this pattern. Useful for development vs production environments. Example: /test/ - only syncs if database name contains "test"
OptionalloggingCustom logging function
OptionalhooksIf true, run sync hooks (beforeSync, afterSync, etc.)
OptionalindexesIf true, also sync indexes
OptionalconstraintsIf true, also sync foreign key constraints
Options for
sync().forcedrops and recreates;altertries to migrate an existing table in place.