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