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) {
|
2021-01-08 09:05:32 +00:00
|
|
|
$table->id()->unique();
|
2021-01-07 18:42:11 +00:00
|
|
|
$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');
|
|
|
|
}
|
|
|
|
}
|