hasTable('alarm_report')) { $table = $this->table('alarm_report'); $table ->addColumn('fence_id', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => true,'signed' => true,'comment' => '围栏',]) ->addColumn('is_sent', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => true,'default' => 1,'signed' => true,'comment' => '是否推送',]) ->addColumn('alarm_type', 'string', ['limit' => 32,'null' => true,'signed' => true,'comment' => '告警类型',]) ->addColumn('longitude', 'decimal', ['precision' => 10,'scale' => 6,'null' => true,'signed' => true,'comment' => '经度',]) ->addColumn('latitude', 'decimal', ['precision' => 10,'scale' => 6,'null' => true,'signed' => true,'comment' => '纬度',]) ->update(); } } }