contao:migrate

This feature is available in Contao 4.9 and later.

With this command you can perform database updates and migrations after a new installation or update of Contao or an extension. The migrations that get executed are update scripts of Contao, registered migrations of extensions, legacy runonce.php files and the database update.

php vendor/bin/contao-console contao:migrate [options]
OptionDescription
--with-deletesExecutes all database migrations including DROP queries.
--schema-onlyExecutes database schema migration only. Update scripts, registered migrations and runonce.php files get skipped.
--migrations-onlyOnly executes the migrations without updating the database tables and fields.
--dry-runShows pending migrations and schema updates without actually executing them.
--no-interactionWith this option enabled all confirmation questions are automatically answered with “yes”. This is useful if you want to execute the migrations in an automated system.
--no-backupsince 4.13 Disable the database backup which is created by default before executing the migrations.