This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemJornadaTipoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_jornada_tipo', function (Blueprint $table) {
|
||||
|
||||
MigrationUtil::idWithoutIncrements($table);
|
||||
|
||||
$table->string('nome', 10);
|
||||
|
||||
MigrationUtil::addCommonFields($table, ['staticData' => true]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_jornada_tipo');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemJornadaStatusTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_jornada_status', function (Blueprint $table) {
|
||||
|
||||
MigrationUtil::idWithoutIncrements($table);
|
||||
|
||||
$table->string('nome', 50);
|
||||
|
||||
MigrationUtil::addCommonFields($table, ['staticData' => true]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_jornada_status');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemJornadaSemanaTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_jornada_semana', function (Blueprint $table) {
|
||||
|
||||
MigrationUtil::idWithoutIncrements($table);
|
||||
|
||||
$table->string('nome', 10);
|
||||
|
||||
MigrationUtil::addCommonFields($table, ['staticData' => true]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_jornada_semana');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemJornadaTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_jornada', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('unidade_id')->constrained('cadastro_unidade');
|
||||
$table->foreignId('infraestrutura_id')->constrained('cadastro_infraestrutura');
|
||||
$table->foreignId('exame_id')->nullable();
|
||||
$table->foreignId('prestador_id')->nullable()->constrained('exame_imagem_parametrizacao_unidade');
|
||||
$table->foreignId('usuario_id')->constrained('cadastro_usuario');
|
||||
$table->foreignId('semana_id')->constrained('exame_imagem_jornada_semana');
|
||||
$table->foreignId('status_id')->constrained('exame_imagem_jornada_status');
|
||||
$table->foreignId('tipo_id')->constrained('exame_imagem_jornada_tipo');
|
||||
$table->bigInteger('vagas');
|
||||
$table->date('data');
|
||||
$table->time('hora_inicial');
|
||||
$table->time('hora_fim');
|
||||
$table->bigInteger('tempo_atendimento');
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_jornada');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateExameImagemJornadaExameTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('exame_imagem_jornada_exame', function (Blueprint $table) {
|
||||
|
||||
MigrationUtil::idWithoutIncrements($table);
|
||||
|
||||
$table->string('nome', 255);
|
||||
|
||||
MigrationUtil::addCommonFields($table, ['staticData' => true]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_jornada_exame');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class DropExameImagemJornadaExameTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::dropIfExists('exame_imagem_jornada_exame');
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::create('exame_imagem_jornada_exame', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->string('nome');
|
||||
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddControleJornadaIdExameImagemJornadaTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_jornada', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('controle_jornada_id')->constrained('exame_imagem_parametrizacao_controle_jornada_tipo')->after('id');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_jornada', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['controle_jornada_id']);
|
||||
$table->dropColumn(['controle_jornada_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AlterTempoAtendimentoNullableToExameImagemJornadaTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_jornada', function (Blueprint $table) {
|
||||
|
||||
$table->bigInteger('tempo_atendimento')->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_jornada', function (Blueprint $table) {
|
||||
|
||||
$table->bigInteger('tempo_atendimento')->change();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddSupervisorIdToExameImagemJornadaTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_jornada', function (Blueprint $table) {
|
||||
|
||||
$table->foreignId('supervisor_id')->nullable()->after('usuario_id')->constrained('cadastro_usuario');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_jornada', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['supervisor_id']);
|
||||
$table->dropColumn(['supervisor_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AlterExameImagemJornadaAddVagasApp extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::table('exame_imagem_jornada', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('vagas_app')->nullable()->after('vagas');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('exame_imagem_jornada', function (Blueprint $table) {
|
||||
$table->dropColumn('vagas_app');
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user