Edit File: 2020_09_02_134155_create_devices_table.php
<?php use App\Enums\DeviceType; use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateDevicesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('devices', function (Blueprint $table) { $table->id(); $table->longText('device_id'); $table->enum('device_type', DeviceType::toArray())->nullable(); $table->string('mac_address')->nullable(); $table->morphs('devicable'); $table->string('preferred_locale')->nullable(); $table->boolean('is_current'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('devices'); } }
Back to File Manager