Download the PHP package fornit1917/yii2-emigrate without Composer

On this page you can find all versions of the php package fornit1917/yii2-emigrate. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii2-emigrate

yii2-emigrate

Yii2 Framework extension for simplification of code generation when creating some migrations. Code for up- and down-method in migration class may be generated based on the name of migration or additional command line parameters.

Install

Install via composer:

composer require "fornit1917/yii2-emigrate:dev-master"

Then add ExtendedMigrateController in your controllerMap for console applications (file config/console.php):

Now you can create migration with new yii2-emigrate:

./yii emigrate/create create_table_table_name

Usage

For automatic code generation migration it is necessary to give a special name:

Create migrations for create table or drop table

./yii emigrate/create drop_table_table_name

This command generate the next code:

If you do not need the option "ENGINE=InnoDB CHARSET=utf8", you can specify its value on the command line option tableOptions:

./yii emigrate/create **create_table_**table_name --tableOptions="ENGINE=MyISAM"

or empty value:

./yii emigrate/create **create_table_**table_name --tableOptions=0

The migration for drop table is generated similarly:

./yii emigrate/create drop_table_table_name

Create migrations for add column and drop column

./yii emigrate/create add_column_column_name_in_table_name

This command generate the next code:

Type of column is empty. This parameter can be specified in the command line option columnType:

./yii emigrate/create add_column_column_name_in_table_name --columnType="int(11) not null default 0"

This command generate the next code:

It is completely finished migration that does not require manual rework!

The migration for drop column is generated similarly:

./yii emigrate/create drop_column_column_name_in_table_name --columnType="int(11) not null default 0"

Command line options

The following command line options can be used:

With these options, you can generate the migration not respecting the naming conventions. For example:

./yii emigrate/create my_cool_migration --command=add-column --column=column_name --columnType=int


All versions of yii2-emigrate with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
lib-pcre Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package fornit1917/yii2-emigrate contains the following files

Loading the files please wait ....