complete Complete User Request Submission section RAD-1
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use App\Enums\PetGenderEnum;
|
||||
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('pets', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name')->nullable();
|
||||
$table->string('type')->nullable();
|
||||
$table->string('gender')->default(PetGenderEnum::Unknown->value);
|
||||
$table->string('breed')->nullable();
|
||||
$table->unsignedInteger('weight')->nullable();
|
||||
$table->boolean('sterilized')->nullable();
|
||||
$table->date('birthday')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->foreignId('owner_id')->constrained('users')->cascadeOnDelete();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('pets');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user