OwlCyberSecurity - MANAGER
Edit File: 2022_08_14_092918_create_articles_table.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. * * @return void */ public function up() { Schema::create('articles', function (Blueprint $table) { $table->id(); $table->string('title', 255)->nullable(); $table->text('content')->nullable(); $table->string('slug')->nullable(); $table->string('tags', 500)->nullable(); $table->string('meta_keywords')->nullable(); $table->text('meta_description')->nullable(); $table->tinyInteger('is_published')->default(0); $table->tinyInteger('is_draft')->default(0); $table->string('thumbnail', 255)->nullable(); $table->date('publisheddate')->nullable(); $table->bigInteger('user_id')->unsigned()->nullable()->index(); $table->bigInteger('article_category_id')->unsigned()->nullable()->index(); $table->timestamps(); $table->softDeletes(); $table->index(['title','tags']); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('articles'); } };