- add additional migration files

- add seeder for collections
- coverage x_min, x_max, y_min, y_max
- SitelinkController db-independent
This commit is contained in:
Arno Kaimbacher 2019-09-02 16:58:08 +02:00
parent 4d22498e2d
commit c082b4bc60
25 changed files with 463 additions and 86 deletions

View file

@ -0,0 +1,50 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCoverageTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('coverage', function (Blueprint $table) {
$table->increments('id');
$table->integer('dataset_id')->unsigned();
$table->foreign('dataset_id')->references('id')->on('documents')
->onUpdate('cascade')->onDelete('cascade');
$table->smallInteger('elevation_min')->nullable();
$table->smallInteger('elevation_max')->nullable();
$table->smallInteger('elevation_absolut')->nullable();
$table->smallInteger('depth_min')->nullable();
$table->smallInteger('depth_max')->nullable();
$table->smallInteger('depth_absolut')->nullable();
$table->dateTime('time_min')->nullable();
$table->dateTime('time_max')->nullable();
$table->dateTime('time_absolut')->nullable();
$table->float('x_min')->nullable();
$table->float('x_max')->nullable();
$table->float('y_min')->nullable();
$table->float('y_max')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('coverage');
}
}