Files
omg-wtf-ai/database/migrations/2026_08_02_143423_create_pages_table.php
2026-08-08 18:03:29 +03:00

36 lines
944 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('pages', function (Blueprint $table) {
$table->id();
$table->string('title');
$table->string('slug')->unique();
$table->longText('body');
$table->string('meta_title')->nullable();
$table->string('meta_description')->nullable();
$table->boolean('published')->default(true);
$table->boolean('show_in_footer')->default(true);
$table->unsignedSmallInteger('order')->default(0);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('pages');
}
};