我尝试了下面的代码来将字段“exp”迁移到数据类型tinyint(2),我想用数据类型tinyint设置可见长度2。
$table->changeColumn('exp', 'integer', [
'limit' => MysqlAdapter::INT_TINY,
//is there any option to set visible length 2, by default it is taking length 4
//I tried 'length'=>4, but it overrides 'limit' and datatype becomes int(4)
'null' => false,
'default' => '0'
]);
我想用这种类型改变这个列
1条答案
按热度按时间uxh89sit1#
尝试普通查询: