layer-chicken/database/migrations/2026_03_06_164222_create_warehouses_table.php

27 lines
725 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('warehouses', function (Blueprint $table) {
$table->id();
$table->string('name', 30);
$table->string('location')->nullable();
$table->text('notes')->nullable();
$table->timestamp('created_at')->useCurrent();
$table->timestamp('updated_at')->nullable()->useCurrentOnUpdate();
$table->softDeletes();
});
}
public function down(): void
{
Schema::dropIfExists('warehouses');
}
};