File: /var/www/html/owlcrm/database/migrations/2024_05_09_054229_create_leads_table.php
<?php
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('leads', function (Blueprint $table) {
$table->id();
$table->string('title');
$table->unsignedBigInteger('source');
$table->unsignedBigInteger('assigned_to')->nullable();
$table->unsignedBigInteger('customer_id')->nullable();
$table->unsignedBigInteger('created_by')->nullable();
$table->string('tags')->nullable();
$table->string('salutation')->nullable();
$table->string('first_name');
$table->string('last_name');
$table->string('gender');
$table->string('property_interest_type');
$table->tinyInteger('is_organization')->nullable();
$table->string('organization_name')->nullable();
$table->string('designation')->nullable();
$table->string('budget')->nullable();
$table->string('email_address')->nullable();
$table->string('website')->nullable();
$table->string('phone')->nullable();
$table->string('mobile_number')->nullable();
$table->text('description')->nullable();
$table->timestamp('last_contacted')->nullable();
$table->timestamp('next_followup')->nullable();
$table->string('address_line_1')->nullable();
$table->string('address_line_2')->nullable();
$table->unsignedBigInteger('city');
$table->unsignedBigInteger('state');
$table->string('postal_code')->nullable();
$table->unsignedBigInteger('country');
$table->string('status')->default('0');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('leads');
}
};