refactor: 修改文章表结构迁移文件
This commit is contained in:
@@ -36,7 +36,6 @@ class CreateArticle extends Migrator
|
|||||||
->addColumn('image', 'string', ['limit' => 125, 'null' => true, 'default' => null, 'comment' => '封面图片'])
|
->addColumn('image', 'string', ['limit' => 125, 'null' => true, 'default' => null, 'comment' => '封面图片'])
|
||||||
->addColumn('desc', 'string', ['limit' => 255, 'null' => true, 'default' => null, 'comment' => '描述信息'])
|
->addColumn('desc', 'string', ['limit' => 255, 'null' => true, 'default' => null, 'comment' => '描述信息'])
|
||||||
->addColumn('recommend', 'boolean', ['null' => false, 'default' => 0, 'comment' => '是否推荐:1是,0否'])
|
->addColumn('recommend', 'boolean', ['null' => false, 'default' => 0, 'comment' => '是否推荐:1是,0否'])
|
||||||
->addColumn('release_time', 'integer', ['null' => false, 'comment' => '发布时间'])
|
|
||||||
->addColumn('sort', 'integer', ['null' => false, 'default' => 0, 'comment' => '排序'])
|
->addColumn('sort', 'integer', ['null' => false, 'default' => 0, 'comment' => '排序'])
|
||||||
->addColumn('link', 'string', ['limit' => 255, 'null' => true, 'default' => null, 'comment' => '外链'])
|
->addColumn('link', 'string', ['limit' => 255, 'null' => true, 'default' => null, 'comment' => '外链'])
|
||||||
->addColumn('content', 'text', ['null' => false, 'comment' => '内容'])
|
->addColumn('content', 'text', ['null' => false, 'comment' => '内容'])
|
||||||
@@ -45,6 +44,7 @@ class CreateArticle extends Migrator
|
|||||||
->addColumn('seo_title', 'string', ['limit' => 255, 'null' => true, 'default' => null, 'comment' => 'SEO标题'])
|
->addColumn('seo_title', 'string', ['limit' => 255, 'null' => true, 'default' => null, 'comment' => 'SEO标题'])
|
||||||
->addColumn('seo_keywords', 'string', ['limit' => 255, 'null' => true, 'default' => null, 'comment' => 'SEO关键字'])
|
->addColumn('seo_keywords', 'string', ['limit' => 255, 'null' => true, 'default' => null, 'comment' => 'SEO关键字'])
|
||||||
->addColumn('seo_desc', 'string', ['limit' => 255, 'null' => true, 'default' => null, 'comment' => 'SEO描述'])
|
->addColumn('seo_desc', 'string', ['limit' => 255, 'null' => true, 'default' => null, 'comment' => 'SEO描述'])
|
||||||
|
->addColumn('release_time', 'datetime', ['null' => false, 'comment' => '发布时间'])
|
||||||
->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' => '更新时间'])
|
||||||
->addColumn('deleted_at', 'timestamp', ['null' => true, 'comment' => '删除时间'])
|
->addColumn('deleted_at', 'timestamp', ['null' => true, 'comment' => '删除时间'])
|
||||||
|
|||||||
Reference in New Issue
Block a user