refactor: 修改文章分类表数结构

This commit is contained in:
2025-01-04 15:33:00 +08:00
parent 00e6f29a3b
commit 046960030e

View File

@@ -32,7 +32,7 @@ class CreateArticleCategory extends Migrator
$table->addColumn('language_id', 'integer', ['signed' => false, 'null' => false, 'comment' => '语言ID']) $table->addColumn('language_id', 'integer', ['signed' => false, 'null' => false, 'comment' => '语言ID'])
->addColumn('pid', 'integer', ['signed' => false, 'null' => false, 'default' => 0, 'comment' => '父级ID']) ->addColumn('pid', 'integer', ['signed' => false, 'null' => false, 'default' => 0, 'comment' => '父级ID'])
->addColumn('name', 'string', ['limit' => 64, 'null' => false, 'comment' => '分类名称']) ->addColumn('name', 'string', ['limit' => 64, 'null' => false, 'comment' => '分类名称'])
->addColumn('short_name', 'string', ['limit' => 64, 'null' => false, 'comment' => '分类简称']) ->addColumn('short_name', 'string', ['limit' => 64, 'null' => true, 'default' => null, 'comment' => '分类简称'])
->addColumn('icon', 'string', ['limit' => 125, 'default' => null, 'comment' => '图标']) ->addColumn('icon', 'string', ['limit' => 125, 'default' => null, 'comment' => '图标'])
->addColumn('desc', 'string', ['limit' => 255, 'default' => null, 'comment' => '描述信息']) ->addColumn('desc', 'string', ['limit' => 255, 'default' => null, 'comment' => '描述信息'])
->addColumn('sort', 'integer', ['null' => false, 'default' => 0, 'comment' => '排序']) ->addColumn('sort', 'integer', ['null' => false, 'default' => 0, 'comment' => '排序'])