Files
CABM-IT/database/migrations/2026_08_09_102206_create_contacts_table.php
jeremy bayse 8f22dca9c8 Initial commit: CABM-IT (ItGlue-style MSP documentation platform)
Laravel 13 + Livewire/Volt app for managing client organizations,
documents, passwords, flexible assets, virtual machines, contacts,
domains, todos, shortcuts, and role-based user administration.
2026-08-16 13:28:12 +02:00

33 lines
1.0 KiB
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('contacts', function (Blueprint $table) {
$table->id();
$table->foreignId('organization_id')->constrained()->cascadeOnDelete();
$table->foreignId('location_id')->nullable()->constrained()->nullOnDelete();
$table->string('first_name');
$table->string('last_name');
$table->string('title')->nullable();
$table->string('email')->nullable();
$table->string('phone')->nullable();
$table->string('mobile')->nullable();
$table->boolean('is_important')->default(false);
$table->text('notes')->nullable();
$table->timestamps();
$table->softDeletes();
});
}
public function down(): void
{
Schema::dropIfExists('contacts');
}
};