PHP_SMART_HOME_V3/database/migrations/2021_01_07_183923_create_ro...

35 lines
732 B
PHP
Raw Normal View History

2021-01-07 18:42:11 +00:00
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRoomsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('rooms', function (Blueprint $table) {
$table->id();
$table->string('name')->unique();
2021-01-08 09:03:19 +00:00
$table->int('owner_id'); //TODO: Foregin key to user Table
$table->boolval('default');
2021-01-07 18:42:11 +00:00
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('rooms');
}
}