From 788cae3efe6a929e53449078df261107f4730a1d Mon Sep 17 00:00:00 2001 From: kuaifan Date: Tue, 19 Aug 2025 20:06:46 +0800 Subject: [PATCH] no message --- ..._add_sort_field_to_project_users_table.php | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 database/migrations/2025_08_19_180822_add_sort_field_to_project_users_table.php diff --git a/database/migrations/2025_08_19_180822_add_sort_field_to_project_users_table.php b/database/migrations/2025_08_19_180822_add_sort_field_to_project_users_table.php new file mode 100644 index 000000000..c9b4bfb9e --- /dev/null +++ b/database/migrations/2025_08_19_180822_add_sort_field_to_project_users_table.php @@ -0,0 +1,38 @@ +integer('sort')->nullable()->default(0)->after('top_at')->comment('排序(ASC)'); + } + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('project_users', function (Blueprint $table) { + // 删除排序sort字段 + if (Schema::hasColumn('project_users', 'sort')) { + $table->dropColumn('sort'); + } + }); + } +}