Skip to content

yiisoft/db-migration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

cc9d260 · Apr 8, 2025
Mar 12, 2025
May 23, 2024
Dec 21, 2023
Jun 2, 2024
Apr 8, 2025
Mar 14, 2025
Apr 8, 2025
Sep 29, 2021
Nov 28, 2024
Jun 13, 2023
Nov 29, 2020
Jul 25, 2023
Apr 8, 2025
May 7, 2024
Mar 14, 2025
Dec 23, 2024
Apr 4, 2023
Mar 14, 2025
Jun 4, 2023
Jul 25, 2023
Dec 21, 2023
Mar 11, 2025
Nov 26, 2024

Yii

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.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

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

Open Collective

Follow updates

Official website Twitter Telegram Facebook Slack