D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
forge
/
hms.dentostock.com
/
database
/
migrations
/
Filename :
2020_03_03_113334_create_schedule_day_table.php
back
Copy
<?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('schedule_days', function (Blueprint $table) { $table->bigIncrements('id'); $table->unsignedBigInteger('doctor_id'); $table->unsignedInteger('schedule_id'); $table->string('available_on'); $table->time('available_from'); $table->time('available_to'); $table->timestamps(); $table->foreign('doctor_id')->references('id')->on('doctors') ->onDelete('cascade') ->onUpdate('cascade'); $table->foreign('schedule_id')->references('id')->on('schedules') ->onDelete('cascade') ->onUpdate('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('schedule_day'); } };