2017-06-09 09:37:51 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
|
|
|
|
class CreateAircraftsTable extends Migration
|
|
|
|
{
|
|
|
|
public function up()
|
|
|
|
{
|
|
|
|
Schema::create('aircraft', function (Blueprint $table) {
|
|
|
|
$table->increments('id');
|
2017-06-24 06:37:51 +08:00
|
|
|
$table->integer('subfleet_id')->unsigned();
|
2017-12-01 10:28:45 +08:00
|
|
|
$table->string('airport_id', 5)->nullable();
|
2017-07-11 07:54:51 +08:00
|
|
|
$table->string('hex_code', 10)->nullable();
|
|
|
|
$table->string('name', 50);
|
|
|
|
$table->string('registration', 10)->nullable();
|
|
|
|
$table->string('tail_number', 10)->nullable();
|
2017-06-10 11:19:17 +08:00
|
|
|
$table->boolean('active')->default(true);
|
2017-06-09 09:37:51 +08:00
|
|
|
$table->timestamps();
|
2017-06-10 11:19:17 +08:00
|
|
|
|
|
|
|
$table->unique('registration');
|
|
|
|
});
|
|
|
|
|
2017-06-09 09:37:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
public function down()
|
|
|
|
{
|
2017-12-13 01:49:35 +08:00
|
|
|
Schema::dropIfExists('aircraft');
|
2017-06-09 09:37:51 +08:00
|
|
|
}
|
|
|
|
}
|