2022_05_31_162437_alter_membership_table.php 860 Bytes
<?php

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

class AlterMembershipTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::table('membership_goods', function (Blueprint $table) {
            $table->string('iap_id')->after('membership_id')->default('')->comment('iap产品id');
            $table->string('name')->after('iap_id')->default('')->comment('商品名称');
            $table->string('iap_type')->after('terminal')->default('')->comment('iap产品类型');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
        Schema::dropColumns('membership_goods', ['name']);
    }
}