2017 © Pedro Peláez
 

yii2-extension yii2-migrations-addons

Yii2 Migrations Addons, Traits

image

ignatenkovnikita/yii2-migrations-addons

Yii2 Migrations Addons, Traits

  • Friday, July 28, 2017
  • by ignatenkovnikita
  • Repository
  • 1 Watchers
  • 0 Stars
  • 745 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 25 % Grown

The README.md

Yii2 migrations addons

Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

This traits add column on migrations files, (*2)

Install

composer require ignatenkovnikita/yii2-migrations-addons:dev-master

List of traits

  • AddAuthorUpdater - add columns author_id and updater_id for behavior BlameableBehavior
  • AddCreatedUpdated - add columns created_id and updated_at for behavior TimestampBehavior
  • ForeignKeyTrait - add FK

Usage

AddAuthorUpdater, (*3)

use \ignatenkovnikita\migrationsaddons\AddAuthorUpdater;

$this->addAllUser($tableName);

AddCreatedUpdated, (*4)

use \ignatenkovnikita\migrationsaddons\AddCreatedUpdated;

$this->addAllTime($tableName);

ForeignKeyTrait, (*5)

use \ignatenkovnikita\migrationsaddons\ForeignKeyTrait;

$this->addForeignKeys($tableName,[
    ['user_id', 'table_name', 'id']
]);

The Versions

28/07 2017

dev-master

9999999-dev

Yii2 Migrations Addons, Traits

  Sources   Download

BSD-3-Clause

The Requires

 

migrations extension yii2 traits

28/07 2017

v1.0

1.0.0.0

Yii2 Migrations Addons, Traits

  Sources   Download

BSD-3-Clause

The Requires

 

migrations extension yii2 traits