Files
Kol-Manager/database/migrations/2024_01_01_000010_create_clients_table.php
2026-04-01 08:04:56 +07:00

41 lines
1.3 KiB
PHP

<?php
declare(strict_types=1);
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('clients', function (Blueprint $table): void {
$table->id();
$table->string('name');
$table->string('email')->nullable()->unique();
$table->string('phone')->nullable();
$table->string('company')->nullable();
$table->string('ig_handle')->nullable();
$table->string('tiktok_handle')->nullable();
$table->string('youtube_handle')->nullable();
$table->string('address_line1')->nullable();
$table->string('address_line2')->nullable();
$table->string('city')->nullable();
$table->string('state')->nullable();
$table->string('postal_code')->nullable();
$table->string('country')->default('Indonesia');
$table->string('status')->default('active'); // active, inactive, prospect
$table->text('notes')->nullable();
$table->string('avatar')->nullable();
$table->timestamps();
$table->softDeletes();
});
}
public function down(): void
{
Schema::dropIfExists('clients');
}
};