yiisoft / yii-db-migration
Yii DB Migration
Fund package maintenance!
Open Collective
yiisoft
Installs: 33 524
Dependents: 4
Suggesters: 3
Security: 0
Stars: 27
Watchers: 17
Forks: 14
Open Issues: 16
Requires
- php: ^8.0
- ext-filter: *
- symfony/console: ^6.0|^7.0
- yiisoft/db: ^1.1
- yiisoft/injector: ^1.2
Requires (Dev)
- maglnet/composer-require-checker: ^4.4
- phpunit/phpunit: ^9.6|^10.2
- rector/rector: ^0.18
- roave/infection-static-analysis-plugin: ^1.25|^1.32
- spatie/phpunit-watcher: ^1.23
- vimeo/psalm: ^4.30|^5.12
- yiisoft/db-sqlite: ^1.1
- yiisoft/di: ^1.2
- yiisoft/files: ^1.0|^2.0
- yiisoft/test-support: ^3.0
- yiisoft/yii-console: ^1.0|^2.0
This package is auto-updated.
Last update: 2024-02-07 03:30:08 UTC
README
Yii DB Migration
Yii DB Migration allows you to manage database schema using migrations.
Supports the following databases out of the box:
- MSSQL of versions 2017, 2019, 2022.
- MySQL of versions 5.7–8.0.
- MariaDB of versions 10.4–10.9.
- Oracle of versions 12c–21c.
- PostgreSQL of versions 9.6–15.
- SQLite of version 3.3 and above.
Requirements
- PHP 8.0 or higher.
Filter
PHP extension.
Installation
The preferred way to install this extension is through composer.
Either run
composer require yiisoft/db-migration
or add
"yiisoft/db-migration": "^1.0"
to the require
section of your composer.json
.
Usage
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.
Support
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.
Testing
Check the testing instructions to learn about testing.
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.