From 9818340cfd513652e009fe188d2117cc7feae955 Mon Sep 17 00:00:00 2001 From: sergiomarquez778 Date: Tue, 27 May 2025 21:54:33 -0600 Subject: [PATCH] Update 2014_10_12_000000_create_users_table.php --- .../2014_10_12_000000_create_users_table.php | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index 0edbbbc..3d93a50 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -19,25 +19,22 @@ return new class extends Migration $table->timestamp('email_verified_at')->nullable(); $table->string('apellido')->nullable(); $table->unsignedBigInteger('puesto_id')->nullable(); - $table->unsignedBigInteger('departamento_id')->nullable(); - + $table->unsignedBigInteger('tipos_id')->nullable(); $table->string('telefono')->nullable(); $table->string('password'); - $table->string('rol')->default('profesor'); $table->rememberToken(); $table->timestamps(); $table->foreign('puesto_id')->references('id')->on('puestos'); - $table->foreign('departamento_id')->references('id')->on('despartamentos'); - + $table->foreign('tipos_id')->references('id')->on('tipos'); }); DB::table('users')->insert([ [ 'name'=> 'Administrador', 'email'=> 'admin@admin.com', 'password'=> bcrypt('12345678'), - 'rol' => 'admin' + 'tipos_id' => 1 ], [ 'name' => 'silva', @@ -46,8 +43,8 @@ return new class extends Migration 'puesto_id' => 2, 'departamento_id' => 2, 'telefono' => '33652147821', - 'password' => bcrypt('12345678') - + 'password' => bcrypt('12345678'), + 'tipos_id' => 2 ], [ 'name' => 'monse', @@ -57,7 +54,7 @@ return new class extends Migration 'departamento_id' => 3, 'telefono' => null, 'password' => bcrypt('12345678'), - + 'tipos_id' => 1 ], [ 'name' => 'usuario_tipo3', @@ -67,7 +64,7 @@ return new class extends Migration 'departamento_id' => 1, 'telefono' => '3333333333', 'password' => bcrypt('12345678'), - + 'tipos_id' => 3 ], [ 'name' => 'usuario_tipo4', @@ -77,7 +74,7 @@ return new class extends Migration 'departamento_id' => 1, 'telefono' => '4444444444', 'password' => bcrypt('12345678'), - + 'tipos_id' => 4 ], ]); }