2019-11-08 00:45:47 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
|
|
|
|
class CreateVehiclesTable extends Migration
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
|
|
|
Schema::create('vehicles', function (Blueprint $table) {
|
|
|
|
$table->increments('id');
|
2020-08-17 11:43:37 +02:00
|
|
|
$table->integer('fire_station_id')->unsigned();
|
|
|
|
$table->foreign('fire_station_id')->references('id')->on('fire_stations')->onDelete('cascade');
|
|
|
|
$table->string('name');
|
|
|
|
$table->string('codename');
|
|
|
|
$table->string('brand')->nullable();
|
|
|
|
$table->string('registration_number', 20)->nullable();
|
|
|
|
$table->integer('production_year')->nullable();
|
|
|
|
$table->date('exam_expiration_date')->nullable(); //Data ważności przegladu
|
|
|
|
$table->date('insurance_expiration_date')->nullable();
|
|
|
|
$table->string('drive_type')->nullable(); //układ napędowy
|
|
|
|
$table->string('chassis_type')->nullable(); //typ podwozia
|
|
|
|
$table->string('body_producer')->nullable(); //producent nadwozia
|
|
|
|
$table->integer('crew_number')->nullable();
|
|
|
|
$table->integer('foam_agent')->nullable(); //Ilość środka pianotwórczego w litrach
|
|
|
|
$table->integer('engine_power')->nullable(); //Moc silnika w kW
|
2019-12-06 21:22:15 +01:00
|
|
|
$table->integer('mass')->nullable(); //Masa całkowita pojazdu
|
2020-08-17 11:43:37 +02:00
|
|
|
$table->string('chassis_number')->nullable();
|
|
|
|
$table->string('engine_number')->nullable();
|
|
|
|
$table->string('fuel_type')->nullable();
|
|
|
|
$table->integer('chassis_poduction_year')->nullable();
|
|
|
|
$table->date('entry_into_service_date')->nullable();
|
|
|
|
$table->string('fire_engine_pump_description')->nullable();// Opis autopompy
|
|
|
|
$table->integer('status')->default('0');
|
|
|
|
$table->integer('editor_id')->nullable()->default(null);
|
2019-11-17 17:08:02 +01:00
|
|
|
$table->timestamps();
|
2020-08-17 11:43:37 +02:00
|
|
|
$table->softDeletes();
|
2019-11-08 00:45:47 +01:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::dropIfExists('vehicles');
|
|
|
|
}
|
|
|
|
}
|