<?php

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

class AddLanguageKeyToTables extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('currency', function (Blueprint $table) {
            $table->string('language_key',128)->after('name')->nullable();
        });
        Schema::table('language', function (Blueprint $table) {
            $table->string('language_key',128)->after('name')->nullable();
        });
        Schema::table('property_channel_category', function (Blueprint $table) {
            $table->string('language_key',255)->after('name')->nullable();
        });
        Schema::table('property_content_category', function (Blueprint $table) {
            $table->string('language_key',255)->after('name')->nullable();
        });
        Schema::table('property_executive_type', function (Blueprint $table) {
            $table->string('language_key',255)->after('name')->nullable();
        });
        Schema::table('property_fact_attribute', function (Blueprint $table) {
            $table->string('language_key',255)->after('name')->nullable();
        });
        Schema::table('property_fact', function (Blueprint $table) {
            $table->string('language_key',250)->after('name')->nullable();
        });
        Schema::table('property_photo_category', function (Blueprint $table) {
            $table->string('language_key',80)->after('category_name')->nullable();
        });
        Schema::table('property_room_bed_type', function (Blueprint $table) {
            $table->string('language_key',255)->after('name')->nullable();
        });
        Schema::table('property_room_type', function (Blueprint $table) {
            $table->string('language_key',255)->after('name')->nullable();
        });
        Schema::table('property_type', function (Blueprint $table) {
            $table->string('language_key',255)->after('name')->nullable();
        });
        Schema::table('property_unit', function (Blueprint $table) {
            $table->string('language_key',128)->after('name')->nullable();
        });

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('currency', function (Blueprint $table) { $table->dropColumn('language_key'); });
        Schema::table('language', function (Blueprint $table) { $table->dropColumn('language_key'); });
        Schema::table('property_channel_category', function (Blueprint $table) { $table->dropColumn('language_key'); });
        Schema::table('property_content_category', function (Blueprint $table) { $table->dropColumn('language_key'); });
        Schema::table('property_executive_type', function (Blueprint $table) { $table->dropColumn('language_key'); });
        Schema::table('property_fact_attribute', function (Blueprint $table) { $table->dropColumn('language_key'); });
        Schema::table('property_fact', function (Blueprint $table) { $table->dropColumn('language_key'); });
        Schema::table('property_photo_category', function (Blueprint $table) { $table->dropColumn('language_key'); });
        Schema::table('property_room_bed_type', function (Blueprint $table) { $table->dropColumn('language_key'); });
        Schema::table('property_room_type', function (Blueprint $table) { $table->dropColumn('language_key'); });
        Schema::table('property_type', function (Blueprint $table) { $table->dropColumn('language_key'); });
        Schema::table('property_unit', function (Blueprint $table) { $table->dropColumn('language_key'); });
    }
}
