Download the PHP package jcbowen/mysql-helper-yii2 without Composer
On this page you can find all versions of the php package jcbowen/mysql-helper-yii2. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download jcbowen/mysql-helper-yii2
More information about jcbowen/mysql-helper-yii2
Files in jcbowen/mysql-helper-yii2
Download jcbowen/mysql-helper-yii2
More information about jcbowen/mysql-helper-yii2
Files in jcbowen/mysql-helper-yii2
Vendor jcbowen
Package mysql-helper-yii2
Short Description 基于yii2的mysql维护助手,可以将表结构以数组方式储存下来,也可以轻松实现表的差异对比及生成对应的修复sql语句
License MIT
Package mysql-helper-yii2
Short Description 基于yii2的mysql维护助手,可以将表结构以数组方式储存下来,也可以轻松实现表的差异对比及生成对应的修复sql语句
License MIT
Please rate this library. Is it a good library?
Informations about the package mysql-helper-yii2
mysql-helper-yii2
基于yii2的mysql维护类
基本要求
- yii 2.x
- PHP版本为7.x
安装
- 直接在根目录执行下方composer命令
使用
-
获取库名称
@param $dsn 如果为空,则读取配置中的dsn
-
获取表名称
-
获取表结构
-
创建修复两张差异表的语句
@param array $schema1 表结构,需要修复的表 @param array $schema2 表结构,基准表 @param bool $strict 使用严格模式, 严格模式将会把表1完全变成表2的结构, 否则将只处理表2种大于表1的内容(多出的字段和索引)
注意
- 已有字段如果之前被设置为了NULL,后续在设置基准表的时候,一定不要设置为NOT NULL,否则会报错
All versions of mysql-helper-yii2 with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.2.0 <8.0.0
yiisoft/yii2 Version ^2.0.11
jcbowen/jcbase-yii2 Version ^0.x-dev || >=0.28.0
yiisoft/yii2 Version ^2.0.11
jcbowen/jcbase-yii2 Version ^0.x-dev || >=0.28.0
The package jcbowen/mysql-helper-yii2 contains the following files
Loading the files please wait ....