some refactoring for tests and adding some tables
This commit is contained in:
@@ -9,18 +9,37 @@ class CreateAircraftsTable extends Migration
|
||||
{
|
||||
Schema::create('aircraft', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('aircraft_class_id')->unsigned();
|
||||
$table->string('icao');
|
||||
$table->string('name');
|
||||
$table->string('full_name')->nullable();
|
||||
$table->string('registration')->nullable();
|
||||
$table->boolean('active');
|
||||
$table->string('tail_number')->nullable();
|
||||
$table->string('cargo_capacity')->nullable();
|
||||
$table->string('fuel_capacity')->nullable();
|
||||
$table->boolean('active')->default(true);
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->index('icao');
|
||||
$table->unique('registration');
|
||||
});
|
||||
|
||||
Schema::create('aircraft_classes', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('code');
|
||||
$table->string('name');
|
||||
$table->string('notes')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->index('code');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('aircraft');
|
||||
Schema::drop('aircraft_classes');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user