#23 refactoring for ranks
This commit is contained in:
@@ -19,6 +19,7 @@ class CreateUsersTable extends Migration
|
||||
$table->string('email')->unique();
|
||||
$table->string('password');
|
||||
$table->integer('airline_id')->nullable()->unsigned();
|
||||
$table->integer('rank_id')->nullable()->unsigned();
|
||||
$table->integer('home_airport_id')->nullable()->unsigned();
|
||||
$table->integer('curr_airport_id')->nullable()->unsigned();
|
||||
$table->bigInteger('last_pirep_id')->nullable()->unsigned();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateRankingsTable extends Migration
|
||||
class CreateRanksTable extends Migration
|
||||
{
|
||||
|
||||
/**
|
||||
@@ -13,7 +13,7 @@ class CreateRankingsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('rankings', function (Blueprint $table) {
|
||||
Schema::create('ranks', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->integer('hours')->default(0);
|
||||
@@ -22,6 +22,14 @@ class CreateRankingsTable extends Migration
|
||||
$table->boolean('auto_promote')->default(true);
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('flight_rank', function(Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('flight_id')->unsigned();
|
||||
$table->integer('rank_id')->unsigned();
|
||||
$table->double('manual_pay', 19, 2)->default(0.0)->unsigned();
|
||||
$table->double('acars_pay', 19, 2)->default(0.0)->unsigned();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -31,6 +39,7 @@ class CreateRankingsTable extends Migration
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('rankings');
|
||||
Schema::drop('ranks');
|
||||
Schema::drop('flight_rank');
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@ class DevelopmentSeeder extends Seeder
|
||||
return Carbon::now('UTC')->format('Y-m-d H:i:s');
|
||||
}
|
||||
|
||||
protected function seed_from_yaml(): void
|
||||
protected function seed_from_yaml():
|
||||
{
|
||||
$time_fields = ['created_at', 'updated_at'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user