table('user_invite_code',['engine'=>'Innodb', 'comment' => '用户邀请码','collation'=>'utf8mb4_general_ci' , 'signed' => false]); $table->addColumn(Column::unsignedInteger('user_id')->setComment('关联用户ID')) ->addColumn(Column::string('invite_code',50)->setComment('推广码')) ->addColumn(Column::tinyInteger('channel_id')->setComment('推广渠道ID')) ->addColumn(Column::string('remark',50)->setComment('说明')) ->addColumn(Column::unsignedInteger('create_time')->setDefault(0)->setComment('创建时间')) ->addColumn(Column::unsignedInteger('update_time')->setDefault(0)->setComment('修改时间')) ->addIndex(['user_id']) ->addIndex(['invite_code'],['unique' => true]) ->addIndex(['remark']) ->create(); } }