Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
5 years ago
by
Gabriel Antônio da Silva
Committed by
GitHub
5 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #5 from lmts-ufape/submeter
Funcionalidades básicas
parents
5de5a599
96ffb16f
master
beta
carl-branch
carlos
dependabot/composer/dompdf/dompdf-1.2.2
dependabot/composer/guzzlehttp/guzzle-6.5.8
dependabot/composer/guzzlehttp/psr7-1.8.5
dependabot/composer/symfony/http-kernel-4.4.50
dependabot/npm_and_yarn/axios-0.21.2
dependabot/npm_and_yarn/decode-uri-component-0.2.2
dependabot/npm_and_yarn/express-4.18.2
dependabot/npm_and_yarn/json5-and-json5-2.2.3
dependabot/npm_and_yarn/loader-utils-and-webpack-cli-1.4.2
dependabot/npm_and_yarn/minimist-and-mkdirp-1.2.8
dependabot/npm_and_yarn/qs-and-express-6.11.0
editarProjeto
excluir_projeto_submetido
fixCorrecoes
fixQtdParticipante
fixRascunho
master-test
minha_conta
modificacoes_aviso
modificacoes_layout_6
modificacoes_layout_7
modificacoes_layout_8
modificacoes_layout_9
modificacoes_layout_igor
modificacoes_layout_minha_conta
modificacoes_perfil_avaliador
updates_mar
No related merge requests found
Changes
109
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
database/migrations/2020_02_06_132418_chaves_estrangeiras.php
+41
-43
...base/migrations/2020_02_06_132418_chaves_estrangeiras.php
database/migrations/2020_05_20_163253_create_administradors_table.php
+36
-0
...rations/2020_05_20_163253_create_administradors_table.php
database/migrations/2020_05_20_211421_create_proponentes_table.php
+48
-0
...migrations/2020_05_20_211421_create_proponentes_table.php
database/migrations/2020_05_21_020029_create_plano_trabalhos_table.php
+36
-0
...ations/2020_05_21_020029_create_plano_trabalhos_table.php
database/migrations/2020_05_21_025543_create_administrador_responsavels_table.php
+34
-0
..._05_21_025543_create_administrador_responsavels_table.php
database/migrations/2020_05_22_031644_create_grande_areas_table.php
+32
-0
...igrations/2020_05_22_031644_create_grande_areas_table.php
database/migrations/2020_05_22_031838_create_sub_areas_table.php
+36
-0
...e/migrations/2020_05_22_031838_create_sub_areas_table.php
database/migrations/2020_05_22_044450_create_funcao_participantes_table.php
+34
-0
...s/2020_05_22_044450_create_funcao_participantes_table.php
database/migrations/2020_05_23_054649_create_coordenador_comissaos_table.php
+34
-0
.../2020_05_23_054649_create_coordenador_comissaos_table.php
database/migrations/2020_05_23_054805_create_avaliadors_table.php
+34
-0
.../migrations/2020_05_23_054805_create_avaliadors_table.php
database/migrations/2020_05_23_054945_create_participantes_table.php
+39
-0
...grations/2020_05_23_054945_create_participantes_table.php
database/migrations/2020_05_23_071949_add_foreign_to_trabalhos_table.php
+45
-0
...ions/2020_05_23_071949_add_foreign_to_trabalhos_table.php
database/migrations/2020_05_23_182520_create_trabalhos_participantes_table.php
+34
-0
...020_05_23_182520_create_trabalhos_participantes_table.php
database/migrations/2020_05_23_182551_create_trabalhos_proponentes_table.php
+34
-0
.../2020_05_23_182551_create_trabalhos_proponentes_table.php
database/migrations/2020_05_25_193809_add_grande_areas_area_table.php
+32
-0
...rations/2020_05_25_193809_add_grande_areas_area_table.php
database/migrations/2020_05_26_223341_create_avaliadors_trabalhos_table.php
+34
-0
...s/2020_05_26_223341_create_avaliadors_trabalhos_table.php
database/seeds/AdministradorResponsavelSeeder.php
+29
-0
database/seeds/AdministradorResponsavelSeeder.php
database/seeds/AdministradorSeeder.php
+22
-0
database/seeds/AdministradorSeeder.php
database/seeds/AreaSeeder.php
+166
-0
database/seeds/AreaSeeder.php
database/seeds/CoordenadorComissaoSeeder.php
+26
-0
database/seeds/CoordenadorComissaoSeeder.php
with
826 additions
and
43 deletions
+826
-43
database/migrations/2020_02_06_132418_chaves_estrangeiras.php
View file @
5250d353
...
@@ -16,18 +16,18 @@ class ChavesEstrangeiras extends Migration
...
@@ -16,18 +16,18 @@ class ChavesEstrangeiras extends Migration
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Schema
::
table
(
'areas'
,
function
(
Blueprint
$table
)
{
//
Schema::table('areas', function (Blueprint $table) {
$table
->
foreign
(
'eventoId'
)
->
references
(
'id'
)
->
on
(
'eventos'
);
//
$table->foreign('eventoId')->references('id')->on('eventos');
});
//
});
//------------------------------------------------------------------------
//
//------------------------------------------------------------------------
Schema
::
table
(
'area_modalidades'
,
function
(
Blueprint
$table
)
{
//
Schema::table('area_modalidades', function (Blueprint $table) {
$table
->
foreign
(
'areaId'
)
->
references
(
'id'
)
->
on
(
'areas'
);
//
$table->foreign('areaId')->references('id')->on('areas');
});
//
});
Schema
::
table
(
'area_modalidades'
,
function
(
Blueprint
$table
)
{
//
Schema::table('area_modalidades', function (Blueprint $table) {
$table
->
foreign
(
'modalidadeId'
)
->
references
(
'id'
)
->
on
(
'modalidades'
);
//
$table->foreign('modalidadeId')->references('id')->on('modalidades');
});
//
});
//------------------------------------------------------------------------
//------------------------------------------------------------------------
...
@@ -61,9 +61,7 @@ class ChavesEstrangeiras extends Migration
...
@@ -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
)
{
Schema
::
table
(
'eventos'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'coordenadorId'
)
->
references
(
'id'
)
->
on
(
'users'
);
$table
->
foreign
(
'coordenadorId'
)
->
references
(
'id'
)
->
on
(
'users'
);
});
});
...
@@ -85,9 +83,9 @@ class ChavesEstrangeiras extends Migration
...
@@ -85,9 +83,9 @@ class ChavesEstrangeiras extends Migration
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Schema
::
table
(
'pertences'
,
function
(
Blueprint
$table
)
{
//
Schema::table('pertences', function (Blueprint $table) {
$table
->
foreign
(
'areaId'
)
->
references
(
'id'
)
->
on
(
'areas'
);
//
$table->foreign('areaId')->references('id')->on('areas');
});
//
});
Schema
::
table
(
'pertences'
,
function
(
Blueprint
$table
)
{
Schema
::
table
(
'pertences'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'revisorId'
)
->
references
(
'id'
)
->
on
(
'users'
);
$table
->
foreign
(
'revisorId'
)
->
references
(
'id'
)
->
on
(
'users'
);
});
});
...
@@ -103,39 +101,39 @@ class ChavesEstrangeiras extends Migration
...
@@ -103,39 +101,39 @@ class ChavesEstrangeiras extends Migration
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Schema
::
table
(
'trabalhos'
,
function
(
Blueprint
$table
)
{
//
Schema::table('trabalhos', function (Blueprint $table) {
$table
->
foreign
(
'modalidadeId'
)
->
references
(
'id'
)
->
on
(
'modalidades'
);
//
$table->foreign('modalidadeId')->references('id')->on('modalidades');
});
//
});
Schema
::
table
(
'trabalhos'
,
function
(
Blueprint
$table
)
{
//
Schema::table('trabalhos', function (Blueprint $table) {
$table
->
foreign
(
'areaId'
)
->
references
(
'id'
)
->
on
(
'areas'
);
//
$table->foreign('areaId')->references('id')->on('areas');
});
//
});
Schema
::
table
(
'trabalhos'
,
function
(
Blueprint
$table
)
{
//
Schema::table('trabalhos', function (Blueprint $table) {
$table
->
foreign
(
'autorId'
)
->
references
(
'id'
)
->
on
(
'users'
);
//
$table->foreign('autorId')->references('id')->on('users');
});
//
});
Schema
::
table
(
'trabalhos'
,
function
(
Blueprint
$table
)
{
//
Schema::table('trabalhos', function (Blueprint $table) {
$table
->
foreign
(
'eventoId'
)
->
references
(
'id'
)
->
on
(
'eventos'
);
//
$table->foreign('eventoId')->references('id')->on('eventos');
});
//
});
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Schema
::
table
(
'users'
,
function
(
Blueprint
$table
)
{
//
Schema::table('users', function (Blueprint $table) {
$table
->
foreign
(
'enderecoId'
)
->
references
(
'id'
)
->
on
(
'enderecos'
);
//
$table->foreign('enderecoId')->references('id')->on('enderecos');
});
//
});
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Schema
::
table
(
'revisors'
,
function
(
Blueprint
$table
)
{
//
Schema::table('revisors', function (Blueprint $table) {
$table
->
foreign
(
'revisorId'
)
->
references
(
'id'
)
->
on
(
'users'
);
//
$table->foreign('revisorId')->references('id')->on('users');
});
//
});
Schema
::
table
(
'revisors'
,
function
(
Blueprint
$table
)
{
//
Schema::table('revisors', function (Blueprint $table) {
$table
->
foreign
(
'eventoId'
)
->
references
(
'id'
)
->
on
(
'eventos'
);
//
$table->foreign('eventoId')->references('id')->on('eventos');
});
//
});
Schema
::
table
(
'revisors'
,
function
(
Blueprint
$table
)
{
//
Schema::table('revisors', function (Blueprint $table) {
$table
->
foreign
(
'areaId'
)
->
references
(
'id'
)
->
on
(
'areas'
);
//
$table->foreign('areaId')->references('id')->on('areas');
});
//
});
Schema
::
table
(
'eventos'
,
function
(
Blueprint
$table
){
//
Schema::table('eventos',function (Blueprint $table){
$table
->
foreign
(
'coordComissaoId'
)
->
references
(
'id'
)
->
on
(
'users'
);
//
$table->foreign('coordComissaoId')->references('id')->on('users');
});
//
});
//------------------------------------------------------------------------
//------------------------------------------------------------------------
}
}
...
...
This diff is collapsed.
Click to expand it.
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'
);
}
}
This diff is collapsed.
Click to expand it.
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'
);
}
}
This diff is collapsed.
Click to expand it.
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'
);
}
}
This diff is collapsed.
Click to expand it.
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'
);
}
}
This diff is collapsed.
Click to expand it.
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'
);
}
}
This diff is collapsed.
Click to expand it.
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'
);
}
}
This diff is collapsed.
Click to expand it.
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'
);
}
}
This diff is collapsed.
Click to expand it.
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'
);
}
}
This diff is collapsed.
Click to expand it.
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'
);
}
}
This diff is collapsed.
Click to expand it.
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'
);
}
}
This diff is collapsed.
Click to expand it.
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
)
{
//
});
}
}
This diff is collapsed.
Click to expand it.
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'
);
}
}
This diff is collapsed.
Click to expand it.
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'
);
}
}
This diff is collapsed.
Click to expand it.
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
)
{
//
});
}
}
This diff is collapsed.
Click to expand it.
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'
);
}
}
This diff is collapsed.
Click to expand it.
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
],
]);
}
}
This diff is collapsed.
Click to expand it.
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
],
]);
}
}
This diff is collapsed.
Click to expand it.
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'
]);
}
}
This diff is collapsed.
Click to expand it.
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
],
]);
}
}
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help