Table Migration
This commit is contained in:
parent
498a71fc71
commit
eb48d616a8
@ -16,6 +16,8 @@ class CreateRoomsTable extends Migration
|
|||||||
Schema::create('rooms', function (Blueprint $table) {
|
Schema::create('rooms', function (Blueprint $table) {
|
||||||
$table->id();
|
$table->id();
|
||||||
$table->string('name')->unique();
|
$table->string('name')->unique();
|
||||||
|
$table->int('owner_id'); //TODO: Foregin key to user Table
|
||||||
|
$table->boolval('default');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,18 @@ class CreateDevicesTable extends Migration
|
|||||||
{
|
{
|
||||||
Schema::create('devices', function (Blueprint $table) {
|
Schema::create('devices', function (Blueprint $table) {
|
||||||
$table->id();
|
$table->id();
|
||||||
|
$table->int('room_id'); //TODO: Foregin key to Room Table
|
||||||
|
$table->string('type');
|
||||||
|
$table->string('token');
|
||||||
|
$table->datetime('heartbeat')
|
||||||
|
$table->string('mac');
|
||||||
|
$table->string('firmware_hash');
|
||||||
|
$table->string('ip_address');
|
||||||
|
$table->string('sleep_time');
|
||||||
|
$table->string('owner_id'); //TODO: Foregin key to user Table
|
||||||
|
$table->boolval('approved');
|
||||||
|
$table->string('icon');
|
||||||
|
$table->string('command');
|
||||||
$table->string('name')->unique();
|
$table->string('name')->unique();
|
||||||
$table->string('description')->nullable();
|
$table->string('description')->nullable();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
|
Loading…
Reference in New Issue
Block a user