tethys/database/migrations/2019_09_02_090936_create_coverage_table.php
Arno Kaimbacher c082b4bc60 - add additional migration files
- add seeder for collections
- coverage x_min, x_max, y_min, y_max
- SitelinkController db-independent
2020-06-10 21:09:22 +02:00

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');
}
}