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
submeta
Commits
5250d353
Unverified
Commit
5250d353
authored
May 29, 2020
by
Gabriel Antônio da Silva
Committed by
GitHub
May 29, 2020
Browse files
Merge pull request #5 from lmts-ufape/submeter
Funcionalidades básicas
parents
5de5a599
96ffb16f
Changes
109
Hide whitespace changes
Inline
Side-by-side
database/migrations/2020_02_06_132418_chaves_estrangeiras.php
View file @
5250d353
...
...
@@ -16,18 +16,18 @@ class ChavesEstrangeiras extends Migration
//------------------------------------------------------------------------
Schema
::
table
(
'areas'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'eventoId'
)
->
references
(
'id'
)
->
on
(
'eventos'
);
});
//
Schema::table('areas', function (Blueprint $table) {
//
$table->foreign('eventoId')->references('id')->on('eventos');
//
});
//------------------------------------------------------------------------
//
//------------------------------------------------------------------------
Schema
::
table
(
'area_modalidades'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'areaId'
)
->
references
(
'id'
)
->
on
(
'areas'
);
});
Schema
::
table
(
'area_modalidades'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'modalidadeId'
)
->
references
(
'id'
)
->
on
(
'modalidades'
);
});
//
Schema::table('area_modalidades', function (Blueprint $table) {
//
$table->foreign('areaId')->references('id')->on('areas');
//
});
//
Schema::table('area_modalidades', function (Blueprint $table) {
//
$table->foreign('modalidadeId')->references('id')->on('modalidades');
//
});
//------------------------------------------------------------------------
...
...
@@ -61,9 +61,7 @@ class ChavesEstrangeiras extends Migration
//------------------------------------------------------------------------
Schema
::
table
(
'eventos'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'enderecoId'
)
->
references
(
'id'
)
->
on
(
'enderecos'
);
});
Schema
::
table
(
'eventos'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'coordenadorId'
)
->
references
(
'id'
)
->
on
(
'users'
);
});
...
...
@@ -85,9 +83,9 @@ class ChavesEstrangeiras extends Migration
//------------------------------------------------------------------------
Schema
::
table
(
'pertences'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'areaId'
)
->
references
(
'id'
)
->
on
(
'areas'
);
});
//
Schema::table('pertences', function (Blueprint $table) {
//
$table->foreign('areaId')->references('id')->on('areas');
//
});
Schema
::
table
(
'pertences'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'revisorId'
)
->
references
(
'id'
)
->
on
(
'users'
);
});
...
...
@@ -103,39 +101,39 @@ class ChavesEstrangeiras extends Migration
//------------------------------------------------------------------------
Schema
::
table
(
'trabalhos'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'modalidadeId'
)
->
references
(
'id'
)
->
on
(
'modalidades'
);
});
Schema
::
table
(
'trabalhos'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'areaId'
)
->
references
(
'id'
)
->
on
(
'areas'
);
});
Schema
::
table
(
'trabalhos'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'autorId'
)
->
references
(
'id'
)
->
on
(
'users'
);
});
Schema
::
table
(
'trabalhos'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'eventoId'
)
->
references
(
'id'
)
->
on
(
'eventos'
);
});
//
Schema::table('trabalhos', function (Blueprint $table) {
//
$table->foreign('modalidadeId')->references('id')->on('modalidades');
//
});
//
Schema::table('trabalhos', function (Blueprint $table) {
//
$table->foreign('areaId')->references('id')->on('areas');
//
});
//
Schema::table('trabalhos', function (Blueprint $table) {
//
$table->foreign('autorId')->references('id')->on('users');
//
});
//
Schema::table('trabalhos', function (Blueprint $table) {
//
$table->foreign('eventoId')->references('id')->on('eventos');
//
});
//------------------------------------------------------------------------
Schema
::
table
(
'users'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'enderecoId'
)
->
references
(
'id'
)
->
on
(
'enderecos'
);
});
//
Schema::table('users', function (Blueprint $table) {
//
$table->foreign('enderecoId')->references('id')->on('enderecos');
//
});
//------------------------------------------------------------------------
Schema
::
table
(
'revisors'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'revisorId'
)
->
references
(
'id'
)
->
on
(
'users'
);
});
Schema
::
table
(
'revisors'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'eventoId'
)
->
references
(
'id'
)
->
on
(
'eventos'
);
});
Schema
::
table
(
'revisors'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'areaId'
)
->
references
(
'id'
)
->
on
(
'areas'
);
});
Schema
::
table
(
'eventos'
,
function
(
Blueprint
$table
){
$table
->
foreign
(
'coordComissaoId'
)
->
references
(
'id'
)
->
on
(
'users'
);
});
//
Schema::table('revisors', function (Blueprint $table) {
//
$table->foreign('revisorId')->references('id')->on('users');
//
});
//
Schema::table('revisors', function (Blueprint $table) {
//
$table->foreign('eventoId')->references('id')->on('eventos');
//
});
//
Schema::table('revisors', function (Blueprint $table) {
//
$table->foreign('areaId')->references('id')->on('areas');
//
});
//
Schema::table('eventos',function (Blueprint $table){
//
$table->foreign('coordComissaoId')->references('id')->on('users');
//
});
//------------------------------------------------------------------------
}
...
...
database/migrations/2020_05_20_163253_create_administradors_table.php
0 → 100644
View file @
5250d353
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreateAdministradorsTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'administradors'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
string
(
'matricula'
)
->
unique
();
$table
->
timestamps
();
$table
->
unsignedBigInteger
(
'user_id'
);
$table
->
foreign
(
'user_id'
)
->
references
(
'id'
)
->
on
(
'users'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'administradors'
);
}
}
database/migrations/2020_05_20_211421_create_proponentes_table.php
0 → 100644
View file @
5250d353
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreateProponentesTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'proponentes'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
//$table->string('CPF');
$table
->
string
(
'SIAPE'
);
//$table->string('email')->unique();
$table
->
string
(
'cargo'
);
$table
->
string
(
'vinculo'
);
$table
->
string
(
'titulacaoMaxima'
);
$table
->
string
(
'anoTitulacao'
);
$table
->
string
(
'grandeArea'
);
$table
->
string
(
'area'
);
$table
->
string
(
'subArea'
);
$table
->
string
(
'bolsistaProdutividade'
);
$table
->
string
(
'nivel'
);
$table
->
string
(
'linkLattes'
);
$table
->
timestamps
();
$table
->
unsignedBigInteger
(
'user_id'
);
$table
->
foreign
(
'user_id'
)
->
references
(
'id'
)
->
on
(
'users'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'proponentes'
);
}
}
database/migrations/2020_05_21_020029_create_plano_trabalhos_table.php
0 → 100644
View file @
5250d353
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreatePlanoTrabalhosTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'plano_trabalhos'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
string
(
'titulo'
);
$table
->
string
(
'anexoPlanoTrabalho'
);
$table
->
timestamps
();
$table
->
unsignedBigInteger
(
'trabalho_id'
);
$table
->
foreign
(
'trabalho_id'
)
->
references
(
'id'
)
->
on
(
'trabalhos'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'plano_trabalhos'
);
}
}
database/migrations/2020_05_21_025543_create_administrador_responsavels_table.php
0 → 100644
View file @
5250d353
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreateAdministradorResponsavelsTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'administrador_responsavels'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
timestamps
();
$table
->
unsignedBigInteger
(
'user_id'
);
$table
->
foreign
(
'user_id'
)
->
references
(
'id'
)
->
on
(
'users'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'administrador_responsavels'
);
}
}
database/migrations/2020_05_22_031644_create_grande_areas_table.php
0 → 100644
View file @
5250d353
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreateGrandeAreasTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'grande_areas'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
string
(
'nome'
);
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'grande_areas'
);
}
}
database/migrations/2020_05_22_031838_create_sub_areas_table.php
0 → 100644
View file @
5250d353
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreateSubAreasTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'sub_areas'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
string
(
"nome"
);
$table
->
timestamps
();
$table
->
unsignedBigInteger
(
'area_id'
);
$table
->
foreign
(
'area_id'
)
->
references
(
'id'
)
->
on
(
'areas'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'sub_areas'
);
}
}
database/migrations/2020_05_22_044450_create_funcao_participantes_table.php
0 → 100644
View file @
5250d353
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreateFuncaoParticipantesTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'funcao_participantes'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
string
(
'nome'
);
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'funcao_participantes'
);
}
}
database/migrations/2020_05_23_054649_create_coordenador_comissaos_table.php
0 → 100644
View file @
5250d353
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreateCoordenadorComissaosTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'coordenador_comissaos'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
timestamps
();
$table
->
unsignedBigInteger
(
'user_id'
);
$table
->
foreign
(
'user_id'
)
->
references
(
'id'
)
->
on
(
'users'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'coordenador_comissaos'
);
}
}
database/migrations/2020_05_23_054805_create_avaliadors_table.php
0 → 100644
View file @
5250d353
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreateAvaliadorsTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'avaliadors'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
timestamps
();
$table
->
unsignedBigInteger
(
'user_id'
)
->
nullable
();
$table
->
foreign
(
'user_id'
)
->
references
(
'id'
)
->
on
(
'users'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'avaliadors'
);
}
}
database/migrations/2020_05_23_054945_create_participantes_table.php
0 → 100644
View file @
5250d353
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreateParticipantesTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'participantes'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
timestamps
();
$table
->
unsignedBigInteger
(
'user_id'
)
->
nullable
();
$table
->
foreign
(
'user_id'
)
->
references
(
'id'
)
->
on
(
'users'
);
$table
->
unsignedBigInteger
(
'trabalho_id'
)
->
nullable
();
$table
->
foreign
(
'trabalho_id'
)
->
references
(
'id'
)
->
on
(
'trabalhos'
);
$table
->
unsignedBigInteger
(
'funcao_participante_id'
)
->
nullable
();
$table
->
foreign
(
'funcao_participante_id'
)
->
references
(
'id'
)
->
on
(
'funcao_participantes'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'participantes'
);
}
}
database/migrations/2020_05_23_071949_add_foreign_to_trabalhos_table.php
0 → 100644
View file @
5250d353
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
AddForeignToTrabalhosTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
table
(
'trabalhos'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'grande_area_id'
)
->
references
(
'id'
)
->
on
(
'grande_areas'
);
$table
->
foreign
(
'area_id'
)
->
references
(
'id'
)
->
on
(
'areas'
);
$table
->
foreign
(
'sub_area_id'
)
->
references
(
'id'
)
->
on
(
'sub_areas'
);
$table
->
foreign
(
'evento_id'
)
->
references
(
'id'
)
->
on
(
'eventos'
);
$table
->
foreign
(
'coordenador_id'
)
->
references
(
'id'
)
->
on
(
'coordenador_comissaos'
);
//$table->foreignId('user_id')->constrained();
// $table->integer('coordenador');
// $table->integer('grandeArea_id');
// $table->integer('area');
// $table->integer('subArea');
// $table->integer('eventoId');
// $table->integer('proponente_id');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
table
(
'trabalhos'
,
function
(
Blueprint
$table
)
{
//
});
}
}
database/migrations/2020_05_23_182520_create_trabalhos_participantes_table.php
0 → 100644
View file @
5250d353
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreateTrabalhosParticipantesTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'trabalho_participante'
,
function
(
Blueprint
$table
)
{
$table
->
unsignedBigInteger
(
'trabalho_id'
);
$table
->
unsignedBigInteger
(
'participante_id'
);
$table
->
foreign
(
'trabalho_id'
)
->
references
(
'id'
)
->
on
(
'trabalhos'
);
$table
->
foreign
(
'participante_id'
)
->
references
(
'id'
)
->
on
(
'participantes'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'trabalho_participante'
);
}
}
database/migrations/2020_05_23_182551_create_trabalhos_proponentes_table.php
0 → 100644
View file @
5250d353
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreateTrabalhosProponentesTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'trabalho_proponente'
,
function
(
Blueprint
$table
)
{
$table
->
unsignedBigInteger
(
'trabalho_id'
);
$table
->
unsignedBigInteger
(
'proponente_id'
);
$table
->
foreign
(
'trabalho_id'
)
->
references
(
'id'
)
->
on
(
'trabalhos'
);
$table
->
foreign
(
'proponente_id'
)
->
references
(
'id'
)
->
on
(
'proponentes'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'trabalho_proponente'
);
}
}
database/migrations/2020_05_25_193809_add_grande_areas_area_table.php
0 → 100644
View file @
5250d353
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
AddGrandeAreasAreaTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
table
(
'areas'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'grande_area_id'
)
->
references
(
'id'
)
->
on
(
'grande_areas'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
table
(
'areas'
,
function
(
Blueprint
$table
)
{
//
});
}
}
database/migrations/2020_05_26_223341_create_avaliadors_trabalhos_table.php
0 → 100644
View file @
5250d353
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreateAvaliadorsTrabalhosTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'avaliador_trabalho'
,
function
(
Blueprint
$table
)
{
$table
->
unsignedBigInteger
(
'trabalho_id'
);
$table
->
unsignedBigInteger
(
'avaliador_id'
);
$table
->
foreign
(
'trabalho_id'
)
->
references
(
'id'
)
->
on
(
'trabalhos'
);
$table
->
foreign
(
'avaliador_id'
)
->
references
(
'id'
)
->
on
(
'avaliadors'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'avaliador_trabalho'
);
}
}
database/seeds/AdministradorResponsavelSeeder.php
0 → 100644
View file @
5250d353
<?php
use
Illuminate\Database\Seeder
;
use
Illuminate\Support\Facades\DB
;
class
AdministradorResponsavelSeeder
extends
Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public
function
run
()
{
$user_id
=
DB
::
table
(
'users'
)
->
where
(
'name'
,
'AdministradorResponsavel1'
)
->
pluck
(
'id'
);
DB
::
table
(
'administrador_responsavels'
)
->
insert
([
'user_id'
=>
$user_id
[
0
],
]);
$user_id
=
DB
::
table
(
'users'
)
->
where
(
'name'
,
'AdministradorResponsavel2'
)
->
pluck
(
'id'
);
DB
::
table
(
'administrador_responsavels'
)
->
insert
([
'user_id'
=>
$user_id
[
0
],
]);
}
}
database/seeds/AdministradorSeeder.php
0 → 100644
View file @
5250d353
<?php
use
Illuminate\Database\Seeder
;
use
Illuminate\Support\Facades\DB
;
class
AdministradorSeeder
extends
Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public
function
run
()
{
$user_id
=
DB
::
table
(
'users'
)
->
where
(
'name'
,
'Administrador'
)
->
pluck
(
'id'
);
DB
::
table
(
'administradors'
)
->
insert
([
'matricula'
=>
'123456789'
,
'user_id'
=>
$user_id
[
0
],
]);
}
}
database/seeds/AreaSeeder.php
0 → 100644
View file @
5250d353
<?php
use
Illuminate\Database\Seeder
;
class
AreaSeeder
extends
Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public
function
run
()
{
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Matemática'
,
'grande_area_id'
=>
'1'
]);
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Probabilidade e Estatística'
,
'grande_area_id'
=>
'1'
]);
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Ciência da Computação'
,
'grande_area_id'
=>
'1'
]);
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Astronomia'
,
'grande_area_id'
=>
'1'
]);
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Física'
,
'grande_area_id'
=>
'1'
]);
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Química'
,
'grande_area_id'
=>
'1'
]);
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'GeoCiências'
,
'grande_area_id'
=>
'1'
]);
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Oceanografia'
,
'grande_area_id'
=>
'1'
]);
// Ciências Biológicas ----------------------
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Biologia Geral'
,
'grande_area_id'
=>
'2'
]);
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Genética'
,
'grande_area_id'
=>
'2'
]);
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Botânica'
,
'grande_area_id'
=>
'2'
]);
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Zoologia'
,
'grande_area_id'
=>
'2'
]);
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Ecologia'
,
'grande_area_id'
=>
'2'
]);
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Morfologia'
,
'grande_area_id'
=>
'2'
]);
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Bioquímica'
,
'grande_area_id'
=>
'2'
]);
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Fisiologia'
,
'grande_area_id'
=>
'2'
]);
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Biofísica'
,
'grande_area_id'
=>
'2'
]);
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Farmacologia'
,
'grande_area_id'
=>
'2'
]);
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Imunologia'
,
'grande_area_id'
=>
'2'
]);
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Microbiologia'
,
'grande_area_id'
=>
'2'
]);
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Parasitologia'
,
'grande_area_id'
=>
'2'
]);
//Engenharias --------------------
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Engenharia Civil'
,
'grande_area_id'
=>
'3'
]);
// Ciências da Saúde -----------------
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Medicina'
,
'grande_area_id'
=>
'4'
]);
//Ciências Agrárias ------------------
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Agronomia'
,
'grande_area_id'
=>
'5'
]);
//Ciências Sociais Aplicadas ----------
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Direito'
,
'grande_area_id'
=>
'6'
]);
//Ciências Humanas ----------------------
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Filosofia'
,
'grande_area_id'
=>
'7'
]);
//Lingüística, Letras e Artes-----------
DB
::
table
(
'areas'
)
->
insert
([
'nome'
=>
'Lingüística'
,
'grande_area_id'
=>
'8'
]);
}
}
database/seeds/CoordenadorComissaoSeeder.php
0 → 100644
View file @
5250d353
<?php
use
Illuminate\Database\Seeder
;
class
CoordenadorComissaoSeeder
extends
Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public
function
run
()
{
$user_id
=
DB
::
table
(
'users'
)
->
where
(
'name'
,
'Coordenador1'
)
->
pluck
(
'id'
);
DB
::
table
(
'coordenador_comissaos'
)
->
insert
([
'user_id'
=>
$user_id
[
0
],
]);
$user_id
=
DB
::
table
(
'users'
)
->
where
(
'name'
,
'Coordenador2'
)
->
pluck
(
'id'
);
DB
::
table
(
'coordenador_comissaos'
)
->
insert
([
'user_id'
=>
$user_id
[
0
],
]);
}
}
Prev
1
2
3
4
5
6
Next
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