новости

This commit is contained in:
2026-03-22 17:28:03 +04:00
parent 573e2afbbf
commit 324d1ad75c
11 changed files with 594 additions and 6 deletions
@@ -0,0 +1,28 @@
<?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('news', function (Blueprint $table) {
$table->id();
$table->string('title', 120);
$table->text('body');
$table->string('image_path')->nullable();
$table->unsignedSmallInteger('sort_order')->default(0)->index();
$table->boolean('is_published')->default(true)->index();
$table->unsignedInteger('created_by_account_id')->nullable()->index();
$table->string('created_by_username', 32)->nullable();
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('news');
}
};