This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTransportePacienteVeiculoMarca extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('transporte_paciente_veiculo_marca', function (Blueprint $table) {
|
||||
MigrationUtil::idWithoutIncrements($table);
|
||||
|
||||
$table->string('descricao', 30);
|
||||
|
||||
MigrationUtil::addCommonFields($table, ['staticData' => true]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('transporte_paciente_veiculo_marca');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTransportePacienteVeiculoCor extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('transporte_paciente_veiculo_cor', function (Blueprint $table) {
|
||||
MigrationUtil::idWithoutIncrements($table);
|
||||
|
||||
$table->string('descricao', 30);
|
||||
|
||||
MigrationUtil::addCommonFields($table, ['staticData' => true]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('transporte_paciente_veiculo_cor');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTransportePacienteVeiculoCombustivel extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('transporte_paciente_veiculo_combustivel', function (Blueprint $table) {
|
||||
MigrationUtil::idWithoutIncrements($table);
|
||||
|
||||
$table->string('descricao', 30);
|
||||
|
||||
MigrationUtil::addCommonFields($table, ['staticData' => true]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('transporte_paciente_veiculo_combustivel');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTransportePacienteVeiculoTipo extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('transporte_paciente_veiculo_tipo', function (Blueprint $table) {
|
||||
|
||||
MigrationUtil::idWithoutIncrements($table);
|
||||
|
||||
$table->string('descricao', 30);
|
||||
|
||||
MigrationUtil::addCommonFields($table, ['staticData' => true]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('transporte_paciente_veiculo_tipo');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTransportePacienteTipoPassageiro extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('transporte_paciente_veiculo_tipo_passageiro', function (Blueprint $table) {
|
||||
|
||||
MigrationUtil::idWithoutIncrements($table);
|
||||
|
||||
$table->string('descricao', 30);
|
||||
|
||||
MigrationUtil::addCommonFields($table, ['staticData' => true]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('transporte_paciente_veiculo_tipo_passageiro');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateTransportePacienteVeiculo extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('transporte_paciente_veiculo', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
/**
|
||||
* Identificação do veículo
|
||||
*/
|
||||
$table->string('numero_placa', 7);
|
||||
$table->boolean('padrao_placa_mercosul');
|
||||
$table->string('descricao_modelo', 56);
|
||||
$table->integer('numero_capacidade')->default(0);
|
||||
$table->integer('ano_fabricacao');
|
||||
$table->string('numero_patrimonio', 10)->nullable();
|
||||
$table->string('prefixo', 3)->nullable();
|
||||
$table->string('kilometro_inicial', 11)->default(0);
|
||||
$table->string('numero_renavam', 11);
|
||||
$table->integer('numero_eixos')->default(0);
|
||||
$table->string('numero_chassi', 17);
|
||||
$table->date('data_aquisicao');
|
||||
$table->string('numero_cnpj_proprietario', 14);
|
||||
$table->string('nome_proprietario', 72);
|
||||
$table->boolean('bloqueado');
|
||||
$table->boolean('tipo_ambulancia');
|
||||
|
||||
/**
|
||||
* FK's
|
||||
*/
|
||||
$table->foreignId('marca_id')->constrained('transporte_paciente_veiculo_marca');
|
||||
$table->foreignId('tipo_id')->constrained('transporte_paciente_veiculo_tipo');
|
||||
$table->foreignId('tipo_passageiro_id')->constrained('transporte_paciente_veiculo_tipo_passageiro');
|
||||
$table->foreignId('cor_id')->constrained('transporte_paciente_veiculo_cor');
|
||||
$table->foreignId('combustivel_id')->constrained('transporte_paciente_veiculo_combustivel');
|
||||
|
||||
MigrationUtil::addCommonFields($table);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('transporte_paciente_veiculo');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AlterTransportePacienteVeiculoTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('transporte_paciente_veiculo', function (Blueprint $table) {
|
||||
$table->string('kilometro_inicial', 11)->default(0)->change();
|
||||
$table->string('numero_renavam', 11)->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user