for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUserChatTable extends Migration
{
public function up(): void
Schema::create('user_chat', static function (Blueprint $table) {
$table->bigInteger('user_id')->comment('Unique user identifier');
$table->bigInteger('chat_id')->index('chat_id')->comment('Unique user or chat identifier');
$table->primary(['user_id', 'chat_id']);
});
}
public function down(): void
Schema::dropIfExists('user_chat');