refactor: 修改migration文件

This commit is contained in:
2025-03-15 16:55:32 +08:00
parent 2fc6a7c104
commit ec30eae536
4 changed files with 43 additions and 3 deletions

View File

@@ -30,7 +30,7 @@ class CreateProductAttr extends Migrator
{
$table = $this->table('product_attr', ['engine' => 'InnoDB', 'comment' => '商品属性表']);
$table->addColumn('language_id', 'integer', ['signed' => false, 'null' => false, 'comment' => '语言ID'])
->addColumn('attr_type', MysqlAdapter::INT_TINY, ['limit' => 3, 'null' => false, 'default' => 2, 'comment' => '类型:1为选项类型2为文本输入类型'])
->addColumn('attr_type', MysqlAdapter::PHINX_TYPE_TINY_INTEGER, ['limit' => 3, 'null' => false, 'default' => 2, 'comment' => '类型:1为选项类型2为文本输入类型'])
->addColumn('attr_name', 'string', ['limit' => 64, 'signed' => false, 'null' => false, 'comment' => '属性ID'])
->addColumn('is_system', 'boolean', ['null' => false, 'default' => 0, 'comment' => '是否系统属性:1是,0否'])
->addColumn('created_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '新增时间'])