PHPackages                             horat1us/yii2-migration-bootstrap - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. horat1us/yii2-migration-bootstrap

ActiveLibrary[Database &amp; ORM](/categories/database)

horat1us/yii2-migration-bootstrap
=================================

Yii2 Migrations Bootstrap

1.3.0(3y ago)01.5k[1 PRs](https://github.com/Horat1us/yii2-migration-bootstrap/pulls)2MITPHPPHP &gt;=7.4

Since Mar 21Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Horat1us/yii2-migration-bootstrap)[ Packagist](https://packagist.org/packages/horat1us/yii2-migration-bootstrap)[ RSS](/packages/horat1us-yii2-migration-bootstrap/feed)WikiDiscussions master Synced yesterday

READMEChangelog (4)Dependencies (4)Versions (8)Used By (2)

Yii2 Migrations Bootstrap
=========================

[](#yii2-migrations-bootstrap)

[![Test & Lint](https://github.com/Horat1us/yii2-migration-bootstrap/actions/workflows/php.yml/badge.svg?branch=master)](https://github.com/Horat1us/yii2-migration-bootstrap/actions/workflows/php.yml)[![codecov](https://camo.githubusercontent.com/1d34a6870281f20128fa7211bab6708a6dbbd81805b6e343e18baa4e3d11e618/68747470733a2f2f636f6465636f762e696f2f67682f486f7261743175732f796969322d6d6967726174696f6e2d626f6f7473747261702f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/Horat1us/yii2-migration-bootstrap)

This package provides `\yii\base\BootstrapInterface` implementation to append packages migrations to console application.
Main purpose is to prevent mistakes while re-configuring console application.

Previous implementation was available in [horat1us/yii2-base](https://github.com/Horat1us/yii2-base) package as [BootstrapMigrations](https://github.com/Horat1us/yii2-base/blob/1.16.0/src/Traits/BootstrapMigrations.php) trait.

Installation
------------

[](#installation)

Using [packagist.org](https://packagist.org/packages/horat1us/yii2-migration-bootstrap):

```
composer require horat1us/yii2-migration-bootstrap:^1.0
```

Structure
---------

[](#structure)

- [BootstrapTrait](./src/BootstrapTrait.php) - base implementation, can be used outside `\yii\base\BootstrapInterface`implementation.
- [Bootstrap](./src/Bootstrap.php) - `yii\base\BootstrapInterface` implementation using *BootstrapTrait*

Example
-------

[](#example)

Implement `\yii\base\BootstrapInterface` in your yii2 package:

```
