<?php

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

class UpdateHostelDate extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::table('hostels', function(Blueprint $table) {
            $table->date('date_ew')->nullable();
            $table->date('date_money')->nullable();
        });

        Schema::table('room_types', function(Blueprint $table) {
           $table->integer('hostel_id')->nullable();
        });
    }

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

        Schema::table('room_types', function(Blueprint $table) {
            $table->dropColumn('hostel_id');
        });
    }
}
