如何使用migration Plugin将tinyint添加到cakephp 3中的数据库字段?

val*_*lis 3 php cakephp cakephp-3.0

我正在使用cakephp 3迁移插件来设计数据库.我想添加一个status字段tinyint限制1的字段,我尝试了以下但没有添加任何内容.

尝试1.(失败)

$table->addColumn('status', 'smallinteger', [
        'default' => 0,
        'limit' => 1,
        'null' => false,
]);
Run Code Online (Sandbox Code Playgroud)

尝试2.(失败)

$table->addColumn('status', 'tinyint', [
        'default' => 0,
        'limit' => 1,
        'null' => false,
]);
Run Code Online (Sandbox Code Playgroud)

我找不到任何相同的文档可能是它在那里,我错过了Docs链接

N N*_*Nem 6

添加字段类型的布尔值会添加长度为1的tinyint列

$table
      ->addColumn('status', 'boolean', [
                'default' => false,
                'null' => false,
            ]);
Run Code Online (Sandbox Code Playgroud)