From e5b2e1f552830eddd8326b025e03d62aba198cfd Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Thu, 20 Mar 2025 11:00:05 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=94=B9migration?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migrations/20241230093811_create_sys_navigation_item.php | 4 ++-- database/migrations/20241231020620_create_sys_banner_item.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/database/migrations/20241230093811_create_sys_navigation_item.php b/database/migrations/20241230093811_create_sys_navigation_item.php index 8c11a27b..81c193f3 100644 --- a/database/migrations/20241230093811_create_sys_navigation_item.php +++ b/database/migrations/20241230093811_create_sys_navigation_item.php @@ -32,8 +32,8 @@ class CreateSysNavigationItem extends Migrator ->addColumn('pid', 'integer', ['null' => false, 'default' => 0, 'comment' => '父级ID']) ->addColumn('name', 'string', ['limit' => 64, 'null' => false, 'comment' => '名称']) ->addColumn('icon', 'string', ['limit' => 64, 'null' => true, 'default' => null, 'comment' => '图标']) - ->addColumn('link_to', 'string', ['limit' => 64, 'null' => false, 'comment' => '链接到(类型): article:文章, article_category:文章分类, product:产品, product_category:产品分类, custom:自定义链接']) - ->addColumn('link', 'string', ['limit' => 255, 'null' => false, 'comment' => '链接']) + ->addColumn('link_to', 'string', ['limit' => 64, 'null' => true, 'default' => null, 'comment' => '链接到(类型): article:文章, article_category:文章分类, product:产品, product_category:产品分类, custom:自定义链接']) + ->addColumn('link', 'string', ['limit' => 255, 'null' => true, 'default' => null, 'comment' => '链接']) ->addColumn('sort', 'integer', ['limit' => 11, 'null' => false, 'default' => 0, 'comment' => '排序']) ->addColumn('blank', 'boolean', ['limit' => 1, 'null' => false, 'default' => 0, 'comment' => '是否新窗口打开, 0否, 1是']) ->addColumn('status', 'boolean', ['limit' => 1, 'null' => false, 'default' => 1, 'comment' => '-1为禁用, 1为启用']) diff --git a/database/migrations/20241231020620_create_sys_banner_item.php b/database/migrations/20241231020620_create_sys_banner_item.php index 784c00af..444382fa 100644 --- a/database/migrations/20241231020620_create_sys_banner_item.php +++ b/database/migrations/20241231020620_create_sys_banner_item.php @@ -36,8 +36,8 @@ class CreateSysBannerItem extends Migrator ->addColumn('type', 'string', ['limit' => 16, 'null' => false, 'comment' => '类型: image为图片, video为视频']) ->addColumn('image', 'string', ['limit' => 255, 'null' => false, 'comment' => '图片']) ->addColumn('video', 'string', ['limit' => 255, 'null' => false, 'comment' => '视频']) - ->addColumn('link_to', 'string', ['limit' => 64, 'null' => false, 'comment' => '链接到(类型): article:文章, article_category:文章分类, product:产品, product_category:产品分类, custom:自定义链接']) - ->addColumn('link', 'string', ['limit' => 255, 'null' => false, 'comment' => '链接']) + ->addColumn('link_to', 'string', ['limit' => 64, 'null' => true, 'default' => null, 'comment' => '链接到(类型): article:文章, article_category:文章分类, product:产品, product_category:产品分类, custom:自定义链接']) + ->addColumn('link', 'string', ['limit' => 255, 'null' => true, 'default' => null, 'comment' => '链接']) ->addColumn('sort', 'integer', ['limit' => 11, 'null' => false, 'default' => 0, 'comment' => '排序']) ->addColumn('status', 'boolean', ['limit' => 1, 'null' => false, 'default' => 1, 'comment' => '-1为禁用, 1为启用']) ->addColumn('created_at', 'timestamp', ['null' => false, 'default' =>'CURRENT_TIMESTAMP', 'comment' => '创建时间'])