yiisoft/yii-db-migration
Yii DB Migration
Requires
- php: 8.1 - 8.5
- symfony/console: ^6.0 || ^7.0 || ^8.0
- yiisoft/db: ^2.0
- yiisoft/injector: ^1.2
Requires (Dev)
- bamarni/composer-bin-plugin: ^1.8.3
- friendsofphp/php-cs-fixer: ^3.89.2
- phpunit/phpunit: ^10.5.45
- rector/rector: ^2.0.10
- yiisoft/db-sqlite: ^2.0
- yiisoft/di: ^1.3
- yiisoft/files: ^2.0
- yiisoft/psr-dummy-provider: ^1.0
- yiisoft/test-support: ^3.0.2
- yiisoft/yii-console: ^2.3
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-06-24 21:46:48 UTC
README
Yii DB Migration
π Latest Stable Version
π Total Downloads
π Build status
π codecov
π Mutation testing badge
π Static analysis
π type-coverage
Yii DB Migration allows you to manage database schema using migrations.
Supports the following databases out of the box:
| DBMS | Version |
|---|---|
| MSSQL | 2017, 2019, 2022 |
| MySQL | 5.7β8.0 |
| MariaDB | 10.4β10.9 |
| Oracle | 12cβ21c |
| PostgreSQL | 9.6β15 |
| SQLite | 3.3 and above |
Requirements
- PHP 8.1 - 8.5.
Installation
The package could be installed with Composer:
composer require yiisoft/db-migration
Command list
migrate:create Creates a new migration.
migrate:down Reverts the specified number of latest migrations.
migrate:history Displays the migration history.
migrate:new Displays not yet applied migrations.
migrate:redo Redoes the last few migrations.
migrate:up Applies new migrations.
The create command allows defining fields for the table being created.
Documentation
- Guide: English, PortuguΓͺs - Brasil
- Internals
If you need help or have a question, the Yii Forum is a good place for that. You may also check out other Yii Community Resources.
License
The Yii DB Migration is free software. It is released under the terms of the BSD License.
Please see LICENSE for more information.
Maintained by Yii Software.
Support the project
Follow updates
π Official website
π Twitter
π Telegram
π Facebook
π Slack
