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' => '创建时间'])