table('user_authcode', array('id' => true, 'primary_key' => ['id'], 'engine' => 'InnoDB', 'comment' => '用户授权码表')); $table->addColumn('user_id', 'integer', array('limit' => 11, 'signed' => false, 'default' => 0, 'comment' => '用户id')) ->addColumn('invite_code', 'string',array('limit' => 255,'default'=>'','comment'=>'邀请码')) ->addColumn('activation_state', 'integer',array('limit' => 11,'signed'=>false,'default'=>0,'comment'=>'激活状态 0 未激活,1已激活')) ->addColumn('create_time', 'datetime', array('null' => true, 'comment' => '创建时间')) ->addColumn('update_time', 'datetime', array('null' => true, 'comment' => '更新时间')) ->create(); } }