refactor: 修改migration文件

This commit is contained in:
2025-02-10 17:14:55 +08:00
parent 8e07c36301
commit a4986e5aa6

View File

@@ -44,7 +44,7 @@ class CreateProduct extends Migrator
->addColumn('detail', 'text', ['null' => true, 'comment' => '产品详情']) ->addColumn('detail', 'text', ['null' => true, 'comment' => '产品详情'])
->addColumn('status', 'boolean', ['null' => false, 'default' => 1, 'comment' => '状态:1启用,-1禁用']) ->addColumn('status', 'boolean', ['null' => false, 'default' => 1, 'comment' => '状态:1启用,-1禁用'])
->addColumn('seo_title', 'string', ['limit' => 255, 'default' => null, 'comment' => 'seo标题']) ->addColumn('seo_title', 'string', ['limit' => 255, 'default' => null, 'comment' => 'seo标题'])
->addColumn('seo_keyword', 'string', ['limit' => 255, 'default' => null, 'comment' => 'seo关建词']) ->addColumn('seo_keywords', 'string', ['limit' => 255, 'default' => null, 'comment' => 'seo关建词'])
->addColumn('seo_desc', 'string', ['limit' => 255, 'default' => null, 'comment' => 'seo描述']) ->addColumn('seo_desc', 'string', ['limit' => 255, 'default' => null, 'comment' => 'seo描述'])
->addColumn('created_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '创建时间']) ->addColumn('created_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '创建时间'])
->addColumn('updated_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'update' => 'CURRENT_TIMESTAMP', 'comment' => '更新时间']) ->addColumn('updated_at', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'update' => 'CURRENT_TIMESTAMP', 'comment' => '更新时间'])