33 lines
971 B
PHP
33 lines
971 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('consultants', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->foreignId('user_id')->nullable()->constrained('users')->nullOnDelete();
|
|
$table->string('nama_perunding');
|
|
$table->string('no_pendaftaran_syarikat')->nullable();
|
|
$table->text('alamat')->nullable();
|
|
$table->string('emel')->nullable();
|
|
$table->string('telefon')->nullable();
|
|
$table->boolean('aktif')->default(true);
|
|
$table->timestamps();
|
|
$table->softDeletes();
|
|
|
|
$table->index('aktif');
|
|
$table->index('nama_perunding');
|
|
});
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('consultants');
|
|
}
|
|
};
|