Files
lara-bermite/database/migrations/2023_09_05_180329_create_rainfalls_table.php
2023-09-10 08:49:10 +02:00

31 lines
689 B
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('rainfalls', function (Blueprint $table) {
$table->id();
$table->foreignIdFor(\App\Models\User::class)->constrained();
$table->date('date');
$table->unsignedInteger('value');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('rainfalls');
}
};