This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAssistenciaSocialTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_assistencia_social', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('atendimento_id')->constrained('pronto_atendimento_atendimento');
|
||||
$table->foreignId('usuario_id')->constrained('cadastro_usuario');
|
||||
$table->foreignId('paciente_id')->constrained('cadastro_paciente');
|
||||
$table->foreignId('ocupacao_id')->nullable()->constrained('sigtap.ocupacao');
|
||||
$table->date('data_anotacao');
|
||||
$table->string('anotacao', 1500);
|
||||
|
||||
MigrationUtil::addCommonFields($table);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_assistencia_social');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProntoAtendimentoAssistenciaSocialHistoricoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('pronto_atendimento_assistencia_social_historico', function (Blueprint $table) {
|
||||
|
||||
$table->id();
|
||||
$table->foreignId('assistencia_id')->constrained('pronto_atendimento_assistencia_social');
|
||||
$table->foreignId('atendimento_id')->constrained('pronto_atendimento_atendimento');
|
||||
$table->foreignId('usuario_id')->constrained('cadastro_usuario');
|
||||
$table->foreignId('paciente_id')->constrained('cadastro_paciente');
|
||||
$table->foreignId('ocupacao_id')->nullable()->constrained('sigtap.ocupacao');
|
||||
$table->string('anotacao', 1500);
|
||||
|
||||
MigrationUtil::addCommonFields($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('pronto_atendimento_assistencia_social_historico');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user