master_template/database/migrations/2024_06_10_073647_create_tbl_blogs.php
2024-06-10 18:06:58 +05:45

43 lines
1.3 KiB
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('blogs', function (Blueprint $table) {
$table->id('blog_id');
$table->integer('parent_blog')->default(0);
$table->string('title', 250)->nullable();
$table->string('alias', 250)->nullable();
$table->text('text')->nullable();
$table->string('image', 255)->nullable();
$table->string('thumb', 255)->nullable();
$table->string('cover', 255)->nullable();
$table->integer('display_order')->default(1);
$table->integer('status')->default(1);
$table->integer('createdby')->nullable();
$table->integer('updatedby')->nullable();
$table->text('seo_keywords')->nullable();
$table->text('seo_title')->nullable();
$table->text('seo_descriptions')->nullable();
$table->text('og_tags')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('blogs');
}
};