mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 17:54:34 +00:00
Migration Tweeks #1
This commit is contained in:
1 parent
eb48d616a8
commit
7e5176d5f3
2 files changed
+4
-4
No files matched your search
@@ -14,7 +14,7 @@ class CreateRoomsTable extends Migration
|
|||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('rooms', function (Blueprint $table) {
|
Schema::create('rooms', function (Blueprint $table) {
|
||||||
$table->id();
|
$table->id()->unique();
|
||||||
$table->string('name')->unique();
|
$table->string('name')->unique();
|
||||||
$table->int('owner_id'); //TODO: Foregin key to user Table
|
$table->int('owner_id'); //TODO: Foregin key to user Table
|
||||||
$table->boolval('default');
|
$table->boolval('default');
|
||||||
|
|||||||
@@ -14,14 +14,14 @@ class CreateDevicesTable extends Migration
|
|||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('devices', function (Blueprint $table) {
|
Schema::create('devices', function (Blueprint $table) {
|
||||||
$table->id();
|
$table->id()->unique();
|
||||||
$table->int('room_id'); //TODO: Foregin key to Room Table
|
$table->int('room_id'); //TODO: Foregin key to Room Table
|
||||||
$table->string('type');
|
$table->string('type');
|
||||||
$table->string('token');
|
$table->string('token')->unique();
|
||||||
$table->datetime('heartbeat')
|
$table->datetime('heartbeat')
|
||||||
$table->string('mac');
|
$table->string('mac');
|
||||||
$table->string('firmware_hash');
|
$table->string('firmware_hash');
|
||||||
$table->string('ip_address');
|
$table->string('ip_address')->unique();
|
||||||
$table->string('sleep_time');
|
$table->string('sleep_time');
|
||||||
$table->string('owner_id'); //TODO: Foregin key to user Table
|
$table->string('owner_id'); //TODO: Foregin key to user Table
|
||||||
$table->boolval('approved');
|
$table->boolval('approved');
|
||||||
|
|||||||
Reference in new issue
Block a user