yiisoft / db-migration
Yii DB Migration
                                    Fund package maintenance!
                                                                            
                                                                                                                                        Opencollective
                                                                                    
                                                                            
                                                                                                                                        yiisoft
                                                                                    
                                                                
Installs: 16 804
Dependents: 3
Suggesters: 1
Security: 0
Stars: 30
Watchers: 15
Forks: 15
Open Issues: 15
pkg:composer/yiisoft/db-migration
Requires
- php: ^8.1
- ext-filter: *
- symfony/console: ^6.0|^7.0
- yiisoft/db: ^1.3
- yiisoft/injector: ^1.2
Requires (Dev)
- maglnet/composer-require-checker: ^4.4
- phpunit/phpunit: ^10.5
- rector/rector: ^1.0
- roave/infection-static-analysis-plugin: ^1.35
- spatie/phpunit-watcher: ^1.23
- vimeo/psalm: ^5.25
- yiisoft/db-sqlite: ^1.1
- yiisoft/di: ^1.2
- yiisoft/files: ^2.0
- yiisoft/test-support: ^3.0
- yiisoft/yii-console: ^2.0
This package is auto-updated.
Last update: 2025-10-26 08:06:04 UTC
README
Yii DB Migration
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.4.
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.