diff --git a/database/migrations/20260707034159_create_product_compat_rel.php b/database/migrations/20260707034159_create_product_compat_rel.php index 90751a8c..37c9b264 100644 --- a/database/migrations/20260707034159_create_product_compat_rel.php +++ b/database/migrations/20260707034159_create_product_compat_rel.php @@ -34,15 +34,12 @@ class CreateProductCompatRel extends Migrator 'comment' => '产品兼容性关联表' ]); - $table->addColumn('language_id', 'integer', ['signed' => false, 'null' => false, 'comment' => '语言ID']) - ->addColumn('product_id', 'integer', ['null' => false, 'comment' => '产品id']) - ->addColumn('compat_id', 'json', ['null' => false, 'comment' => '关联的兼容性数据id']) + $table->addColumn('product_id', 'integer', ['null' => false, 'comment' => '产品id']) + ->addColumn('compat_id', 'int', ['null' => false, 'comment' => '关联的兼容性数据id']) ->addColumn('series_name', 'string', ['limit' => 128, 'null' => true, 'comment' => '产品系列名']) ->addColumn('show_series_name', 'boolean', ['null' => false, 'default' => 0, 'comment' => '是否显示系列名:0=否,1=是']) ->addColumn('remark', 'string', ['limit' => 512, 'null' => true, 'comment' => '兼容性说明']) ->addColumn('created_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '创建时间']) - ->addColumn('updated_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP', 'comment' => '更新时间']) - ->addIndex(['language_id'], ['name' => 'idx_language_id']) ->create(); } }