Add model for Location and expand Account table.

This commit is contained in:
James Cole
2019-12-28 19:27:50 +01:00
parent 58c6ec8a8c
commit 950b706e7c
3 changed files with 127 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
<?php
declare(strict_types=1);
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/**
* Class MakeLocationsTable
*/
class MakeLocationsTable extends Migration
{
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('locations');
}
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create(
'locations', static function (Blueprint $table) {
$table->bigIncrements('id');
$table->timestamps();
$table->softDeletes();
$table->integer('locatable_id', false, true);
$table->string('locatable_type', 255);
$table->decimal('latitude', 24, 12)->nullable();
$table->decimal('longitude', 24, 12)->nullable();
$table->smallInteger('zoom_level', false, true)->nullable();
}
);
}
}