Files
BloomFeed-RSS/database/migrations/2026_07_03_093648_create_feeds_table.php
2026-07-03 16:27:34 +02:00

36 lines
909 B
PHP

<?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('feeds', function (Blueprint $table) {
$table->id();
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
$table->string('url', 2048);
$table->string('title')->nullable();
$table->string('site_title')->nullable();
$table->timestamp('last_fetched_at')->nullable();
$table->string('last_fetch_status')->nullable();
$table->timestamps();
$table->index('user_id');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('feeds');
}
};