d2d.emegrendeles.hu/database/migrations/2021_07_19_065008_create_producers_table.php
E98Developer 68b7c35bef git init
2026-02-28 06:53:05 +01:00

36 lines
914 B
PHP

<?php
use App\Database\Blueprint;
use App\Enums\DbStatusFieldEnum;
use Illuminate\Database\Migrations\Migration;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('producers', function (Blueprint $table) {
$table->id();
$table->string('name')->nullable();
$table->text('note')->nullable();
$table->enum('status', DbStatusFieldEnum::getValues())->default(DbStatusFieldEnum::draft);
$table->boolean('canSee')->default(true);
$table->unique('id', 'name');
$table->index('name');
$table->timestamps();
$table->softDeletes();
$table->userIdFields();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('producers');
}
};