diff --git a/database/migrations/2021_12_06_114147_add_category_entity_id_to_entity_fields_table.php b/database/migrations/2021_12_06_114147_add_category_entity_id_to_entity_fields_table.php new file mode 100644 index 0000000..b0686d7 --- /dev/null +++ b/database/migrations/2021_12_06_114147_add_category_entity_id_to_entity_fields_table.php @@ -0,0 +1,33 @@ +unsignedInteger('category_entity_id') + ->nullable(false)->default(0)->comment('引用分类数据的模型ID'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('entity_fields', function (Blueprint $table) { + $table->dropColumn('category_entity_id'); + }); + } +}