D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
forge
/
shaghela.online
/
database
/
migrations
/
Filename :
2022_03_03_091112_create_service_faqs_table.php
back
Copy
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateServiceFaqsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('service_faqs', function (Blueprint $table) { $table->id(); $table->string('title', 100)->nullable(); $table->text('description')->nullable(); $table->unsignedBigInteger('service_id')->nullable(); $table->tinyInteger('status')->nullable()->default('1')->comment('1- Active , 0- InActive'); $table->foreign('service_id')->references('id')->on('services')->onDelete('cascade'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('service_faqs'); } }