D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
forge
/
hms.dentostock.com
/
database
/
migrations
/
Filename :
2020_02_18_092202_create_documents_table.php
back
Copy
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; return new class extends Migration { /** * Run the migrations. */ public function up(): void { Schema::create('documents', function (Blueprint $table) { $table->increments('id'); $table->string('title'); $table->integer('document_type_id'); $table->integer('patient_id'); $table->unsignedBigInteger('uploaded_by'); $table->timestamps(); $table->foreign('uploaded_by')->references('id')->on('users') ->onDelete('cascade') ->onUpdate('cascade'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::drop('documents'); } };