diff --git a/app/Models/User.php b/app/Models/User.php index c76378f842ddbf933a6b45e885d08e2b32e06c01..329c5a6d086419d7bc7e5fec596aba6d52ef892e 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -30,7 +30,7 @@ class User extends Authenticatable * * @var array */ - protected $fillable = ['name', 'email', 'password', 'document', 'type', 'status', 'curso_id', 'unidade_id']; + protected $fillable = ['name', 'email', 'password', 'document', 'type', 'status', 'curso_id', 'campus_id']; /** * The attributes that should be hidden for serialization. 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 88e370a028dd0cc4bb6632f6e685d95c8a1ec9aa..3b649107fde05a7e48d45c75e3a4418a4325685d 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -23,7 +23,7 @@ class CreateUsersTable extends Migration $table->string('document'); $table->tinyInteger('status'); $table->foreignId('curso_id')->nullable(); - $table->foreignId('unidade_id')->nullable(); + $table->foreignId('campus_id')->nullable(); $table->rememberToken(); $table->timestamps(); $table->softDeletes(); diff --git a/database/migrations/2022_02_02_014728_create_curso_in_users_table.php b/database/migrations/2022_02_02_014728_create_curso_in_users_table.php deleted file mode 100644 index 724bdb2e12f75ac066970e439304a8ad8c682cd7..0000000000000000000000000000000000000000 --- a/database/migrations/2022_02_02_014728_create_curso_in_users_table.php +++ /dev/null @@ -1,32 +0,0 @@ -foreignId('curso_id')->nullable(); - // }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - // if(Schema::hasColumn('users', 'curso_id')) { - // Schema::dropColumns('users', ['curso_id']); - // } - } -} diff --git a/database/migrations/2022_02_22_021925_remove_field_curso_id.php b/database/migrations/2022_02_22_021925_remove_field_curso_id.php deleted file mode 100644 index 409d5f2d493860d255b18e9141ed87cc54aa3ddc..0000000000000000000000000000000000000000 --- a/database/migrations/2022_02_22_021925_remove_field_curso_id.php +++ /dev/null @@ -1,28 +0,0 @@ -foreignId('unidade_id')->nullable(); - // }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - // if(Schema::hasColumn('users', 'unidade_id')) { - // Schema::dropColumns('users', ['unidade_id']); - // } - } -} diff --git a/database/seeders/UserSeeder.php b/database/seeders/UserSeeder.php index 094198562831361f649d0f84d7d4e82902172374..09905ff4ebc9b1353b2b4cbd99cd64a4e9bf3bf0 100644 --- a/database/seeders/UserSeeder.php +++ b/database/seeders/UserSeeder.php @@ -30,7 +30,7 @@ class UserSeeder extends Seeder 'password' => Hash::make('@professor'), 'document' => "00000000{$id}", 'status' => User::STATUS_ACTIVE, - 'unidade_id' => 3, + 'campus_id' => 3, 'curso_id' => 1, ]); } @@ -44,7 +44,7 @@ class UserSeeder extends Seeder 'password' => Hash::make('12345678'), 'document' => "100000000", 'status' => User::STATUS_ACTIVE, - 'unidade_id' => NULL, + 'campus_id' => NULL, 'curso_id' => NULL, ]); }