diff --git a/database/migrations/2021_12_26_111435_create_tables.php b/database/migrations/2021_12_26_111435_create_tables.php index 76eb39d6..3b51ca10 100644 --- a/database/migrations/2021_12_26_111435_create_tables.php +++ b/database/migrations/2021_12_26_111435_create_tables.php @@ -94,7 +94,7 @@ class CreateTables extends Migration $table->text('content')->comment('描述'); $table->string('meta_title')->default('')->comment('meta 标题'); $table->string('meta_description')->default('')->comment('meta 描述'); - $table->string('meta_keywords')->default('')->comment('meta 关键词'); + $table->string('meta_keyword')->default('')->comment('meta 关键词'); $table->timestamps(); }); Schema::create('category_paths', function (Blueprint $table) { @@ -282,7 +282,7 @@ class CreateTables extends Migration $table->text('content')->comment('内容'); $table->string('meta_title')->comment('meta 标题'); $table->string('meta_description')->comment('meta 描述'); - $table->string('meta_keywords')->comment('meta 关键字'); + $table->string('meta_keyword')->comment('meta 关键字'); $table->timestamps(); }); @@ -326,7 +326,7 @@ class CreateTables extends Migration $table->text('content')->comment('产品描述'); $table->string('meta_title')->default('')->comment('meta 标题'); $table->string('meta_description')->default('')->comment('meta 描述'); - $table->string('meta_keywords')->default('')->comment('meta 关键字'); + $table->string('meta_keyword')->default('')->comment('meta 关键字'); $table->timestamps(); }); Schema::create('product_skus', function (Blueprint $table) { diff --git a/database/migrations/2023_01_06_104545_change_meta_keywords.php b/database/migrations/2023_01_06_104545_change_meta_keywords.php new file mode 100644 index 00000000..fe3db790 --- /dev/null +++ b/database/migrations/2023_01_06_104545_change_meta_keywords.php @@ -0,0 +1,36 @@ +renameColumn('meta_keyword', 'meta_keywords'); + }); + Schema::table('page_descriptions', function (Blueprint $table) { + $table->renameColumn('meta_keyword', 'meta_keywords'); + }); + Schema::table('product_descriptions', function (Blueprint $table) { + $table->renameColumn('meta_keyword', 'meta_keywords'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +};