This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTransportePacienteFaturamentoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('transporte_paciente_faturamento', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('agendamento_id')->constrained('transporte_paciente_agendar_transporte');
|
||||
$table->foreignId('bpa_procedimento_id')->nullable()->constrained('bpa_procedimento');
|
||||
$table->foreignId('procedimento_id')->nullable()->constrained('sigtap.procedimento');
|
||||
$table->foreignId('lotacao_id')->nullable()->constrained('cadastro_lotacao');
|
||||
$table->foreignId('ocupacao_id')->nullable()->constrained('sigtap.ocupacao');
|
||||
$table->unsignedSmallInteger('quantidade');
|
||||
$table->foreignId('cid_principal_id')->nullable()->constrained('sigtap.cid');
|
||||
$table->foreignId('cid_secundario_id')->nullable()->constrained('sigtap.cid');
|
||||
$table->foreignId('paciente_id')->constrained('cadastro_paciente');
|
||||
$table->foreignId('motivo_id')->constrained('transporte_paciente_motivo_viagem_procedimento');
|
||||
$table->foreignId('destino_id')->constrained('transporte_paciente_destino');
|
||||
$table->unsignedSmallInteger('distancia')->nullable();
|
||||
$table->foreignId('usuario_id')->nullable()->constrained('cadastro_usuario');
|
||||
|
||||
MigrationUtil::addCommonFields($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('transporte_paciente_faturamento');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user