This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoParametrizacaoAtendimentoMedicoTipoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_parametrizacao_atendimento_medico_tipo', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->foreignId('infraestrutura_id')->constrained('cadastro_infraestrutura');
|
||||
$table->foreignId('tipo_id')->constrained('pronto_atendimento_atendimento_medico_tipo');
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
|
||||
$table->unique(['infraestrutura_id', 'tipo_id', 'deleted_at']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_parametrizacao_atendimento_medico_tipo');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AlterUniqueProntoAtendimentoParametrizacaoAtendimentoMedicoTipo extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_parametrizacao_atendimento_medico_tipo', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['infraestrutura_id']);
|
||||
$table->dropForeign(['tipo_id']);
|
||||
$table->dropUnique(['infraestrutura_id', 'tipo_id', 'deleted_at']);
|
||||
|
||||
$table->foreign('infraestrutura_id')->references('id')->on('cadastro_infraestrutura');
|
||||
$table->foreign('tipo_id')->references('id')->on('pronto_atendimento_atendimento_medico_tipo');
|
||||
$table->unique(['infraestrutura_id', 'deleted_at']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_parametrizacao_atendimento_medico_tipo', function (Blueprint $table) {
|
||||
|
||||
$table->dropForeign(['infraestrutura_id']);
|
||||
$table->dropUnique(['infraestrutura_id', 'deleted_at']);
|
||||
|
||||
$table->foreign('infraestrutura_id')->references('id')->on('cadastro_infraestrutura');
|
||||
$table->unique(['infraestrutura_id', 'tipo_id', 'deleted_at']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoParametrizacaoAtendimentoMedicoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_parametrizacao_atendimento_medico', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->string('procedimento_padrao_codigo', 10)->nullable();
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_parametrizacao_atendimento_medico');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoParametrizacaoServicoEnfermagemTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_parametrizacao_servico_enfermagem', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->string('procedimento_codigo', 10);
|
||||
|
||||
MigrationUtil::addCommonFieldsWithSoftDeletes($table);
|
||||
|
||||
$table->unique(['procedimento_codigo', 'deleted_at']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_parametrizacao_servico_enfermagem');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoParametrizacaoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_parametrizacao', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->boolean('faturamento_automatico_enfermagem');
|
||||
|
||||
MigrationUtil::addCommonFields($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_parametrizacao');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoParametrizacaoFaturamentoExameLaboratorialTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_parametrizacao_faturamento_exame_laboratorial', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('lotacao_id')->constrained('cadastro_lotacao');
|
||||
|
||||
MigrationUtil::addCommonFields($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_parametrizacao_faturamento_exame_laboratorial');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddAssinaturaEletronicaToProntoAtendimentoParametrizacao extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('pronto_atendimento_parametrizacao', function (Blueprint $table) {
|
||||
|
||||
$table->boolean('assinatura_eletronica')->nullable()->after('faturamento_automatico_enfermagem');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('pronto_atendimento_parametrizacao', function (Blueprint $table) {
|
||||
|
||||
$table->dropColumn('assinatura_eletronica');
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user