diff --git a/composer.lock b/composer.lock index 0e912d4..0095894 100644 --- a/composer.lock +++ b/composer.lock @@ -8966,5 +8966,5 @@ "php": "^8.0.2" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.2.0" } diff --git a/database/migrations/2022_09_22_152240_create_personas.php b/database/migrations/2022_09_22_152240_create_personas.php index 6ff4148..d20801c 100644 --- a/database/migrations/2022_09_22_152240_create_personas.php +++ b/database/migrations/2022_09_22_152240_create_personas.php @@ -24,7 +24,7 @@ public function up() $table->boolean('donante'); $table->date('fecha_nac'); $table->Integer('id_tipo_sangre')->unsigned(); - $table->foreign('id_tipo_sangre')->references('id_tipo_sangre')->on('tipo_sangre'); + $table->foreign('id_tipo_sangre')->references('id_tipo_sangre')->on('tipos_sangre'); $table->timestamps(); }); } diff --git a/database/migrations/2022_09_26_151715_create_citas.php b/database/migrations/2022_09_26_151715_create_citas.php index e40b078..a031b81 100644 --- a/database/migrations/2022_09_26_151715_create_citas.php +++ b/database/migrations/2022_09_26_151715_create_citas.php @@ -17,9 +17,10 @@ public function up() $table->increments('id_cita'); $table->dateTime('fecha_cita'); $table->string('detalles_cita'); - $table->Integer('id_secretaria')->unsigned(); + //TODO: arreglar el nullable + $table->Integer('id_secretaria')->unsigned()->nullable(); $table->foreign('id_secretaria')->references('id')->on('users'); - $table->Integer('id_paciente')->unsigned(); + $table->Integer('id_paciente')->unsigned()->nullable(); $table->foreign('id_paciente')->references('id')->on('users'); $table->timestamps(); });