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'); + } +}