Path : /var/www/clients/client0/web25/web/database/migrations/ |
B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H |
Current File : /var/www/clients/client0/web25/web/database/migrations/2023_01_01_200701_create_posts_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('posts', function (Blueprint $table) { $table->engine = 'InnoDB'; $table->id(); $table->string('title'); $table->string('slug'); $table->string('seo_title'); $table->string('meta_description'); $table->string('meta_keywords'); $table->text('summary'); $table->text('content'); $table->foreignId('user_id')->constrained()->onDelete('cascade')->onUpdate('cascade'); $table->foreignId('category_id')->constrained()->onDelete('cascade')->onUpdate('cascade'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('posts'); } };