bigIncrements('id');
$table->bigInteger('building_id')->unsigned()->nullable();
$table->foreign('building_id')->references('id')->on('buildings')->onDelete('cascade');
$table->string('name')->nullable();
$table->integer('floor_number')->default(0);
$table->text('description')->nullable();
$table->text('options')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('rooms', function(Blueprint $table)
{
$table->dropForeign('rooms_building_id_foreign');
});
Schema::dropIfExists('rooms');
}
}