table('product_related', ['engine' => 'InnoDB', 'comment' => '产品关联表']); $table->addColumn('product_id', 'integer', ['signed' => true , 'null' => false, 'comment' => '产品ID']) ->addColumn('related_product_id', 'integer', ['signed' => true , 'null' => false, 'comment' => '关联的产品ID']) ->addColumn('desc', 'string', ['limit' => 255, 'default' => null, 'comment' => '描述信息']) ->addColumn('sort', 'integer', ['null' => false, 'default' => 0, 'comment' => '排序']) ->addColumn('created_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '创建时间']) ->addColumn('updated_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'update' => 'CURRENT_TIMESTAMP', 'comment' => '更新时间']) ->create(); } }