From 0f58dfe1f45e8189adb9d4f41e01a6baab6a0785 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Sun, 5 Oct 2025 02:37:04 +0200 Subject: [PATCH] fix: make save button avoid error 500 in delivery method admin page --- ..._120000_fix_shop_deliveries_userstamps.php | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 database/migrations/shop/2025_02_14_120000_fix_shop_deliveries_userstamps.php diff --git a/database/migrations/shop/2025_02_14_120000_fix_shop_deliveries_userstamps.php b/database/migrations/shop/2025_02_14_120000_fix_shop_deliveries_userstamps.php new file mode 100644 index 00000000..c0734695 --- /dev/null +++ b/database/migrations/shop/2025_02_14_120000_fix_shop_deliveries_userstamps.php @@ -0,0 +1,47 @@ +dropColumn($columnsToDrop); + }); + } + + Schema::table('shop_deliveries', function (Blueprint $table) { + $table->unsignedBigInteger('created_by')->nullable()->after('event_date_end'); + $table->unsignedBigInteger('updated_by')->nullable()->after('created_by'); + $table->unsignedBigInteger('deleted_by')->nullable()->after('updated_by'); + }); + } + + public function down(): void + { + if (! Schema::hasTable('shop_deliveries')) { + return; + } + + Schema::table('shop_deliveries', function (Blueprint $table) { + $table->dropColumn(['created_by', 'updated_by', 'deleted_by']); + }); + } +};