<?php

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

class AddNewPriceFieldsMisc extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('miscs', function (Blueprint $table) {
            $table->string('price_type', 20)->nullable();
            $table->string('discount', 20)->nullable();
            $table->string('price', 10)->nullable();
            $table->string('discount_price', 10)->nullable();
        });

        Schema::table('miscs_lang', function (Blueprint $table) {
            $table->string('discount_text', 200)->nullable();
            $table->string('price_tag', 200)->nullable();
        });
    }

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

        Schema::table('miscs', function (Blueprint $table) {
            $table->dropColumn('price_type');
            $table->dropColumn('discount');
            $table->dropColumn('price');
            $table->dropColumn('discount_price');
        });
    }
}
