From 774080294011b9f3a467bd017777697501ac2662 Mon Sep 17 00:00:00 2001 From: XiaoLFeng Date: Tue, 13 Jun 2023 20:25:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2023_06_13_052650_create_info_table.php | 38 ++++++++++++++ .../2023_06_13_060913_update_info_table.php | 52 +++++++++++++++++++ ...23_06_13_115307_create_blog_sort_table.php | 38 ++++++++++++++ 3 files changed, 128 insertions(+) create mode 100644 database/migrations/2023_06_13_052650_create_info_table.php create mode 100644 database/migrations/2023_06_13_060913_update_info_table.php create mode 100644 database/migrations/2023_06_13_115307_create_blog_sort_table.php diff --git a/database/migrations/2023_06_13_052650_create_info_table.php b/database/migrations/2023_06_13_052650_create_info_table.php new file mode 100644 index 0000000..a2af881 --- /dev/null +++ b/database/migrations/2023_06_13_052650_create_info_table.php @@ -0,0 +1,38 @@ +id(); + $table->string('value')->comment('参数名字'); + $table->text('data')->nullable()->comment('参数内容'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('info'); + } +} diff --git a/database/migrations/2023_06_13_060913_update_info_table.php b/database/migrations/2023_06_13_060913_update_info_table.php new file mode 100644 index 0000000..54713f1 --- /dev/null +++ b/database/migrations/2023_06_13_060913_update_info_table.php @@ -0,0 +1,52 @@ +insert(['value' => 'title', 'created_at' => date('Y-m-d H:i:s')]); + DB::table('info')->insert(['value' => 'description', 'created_at' => date('Y-m-d H:i:s')]); + DB::table('info')->insert(['value' => 'subTitle', 'created_at' => date('Y-m-d H:i:s')]); + DB::table('info')->insert(['value' => 'subTitleDescription', 'created_at' => date('Y-m-d H:i:s')]); + DB::table('info')->insert(['value' => 'icon', 'created_at' => date('Y-m-d H:i:s')]); + DB::table('info')->insert(['value' => 'keyword', 'created_at' => date('Y-m-d H:i:s')]); + DB::table('info')->insert(['value' => 'webHeader', 'created_at' => date('Y-m-d H:i:s')]); + DB::table('info')->insert(['value' => 'webFooter', 'created_at' => date('Y-m-d H:i:s')]); + DB::table('info')->insert(['value' => 'aboutMe', 'created_at' => date('Y-m-d H:i:s')]); + DB::table('info')->insert(['value' => 'icp', 'created_at' => date('Y-m-d H:i:s')]); + DB::table('info')->insert(['value' => 'gongan', 'created_at' => date('Y-m-d H:i:s')]); + DB::table('info')->insert(['value' => 'author', 'created_at' => date('Y-m-d H:i:s')]); + DB::table('info')->insert(['value' => 'copyRightYear', 'created_at' => date('Y-m-d H:i:s')]); + DB::table('info')->insert(['value' => 'blog', 'created_at' => date('Y-m-d H:i:s')]); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('info', function (Blueprint $table) { + // + }); + } +} diff --git a/database/migrations/2023_06_13_115307_create_blog_sort_table.php b/database/migrations/2023_06_13_115307_create_blog_sort_table.php new file mode 100644 index 0000000..ec46db8 --- /dev/null +++ b/database/migrations/2023_06_13_115307_create_blog_sort_table.php @@ -0,0 +1,38 @@ +id(); + $table->integer('sort')->comment('排序(数字越小权限越大)'); + $table->string('title')->comment('标题'); + $table->text('description')->comment('描述')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('blog_sort'); + } +}