herbarium/database/migrations/2025_11_19_004444_create_specimen_table.php

51 lines
1.6 KiB
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('specimen', function (Blueprint $table) {
$table->id()->primary();
$table->date('date');
$table->string('family');
$table->string('genus');
$table->string('specific_epithet');
$table->string('collector');
$table->string('collection_number');
$table->text('associate_collectors')->nullable();
$table->string('plant_habit');
$table->text('population_size');
$table->text('substrate');
$table->string('phenology_flowering');
$table->string('phenology_fruiting');
$table->string('phenology_fruiting_flowering');
$table->string('phenology_vegetative');
$table->text('phenology_notes')->nullable();
$table->text('vegetation_community');
$table->text('plant_associates')->nullable();
$table->string('aspect');
$table->string('exposure');
$table->string('elevation');
$table->text('location');
$table->string('latitude')->nullable();
$table->string('longitude')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('specimen');
}
};