2017 © Pedro Peláez
 

library yii-migrate

Simple package to add database migrations to project

image

grundik/yii-migrate

Simple package to add database migrations to project

  • Thursday, July 27, 2017
  • by Grundik
  • Repository
  • 2 Watchers
  • 1 Stars
  • 81 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

yii-migrate

Simple package to add database migrations to project, (*1)

Installation

  • Add to composer.json:
    "require": {
        "grundik/yii-migrate": "*@dev"
    },
    "repositories": [{
      "type": "vcs",
      "url": "https://github.com/Grundik/yii-migrate.git"
    }, {
      "type": "vcs",
      "url": "https://github.com/yiisoft/yii.git"
    }]
    

, (*2)

  • Run composer:
composer update
  • Create configuration file:
cp vendor/grundik/yii-migrate/config/migrations.php-default config/migrations.php
  • Edit configuration file to fulfill your needs: set database credentials, migrations path, (*3)

  • Run, (*4)

    • vendor/bin/migrate - to perform migrate;
    • vendor/bin/migrate create - to create new migration.

See also: http://www.yiiframework.com/doc/guide/1.1/en/database.migration, (*5)

Modules

To use multiple migration folders (e.g. for multiple project modules), define them in migrations.php as explained in example config., (*6)

Use parameter --module= to perform action in explicit module:, (*7)

vendor/bin/migrate create migration_name --module=module_name

Migrate without parameters will apply all new migrations from all modules., (*8)

Module migrations are applied in order of their creation, regardless of module., (*9)

The Versions

27/07 2017

dev-master

9999999-dev

Simple package to add database migrations to project

  Sources   Download

BSD

The Requires

 

yii database-migration

27/07 2017

0.1.1

0.1.1.0

Simple package to add database migrations to project

  Sources   Download

BSD

The Requires

 

yii database-migration

04/03 2017

0.1.0

0.1.0.0

Simple package to add database migrations to project

  Sources   Download

BSD

The Requires

 

yii database-migration