Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Walter Felipe
pad-upe
Commits
40390e35
Commit
40390e35
authored
May 22, 2022
by
Abraão Barbosa
Browse files
change unidade_id field to campus_id in users table
parent
2dde2092
Changes
6
Hide whitespace changes
Inline
Side-by-side
app/Models/User.php
View file @
40390e35
...
@@ -30,7 +30,7 @@ class User extends Authenticatable
...
@@ -30,7 +30,7 @@ class User extends Authenticatable
*
*
* @var array<int, string>
* @var array<int, string>
*/
*/
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.
* The attributes that should be hidden for serialization.
...
...
database/migrations/2014_10_12_000000_create_users_table.php
View file @
40390e35
...
@@ -23,7 +23,7 @@ class CreateUsersTable extends Migration
...
@@ -23,7 +23,7 @@ class CreateUsersTable extends Migration
$table
->
string
(
'document'
);
$table
->
string
(
'document'
);
$table
->
tinyInteger
(
'status'
);
$table
->
tinyInteger
(
'status'
);
$table
->
foreignId
(
'curso_id'
)
->
nullable
();
$table
->
foreignId
(
'curso_id'
)
->
nullable
();
$table
->
foreignId
(
'
unidade
_id'
)
->
nullable
();
$table
->
foreignId
(
'
campus
_id'
)
->
nullable
();
$table
->
rememberToken
();
$table
->
rememberToken
();
$table
->
timestamps
();
$table
->
timestamps
();
$table
->
softDeletes
();
$table
->
softDeletes
();
...
...
database/migrations/2022_02_02_014728_create_curso_in_users_table.php
deleted
100644 → 0
View file @
2dde2092
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreateCursoInUsersTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
// Schema::table('users', function (Blueprint $table) {
// $table->foreignId('curso_id')->nullable();
// });
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
// if(Schema::hasColumn('users', 'curso_id')) {
// Schema::dropColumns('users', ['curso_id']);
// }
}
}
database/migrations/2022_02_22_021925_remove_field_curso_id.php
deleted
100644 → 0
View file @
2dde2092
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
RemoveFieldCursoId
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
//
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
//
}
}
database/migrations/2022_03_11_131811_create_unidade_in_users_table.php
deleted
100644 → 0
View file @
2dde2092
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreateUnidadeInUsersTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
// Schema::create('users', function (Blueprint $table) {
// $table->foreignId('unidade_id')->nullable();
// });
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
// if(Schema::hasColumn('users', 'unidade_id')) {
// Schema::dropColumns('users', ['unidade_id']);
// }
}
}
database/seeders/UserSeeder.php
View file @
40390e35
...
@@ -30,7 +30,7 @@ class UserSeeder extends Seeder
...
@@ -30,7 +30,7 @@ class UserSeeder extends Seeder
'password'
=>
Hash
::
make
(
'@professor'
),
'password'
=>
Hash
::
make
(
'@professor'
),
'document'
=>
"00000000
{
$id
}
"
,
'document'
=>
"00000000
{
$id
}
"
,
'status'
=>
User
::
STATUS_ACTIVE
,
'status'
=>
User
::
STATUS_ACTIVE
,
'
unidade
_id'
=>
3
,
'
campus
_id'
=>
3
,
'curso_id'
=>
1
,
'curso_id'
=>
1
,
]);
]);
}
}
...
@@ -44,7 +44,7 @@ class UserSeeder extends Seeder
...
@@ -44,7 +44,7 @@ class UserSeeder extends Seeder
'password'
=>
Hash
::
make
(
'12345678'
),
'password'
=>
Hash
::
make
(
'12345678'
),
'document'
=>
"100000000"
,
'document'
=>
"100000000"
,
'status'
=>
User
::
STATUS_ACTIVE
,
'status'
=>
User
::
STATUS_ACTIVE
,
'
unidade
_id'
=>
NULL
,
'
campus
_id'
=>
NULL
,
'curso_id'
=>
NULL
,
'curso_id'
=>
NULL
,
]);
]);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment