Replacement MySQL Schema for Yii 2 with fixes

Installs: 6 531

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 0


0.1.0 2015-06-30 10:17 UTC

This package is auto-updated.

Last update: 2024-02-25 01:50:59 UTC


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.


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.


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',