mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 17:54:34 +00:00
Table Migration
This commit is contained in:
1 parent
498a71fc71
commit
eb48d616a8
2 files changed
+14
No files matched your search
@@ -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();
|
||||||
|
|||||||
Reference in new issue
Block a user