<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('s2_shop_sku_extend', function (Blueprint $table) {
            $table->id();
            $table->integer('sku_id')->comment('sku_id')->index('sku_id');
            $table->tinyInteger('open_lottery_code')->default(0)->comment('是否开启抽奖码 0:未开启,1已开启');
            $table->timestamps();
        });
        // 增加表备注
        DB::statement("ALTER TABLE ufutx_s2_shop_sku_extend COMMENT 'SKU扩展表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('s2_shop_sku_extend');
    }
};
