Laravel 13 + Livewire/Volt app for managing client organizations, documents, passwords, flexible assets, virtual machines, contacts, domains, todos, shortcuts, and role-based user administration.
32 lines
993 B
PHP
32 lines
993 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('locations', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->foreignId('organization_id')->constrained()->cascadeOnDelete();
|
|
$table->string('name');
|
|
$table->string('address_line_1')->nullable();
|
|
$table->string('address_line_2')->nullable();
|
|
$table->string('city')->nullable();
|
|
$table->string('region')->nullable();
|
|
$table->string('postal_code')->nullable();
|
|
$table->string('country')->nullable();
|
|
$table->string('phone')->nullable();
|
|
$table->boolean('is_primary')->default(false);
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('locations');
|
|
}
|
|
};
|