27 lines
No EOL
872 B
PHP
27 lines
No EOL
872 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('routes', function (Blueprint $table) {
|
|
$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
|
|
{
|
|
Schema::dropIfExists('routes');
|
|
}
|
|
}; |