Untitled
unknown
plain_text
a year ago
825 B
12
Indexable
<?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('company_contact', function (Blueprint $table) {
$table->id();
$table->foreignId('contact_id')->constrained();
$table->foreignId('company_id')->constrained();
$table->boolean('is_point_of_contact');
$table->json('roles')->nullable();
$table->unique(['contact_id', 'company_id']);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('company_contacts');
}
};
Editor is loading...
Leave a Comment