<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddSpo2StatusToPatientVitals extends Migration
{
    public function up()
    {
        Schema::table('patient_vitals', function (Blueprint $table) {
            $table->json('spo2_status')->nullable()->after('temperature');
            $table->timestamp('created_at')->nullable()->after('spo2_status');
        });
    }

    public function down()
    {
        Schema::table('patient_vitals', function (Blueprint $table) {
            $table->dropColumn(['spo2_status', 'created_at']);
        });
    }
}   