%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/vacivi36/core/database/migrations/
Upload File :
Create Path :
Current File : /home/vacivi36/core/database/migrations/2024_10_31_000006_create_schedules_table.php

<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSchedulesTable extends Migration
{
    public function up()
    {
        Schema::create('schedules', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('patient_id');
            $table->date('schedule_date'); // Data de agendamento principal
            $table->text('notes')->nullable(); // Observações sobre o agendamento
            $table->timestamps();
            $table->softDeletes();

            // Chave estrangeira para paciente
            $table->foreign('patient_id')->references('id')->on('patients')->onDelete('restrict');
        });
    }

    public function down()
    {
        Schema::dropIfExists('schedules');
    }
}

Zerion Mini Shell 1.0