<?php

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

class AddPackPromotion extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('packs', function (Blueprint $table) {
            $table->boolean('promo_active')->default(false);
            $table->decimal('promo_price', 8, 2)->nullable();
        });
      
        Schema::table('packs_lang', function (Blueprint $table) {
            $table->string('promo_text', 150)->nullable();
        });
    }

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

        Schema::table('packs', function (Blueprint $table) {
            $table->dropColumn('promo_active');
            $table->dropColumn('promo_price');
        });
    }
}
