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');
|
2019-11-17 17:08:02 +01:00
|
|
|
$table->integer('fireStationID');
|
2019-11-08 00:45:47 +01:00
|
|
|
$table->string('name', 45);
|
|
|
|
$table->string('codename', 45);
|
2019-12-06 21:22:15 +01:00
|
|
|
$table->string('brand',45)->nullable();
|
|
|
|
$table->string('registrationNumber', 15)->nullable();
|
|
|
|
$table->integer('productionYear')->nullable();
|
|
|
|
$table->date('examExpirationDate')->nullable(); //Data ważności przegladu
|
|
|
|
$table->date('insuranceExpirationDate')->nullable();
|
|
|
|
$table->string('driveType',45)->nullable(); //układ napędowy
|
|
|
|
$table->string('chassisType',45)->nullable(); //typ podwozia
|
|
|
|
$table->string('bodyProducer',45)->nullable(); //producent nadwozia
|
|
|
|
$table->integer('crewNumber')->nullable();
|
|
|
|
$table->integer('foamAgent')->nullable(); //Ilość środka pianotwórczego w litrach
|
|
|
|
$table->integer('enginePower')->nullable(); //Moc silnika w kW
|
|
|
|
$table->integer('mass')->nullable(); //Masa całkowita pojazdu
|
|
|
|
$table->string('chassisNumber')->nullable();
|
|
|
|
$table->string('engineNumber')->nullable();
|
|
|
|
$table->string('fuelType',45)->nullable();
|
|
|
|
$table->integer('chassisPoductionYear')->nullable();
|
|
|
|
$table->date('entryIntoServiceDate')->nullable();
|
|
|
|
$table->string('fireEnginePumpDescription')->nullable();// Opis autopompy
|
|
|
|
$table->softDeletes();
|
2019-11-17 17:08:02 +01:00
|
|
|
$table->timestamps();
|
2019-11-08 00:45:47 +01:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::dropIfExists('vehicles');
|
|
|
|
}
|
|
|
|
}
|