This repository has been archived on 2025-12-04. You can view files and clone it. You cannot open issues or pull requests or push a commit.
2025-10-20 08:57:51 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
|
|
|
|
|
|
return new class extends Migration
|
|
|
|
|
{
|
|
|
|
|
public function up()
|
|
|
|
|
{
|
|
|
|
|
Schema::create('contacts', function (Blueprint $table) {
|
|
|
|
|
$table->id();
|
|
|
|
|
$table->foreignId('customer_id')->constrained()->onDelete('cascade');
|
2025-10-29 13:53:08 +01:00
|
|
|
$table->string('salutation', 20);
|
2025-10-20 08:57:51 +02:00
|
|
|
$table->string('first_name', 50);
|
|
|
|
|
$table->string('last_name', 50);
|
|
|
|
|
$table->string('email', 100)->nullable();
|
|
|
|
|
$table->string('phone', 20)->nullable();
|
|
|
|
|
$table->string('position', 100)->nullable();
|
|
|
|
|
$table->boolean('is_primary')->default(false);
|
|
|
|
|
$table->string('avatar')->nullable();
|
|
|
|
|
$table->timestamps();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function down()
|
|
|
|
|
{
|
|
|
|
|
Schema::dropIfExists('contacts');
|
|
|
|
|
}
|
|
|
|
|
};
|