-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from MikeLG909/main
Actualización v5
- Loading branch information
Showing
21 changed files
with
554 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
database/migrations/2024_06_13_162851_add_foreign_key_to_persona_table.php
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
database/migrations/2024_06_19_000820_crear_indice_aut.php
This file was deleted.
Oops, something went wrong.
29 changes: 29 additions & 0 deletions
29
database/migrations/2024_07_25_181054_create_solicitudes_acceso.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
Schema::create('solicitudes_acceso', function (Blueprint $table) { | ||
$table->increments('solicitud_acceso_id'); | ||
$table->integer('solicitante_id')->unsigned(); // Asegúrate de que sea del mismo tipo que usuario_id | ||
$table->foreign('solicitante_id')->references('usuario_id')->on('usuarios')->onDelete('cascade'); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
*/ | ||
public function down(): void | ||
{ | ||
Schema::dropIfExists('solicitudes_acceso'); | ||
} | ||
}; |
31 changes: 31 additions & 0 deletions
31
database/migrations/2024_07_25_181820_create_usuarios_acceso.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
Schema::create('usuarios_acceso', function (Blueprint $table) { | ||
$table->increments('usuarios_acceso_id'); | ||
$table->integer('solicitud_acceso_id')->unsigned(); | ||
$table->integer('usuario_id')->unsigned(); | ||
$table->foreign('solicitud_acceso_id')->references('solicitud_acceso_id')->on('solicitudes_acceso')->onDelete('cascade'); | ||
$table->foreign('usuario_id')->references('usuario_id')->on('usuarios')->onDelete('cascade'); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
*/ | ||
public function down(): void | ||
{ | ||
Schema::dropIfExists('usuarios_acceso'); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.