<?php

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

class AddPackageTypeToVirtualPackages extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('virtual_packages', function (Blueprint $table) {
            $table->tinyInteger('package_type')->unsigned()->default(255)->comment('套餐类型（0:A类套餐 1:B类套餐 2:C类套餐 3:D类套餐）')->after('type');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('virtual_packages', function (Blueprint $table) {
            $table->dropColumn('package_type');
        });
    }
}
