<?php

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

class CreateHostelFeeTable extends Migration {
	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up() {
		//
		Schema::create( 'hostel_fees', function ( Blueprint $table ) {
			$table->increments( 'id' );
			$table->integer( 'fee' )->default( 0 );
			$table->string( 'name' )->nullable();
			$table->integer( 'hostel_id' )->nullable();
			$table->timestamps();
			$table->softDeletes();
		} );

		Schema::create( 'room_fees', function ( Blueprint $table ) {
			$table->increments( 'id' );
			$table->integer( 'fee' )->default( 0 );
			$table->string( 'name' )->nullable();
			$table->integer( 'hostel_id' )->nullable();
			$table->integer( 'room_id' )->nullable();
			$table->timestamps();
			$table->softDeletes();
		} );
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down() {
		//
		Schema::dropIfExists( 'hostel_fees' );
		Schema::dropIfExists('room_fees');
	}
}
