Issue/329 refactor seeding (#337)
* Fix Contracts class names * Refactoring of the file seeds so it's not a mess * StyleCI fixes
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
<?php
|
||||
|
||||
use App\Contracts\Migration;
|
||||
use App\Services\Installer\MigrationService;
|
||||
use App\Services\Installer\SeederService;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateSettingsTable extends Migration
|
||||
{
|
||||
private $migrationSvc;
|
||||
private $seederSvc;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->migrationSvc = new MigrationService();
|
||||
$this->seederSvc = app(SeederService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -38,7 +38,7 @@ class CreateSettingsTable extends Migration
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
$this->migrationSvc->syncAllSettings();
|
||||
$this->seederSvc->syncAllSettings();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,21 +28,6 @@ class CreateRanksTable extends Migration
|
||||
|
||||
$table->unique('name');
|
||||
});
|
||||
|
||||
/**
|
||||
* Initial required data...
|
||||
*/
|
||||
$ranks = [
|
||||
[
|
||||
'id' => 1,
|
||||
'name' => 'New Pilot',
|
||||
'hours' => 0,
|
||||
'acars_base_pay_rate' => 50,
|
||||
'manual_base_pay_rate' => 25,
|
||||
],
|
||||
];
|
||||
|
||||
$this->addData('ranks', $ranks);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user