From c5e46383ab39f4175eb112b3fe0f8f4e4d7ff087 Mon Sep 17 00:00:00 2001 From: panliang <1163816051@qq.com> Date: Thu, 16 Feb 2023 16:22:08 +0800 Subject: [PATCH] migration --- .../2023_02_10_104133_add_spu_id_to_store_products.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/migrations/2023_02_10_104133_add_spu_id_to_store_products.php b/database/migrations/2023_02_10_104133_add_spu_id_to_store_products.php index 9164b487..4adac128 100644 --- a/database/migrations/2023_02_10_104133_add_spu_id_to_store_products.php +++ b/database/migrations/2023_02_10_104133_add_spu_id_to_store_products.php @@ -15,7 +15,7 @@ class AddSpuIdToStoreProducts extends Migration public function up() { Schema::table('store_product_skus', function (Blueprint $table) { - $table->unsignedBigInteger('product_spu_id')->null(); + $table->unsignedBigInteger('product_spu_id')->nullable(); }); DB::statement('update `store_product_skus` set `product_spu_id` = (select `spu_id` from `product_skus` where `product_skus`.`id` = `store_product_skus`.`product_sku_id`);');