migration
parent
8da765e19f
commit
f1167ccb81
|
|
@ -15,7 +15,7 @@ class AddSpuIdToStoreProducts extends Migration
|
|||
public function up()
|
||||
{
|
||||
Schema::table('store_product_skus', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('product_spu_id');
|
||||
$table->unsignedBigInteger('product_spu_id')->null();
|
||||
});
|
||||
|
||||
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`);');
|
||||
|
|
|
|||
Loading…
Reference in New Issue