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
25d6e52f
Commit
25d6e52f
authored
Dec 14, 2022
by
Lucas Henrique
Browse files
Migrações para criar as tabelas campo_avaliacaos e avaliacao_trabalhos
parent
467aa5ea
Changes
2
Show whitespace changes
Inline
Side-by-side
database/migrations/2022_12_14_154533_create_campo_avaliacaos_table.php
0 → 100644
View file @
25d6e52f
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreateCampoAvaliacaosTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'campo_avaliacaos'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
string
(
'nome'
)
->
nullable
();
$table
->
float
(
'nota_maxima'
)
->
nullable
();
$table
->
text
(
'descricao'
)
->
nullable
();
$table
->
integer
(
'prioridade'
)
->
nullable
();
$table
->
integer
(
'evento_id'
);
$table
->
foreign
(
'evento_id'
)
->
references
(
'id'
)
->
on
(
'eventos'
);
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'campo_avaliacaos'
);
}
}
database/migrations/2022_12_14_154948_create_avaliacao_trabalhos_table.php
0 → 100644
View file @
25d6e52f
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreateAvaliacaoTrabalhosTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'avaliacao_trabalhos'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
float
(
'nota'
)
->
nullable
();
$table
->
integer
(
'avaliador_id'
);
$table
->
foreign
(
'avaliador_id'
)
->
references
(
'id'
)
->
on
(
'avaliadors'
);
$table
->
integer
(
'campo_avaliacao_id'
);
$table
->
foreign
(
'campo_avaliacao_id'
)
->
references
(
'id'
)
->
on
(
'campo_avaliacaos'
);
$table
->
integer
(
'trabalho_id'
);
$table
->
foreign
(
'trabalho_id'
)
->
references
(
'id'
)
->
on
(
'trabalhos'
);
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'avaliacao_trabalhos'
);
}
}
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