c082b4bc60
- add seeder for collections - coverage x_min, x_max, y_min, y_max - SitelinkController db-independent
51 lines
1.5 KiB
PHP
51 lines
1.5 KiB
PHP
<?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');
|
|
}
|
|
}
|