Skip to content

nkovacs/yii2-mysql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

MySQL Schema extension

Replacement MySQL Schema for Yii 2 with fixes.

Currently the only change is that Schema::TYPE_TEXT defaults to 'mediumtext'. This can be changed by setting the defaultTextType property of the Schema.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist nkovacs/yii2-mysql "*"

or add

"nkovacs/yii2-mysql": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, add the following to your configuration file to overwrite the default mysql schema :

Yii::$container->set('yii\db\mysql\Schema', 'nkovacs\mysql\Schema');

To change options :

Yii::$container->set('yii\db\mysql\Schema', [
    'class' => 'nkovacs\mysql\Schema',
    'defaultTextType' => 'longtext',
]);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages