librenms/database/migrations/2018_07_03_091314_create_locations_table.php
Jellyfrog 77c531527c
Apply fixes from StyleCI (#12117)
* Apply fixes from StyleCI

* Disable style check
2020-09-21 14:54:51 +02:00

34 lines
716 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateLocationsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('locations', function (Blueprint $table) {
$table->increments('id');
$table->string('location')->unique();
$table->float('lat', 10, 6)->nullable();
$table->float('lng', 10, 6)->nullable();
$table->dateTime('timestamp');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('locations');
}
}