feat: sistema de notas clínicas para enfermero (ficha + notas libres) y fix lab_reportes métricas
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Migración: crea tabla lab_domicilio_notas
|
||||
* Ejecutar: php migrations/run_20260325_notas.php
|
||||
*/
|
||||
require_once __DIR__ . '/../config/config.php';
|
||||
require_once __DIR__ . '/../classes/Database.php';
|
||||
|
||||
$db = Database::getInstance()->getConnection();
|
||||
$sql = file_get_contents(__DIR__ . '/20260325_lab_12_domicilio_notas.sql');
|
||||
|
||||
// Ejecutar la sentencia CREATE TABLE
|
||||
try {
|
||||
$db->exec($sql);
|
||||
echo "✅ Tabla lab_domicilio_notas creada correctamente.\n";
|
||||
} catch (PDOException $e) {
|
||||
if (str_contains($e->getMessage(), 'already exists')) {
|
||||
echo "⚠️ La tabla ya existe (omitido).\n";
|
||||
} else {
|
||||
echo "❌ ERROR: " . $e->getMessage() . "\n";
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
echo "Migración completada.\n";
|
||||
Reference in New Issue
Block a user