2025-07-05 18:26:04 +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(): void
|
|
|
|
|
{
|
2025-07-10 11:14:06 +02:00
|
|
|
Schema::create('routes', function (Blueprint $table) {
|
2025-07-05 18:26:04 +02:00
|
|
|
$table->foreignId('feed_id')->constrained()->onDelete('cascade');
|
|
|
|
|
$table->foreignId('platform_channel_id')->constrained()->onDelete('cascade');
|
|
|
|
|
$table->boolean('is_active')->default(true);
|
|
|
|
|
$table->integer('priority')->default(0); // for ordering/priority
|
|
|
|
|
$table->json('filters')->nullable(); // keyword filters, content filters, etc.
|
|
|
|
|
$table->timestamps();
|
|
|
|
|
|
|
|
|
|
$table->primary(['feed_id', 'platform_channel_id']);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function down(): void
|
|
|
|
|
{
|
2025-07-10 11:14:06 +02:00
|
|
|
Schema::dropIfExists('routes');
|
2025-07-05 18:26:04 +02:00
|
|
|
}
|
|
|
|
|
};
|