Файл: database/migrations/2026_04_19_000000_create_feeds_table.php
Строк: 27
<?php
use IlluminateDatabaseMigrationsMigration;
use IlluminateDatabaseSchemaBlueprint;
use IlluminateSupportFacadesSchema;
return new class extends Migration {
public function up(): void
{
Schema::create('feeds', function (Blueprint $table) {
$table->id();
$table->string('relate_type', 20);
$table->unsignedInteger('relate_id');
$table->dateTime('created_at')->nullable();
$table->unique(['relate_type', 'relate_id']);
$table->index('created_at');
$table->index(['relate_type', 'created_at']);
});
}
public function down(): void
{
Schema::dropIfExists('feeds');
}
};