Laravel 9 Update (#1413)

Update to Laravel 9 and PHP 8+

Co-authored-by: B.Fatih KOZ <fatih.koz@gmail.com>
This commit is contained in:
Nabeel S
2022-03-14 11:45:18 -04:00
committed by GitHub
parent 00bf18c225
commit 12848091a2
340 changed files with 6130 additions and 4502 deletions

View File

@@ -4,8 +4,7 @@ use App\Contracts\Migration;
use App\Services\Installer\SeederService;
use Illuminate\Database\Schema\Blueprint;
class CreateSettingsTable extends Migration
{
return new class() extends Migration {
private $seederSvc;
public function __construct()
@@ -50,4 +49,4 @@ class CreateSettingsTable extends Migration
{
Schema::dropIfExists('settings');
}
}
};

View File

@@ -5,8 +5,7 @@ use App\Models\Pirep;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUsersTable extends Migration
{
return new class() extends Migration {
/**
* Run the migrations.
*
@@ -55,4 +54,4 @@ class CreateUsersTable extends Migration
{
Schema::dropIfExists('users');
}
}
};

View File

@@ -2,9 +2,9 @@
use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class RolesPermissionsTables extends Migration
{
return new class() extends Migration {
public function up()
{
// Create table for storing roles
@@ -82,4 +82,4 @@ class RolesPermissionsTables extends Migration
Schema::dropIfExists('role_user');
Schema::dropIfExists('roles');
}
}
};

View File

@@ -4,8 +4,7 @@ use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreatePasswordResetsTable extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::create('password_resets', function (Blueprint $table) {
@@ -19,4 +18,4 @@ class CreatePasswordResetsTable extends Migration
{
Schema::dropIfExists('password_resets');
}
}
};

View File

@@ -4,8 +4,7 @@ use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSessionsTable extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::create('sessions', function (Blueprint $table) {
@@ -22,4 +21,4 @@ class CreateSessionsTable extends Migration
{
Schema::dropIfExists('sessions');
}
}
};

View File

@@ -3,8 +3,7 @@
use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAirlinesTable extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::create('airlines', function (Blueprint $table) {
@@ -31,4 +30,4 @@ class CreateAirlinesTable extends Migration
{
Schema::dropIfExists('airlines');
}
}
};

View File

@@ -5,8 +5,7 @@ use App\Models\Enums\AircraftState;
use App\Models\Enums\AircraftStatus;
use Illuminate\Database\Schema\Blueprint;
class CreateAircraftsTable extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::create('aircraft', function (Blueprint $table) {
@@ -34,4 +33,4 @@ class CreateAircraftsTable extends Migration
{
Schema::dropIfExists('aircraft');
}
}
};

View File

@@ -3,8 +3,7 @@
use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateFaresTable extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::create('fares', function (Blueprint $table) {
@@ -24,4 +23,4 @@ class CreateFaresTable extends Migration
{
Schema::dropIfExists('fares');
}
}
};

View File

@@ -3,8 +3,7 @@
use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAirportsTable extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::create('airports', function (Blueprint $table) {
@@ -33,4 +32,4 @@ class CreateAirportsTable extends Migration
{
Schema::dropIfExists('airports');
}
}
};

View File

@@ -5,8 +5,7 @@ use App\Contracts\Model;
use App\Models\Enums\FlightType;
use Illuminate\Database\Schema\Blueprint;
class CreateFlightTables extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::create('flights', function (Blueprint $table) {
@@ -98,4 +97,4 @@ class CreateFlightTables extends Migration
Schema::drop('flight_subfleet');
Schema::drop('flights');
}
}
};

View File

@@ -3,8 +3,7 @@
use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateRanksTable extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::create('ranks', function (Blueprint $table) {
@@ -29,4 +28,4 @@ class CreateRanksTable extends Migration
{
Schema::dropIfExists('ranks');
}
}
};

View File

@@ -3,8 +3,7 @@
use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateSubfleetTables extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::create('subfleets', function (Blueprint $table) {
@@ -51,4 +50,4 @@ class CreateSubfleetTables extends Migration
Schema::dropIfExists('subfleet_fare');
Schema::dropIfExists('subfleet_rank');
}
}
};

View File

@@ -7,8 +7,7 @@ use App\Models\Enums\PirepState;
use App\Models\Enums\PirepStatus;
use Illuminate\Database\Schema\Blueprint;
class CreatePirepTables extends Migration
{
return new class() extends Migration {
/**
* Run the migrations.
*
@@ -106,4 +105,4 @@ class CreatePirepTables extends Migration
Schema::dropIfExists('pirep_fields');
Schema::dropIfExists('pirep_field_values');
}
}
};

View File

@@ -5,8 +5,7 @@ use App\Contracts\Model;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateBidsTable extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::create('bids', function (Blueprint $table) {
@@ -24,4 +23,4 @@ class CreateBidsTable extends Migration
{
Schema::dropIfExists('bids');
}
}
};

View File

@@ -4,8 +4,7 @@ use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateJobsTable extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::create('jobs', function (Blueprint $table) {
@@ -23,4 +22,4 @@ class CreateJobsTable extends Migration
{
Schema::dropIfExists('jobs');
}
}
};

View File

@@ -4,8 +4,7 @@ use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateFailedJobsTable extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::create('failed_jobs', function (Blueprint $table) {
@@ -22,4 +21,4 @@ class CreateFailedJobsTable extends Migration
{
Schema::dropIfExists('failed_jobs');
}
}
};

View File

@@ -4,8 +4,7 @@ use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateNavdataTables extends Migration
{
return new class() extends Migration {
public function up()
{
/*
@@ -30,4 +29,4 @@ class CreateNavdataTables extends Migration
{
Schema::dropIfExists('navdata');
}
}
};

View File

@@ -5,8 +5,7 @@ use App\Contracts\Model;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAcarsTables extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::create('acars', function (Blueprint $table) {
@@ -43,4 +42,4 @@ class CreateAcarsTables extends Migration
{
Schema::dropIfExists('acars');
}
}
};

View File

@@ -4,8 +4,7 @@ use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateStatsTable extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::create('stats', function (Blueprint $table) {
@@ -24,4 +23,4 @@ class CreateStatsTable extends Migration
{
Schema::dropIfExists('stats');
}
}
};

View File

@@ -4,8 +4,7 @@ use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateNewsTable extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::create('news', function (Blueprint $table) {
@@ -21,4 +20,4 @@ class CreateNewsTable extends Migration
{
Schema::drop('news');
}
}
};

View File

@@ -5,8 +5,7 @@ use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Modules\Awards\Awards\PilotFlightAwards;
class CreateAwardsTable extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::create('awards', function (Blueprint $table) {
@@ -52,4 +51,4 @@ class CreateAwardsTable extends Migration
Schema::dropIfExists('awards');
Schema::dropIfExists('user_awards');
}
}
};

View File

@@ -4,8 +4,7 @@ use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateExpensesTable extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::create('expenses', function (Blueprint $table) {
@@ -34,4 +33,4 @@ class CreateExpensesTable extends Migration
{
Schema::dropIfExists('expenses');
}
}
};

View File

@@ -4,8 +4,7 @@ use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateJournalTransactionsTable extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::create('journal_transactions', function (Blueprint $table) {
@@ -33,4 +32,4 @@ class CreateJournalTransactionsTable extends Migration
{
Schema::dropIfExists('journal_transactions');
}
}
};

View File

@@ -4,8 +4,7 @@ use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateJournalsTable extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::create('journals', function (Blueprint $table) {
@@ -23,4 +22,4 @@ class CreateJournalsTable extends Migration
{
Schema::dropIfExists('journals');
}
}
};

View File

@@ -4,8 +4,7 @@ use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateLedgersTable extends Migration
{
return new class() extends Migration {
/**
* Run the migrations.
*
@@ -30,4 +29,4 @@ class CreateLedgersTable extends Migration
{
Schema::dropIfExists('ledgers');
}
}
};

View File

@@ -5,8 +5,7 @@ use App\Contracts\Model;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateFilesTable extends Migration
{
return new class() extends Migration {
/**
* Create the files table. Acts as a morphable
*
@@ -40,4 +39,4 @@ class CreateFilesTable extends Migration
{
Schema::dropIfExists('files');
}
}
};

View File

@@ -5,8 +5,7 @@ use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
class AddReadonlyToRoles extends Migration
{
return new class() extends Migration {
public function up(): void
{
Schema::table('roles', static function (Blueprint $table) {
@@ -25,4 +24,4 @@ class AddReadonlyToRoles extends Migration
$table->dropColumn('read_only');
});
}
}
};

View File

@@ -12,8 +12,7 @@ use Illuminate\Support\Facades\Schema;
* 3. Iterate through all of the users and set their `id` to the `pilot_id`
* 4. Change the other tables column types that reference `user_id`
*/
class UsersAddPilotId extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::table('users', static function (Blueprint $table) {
@@ -33,4 +32,4 @@ class UsersAddPilotId extends Migration
$table->dropColumn('pilot_id');
});
}
}
};

View File

@@ -4,8 +4,7 @@ use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateNotificationsTable extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::create('notifications', function (Blueprint $table) {
@@ -22,4 +21,4 @@ class CreateNotificationsTable extends Migration
{
Schema::dropIfExists('notifications');
}
}
};

View File

@@ -9,8 +9,7 @@ use Illuminate\Support\Facades\Schema;
/**
* Change the PIREP state column to be a TINYINT
*/
class PirepsChangeStateType extends Migration
{
return new class() extends Migration {
public function up()
{
// Migrate the old rejected state
@@ -23,4 +22,4 @@ class PirepsChangeStateType extends Migration
$table->unsignedSmallInteger('state')->change();
});
}
}
};

View File

@@ -8,12 +8,11 @@ use Illuminate\Support\Facades\Schema;
/**
* Add a `flight_id` column to the PIREPs table
*/
class PirepsAddFlightId extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::table('pireps', function (Blueprint $table) {
$table->string('flight_id', Model::ID_MAX_LENGTH)->nullable()->after('aircraft_id');
});
}
}
};

View File

@@ -7,8 +7,7 @@ use Illuminate\Support\Facades\Schema;
/**
* Add a `flight_type` column to the expenses table
*/
class ExpensesAddFlightType extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::table('expenses', function (Blueprint $table) {
@@ -24,4 +23,4 @@ class ExpensesAddFlightType extends Migration
$table->dropColumn('flight_type');
});
}
}
};

View File

@@ -6,8 +6,7 @@ use Illuminate\Support\Facades\Schema;
/**
* Turn the airport coordinates and other lat/lon coords into decimal type
*/
class ModifyAirportsCoordinates extends Migration
{
return new class() extends Migration {
/**
* Run the migrations.
*
@@ -25,4 +24,4 @@ class ModifyAirportsCoordinates extends Migration
$table->decimal('lon', 11, 5)->change()->default(0.0)->nullable();
});
}
}
};

View File

@@ -6,12 +6,11 @@ use Illuminate\Support\Facades\Schema;
/**
* Allow the flight field value to be nullable
*/
class FlightFieldNullable extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::table('flight_field_values', function ($table) {
$table->text('value')->change()->nullable();
});
}
}
};

View File

@@ -7,8 +7,7 @@ use Illuminate\Support\Facades\Schema;
/**
* Add a `load_factor` and `load_factor_variance` columns to the expenses table
*/
class FlightsAddLoadFactor extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::table('flights', function (Blueprint $table) {
@@ -29,4 +28,4 @@ class FlightsAddLoadFactor extends Migration
$table->dropColumn('load_factor_variance');
});
}
}
};

View File

@@ -7,8 +7,7 @@ use Illuminate\Support\Facades\Schema;
/**
* Add a `pilot_pay` column for a fixed amount to pay to a pilot for a flight
*/
class FlightsAddPilotPay extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::table('flights', function (Blueprint $table) {
@@ -24,4 +23,4 @@ class FlightsAddPilotPay extends Migration
$table->dropColumn('pilot_pay');
});
}
}
};

View File

@@ -8,8 +8,7 @@ use Illuminate\Support\Facades\Schema;
/**
* Add a `pilot_pay` column for a fixed amount to pay to a pilot for a flight
*/
class FaresAddType extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::table('fares', function (Blueprint $table) {
@@ -19,4 +18,4 @@ class FaresAddType extends Migration
->after('capacity');
});
}
}
};

View File

@@ -7,8 +7,7 @@ use Illuminate\Support\Facades\Schema;
/**
* Increase string ID lengths because of collisions
*/
class IncreaseIdLengths extends Migration
{
return new class() extends Migration {
public function up()
{
$tables = [
@@ -33,4 +32,4 @@ class IncreaseIdLengths extends Migration
});
}
}
}
};

View File

@@ -7,12 +7,11 @@ use Illuminate\Support\Facades\Schema;
/**
* Remove the unique index from subfleets.type
*/
class RemoveSubfleetTypeIndex extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::table('subfleets', function (Blueprint $table) {
$table->dropUnique(['type']);
});
}
}
};

View File

@@ -7,8 +7,7 @@ use Illuminate\Support\Facades\Schema;
/**
* Add a table to store the Simbrief data
*/
class AddSimbriefTable extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::create('simbrief', function (Blueprint $table) {
@@ -31,4 +30,4 @@ class AddSimbriefTable extends Migration
{
Schema::drop('simbrief');
}
}
};

View File

@@ -9,8 +9,7 @@ use Illuminate\Support\Facades\Schema;
* Create the pages
* https://github.com/nabeelio/phpvms/issues/641
*/
class CreatePages extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::create('pages', function (Blueprint $table) {
@@ -32,4 +31,4 @@ class CreatePages extends Migration
{
Schema::dropIfExists('pages');
}
}
};

View File

@@ -4,12 +4,11 @@ use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AirlineRemoveNullable extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::table('airlines', function (Blueprint $table) {
$table->dropUnique(['iata']);
});
}
}
};

View File

@@ -4,12 +4,11 @@ use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class PageIconNullable extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::table('pages', function (Blueprint $table) {
$table->string('icon')->change()->nullable();
});
}
}
};

View File

@@ -8,8 +8,7 @@ use Illuminate\Support\Facades\Schema;
* Add a `link` column and make the body optional. Also add a "new_window" bool
* which determines if we open this link in a new window or not
*/
class PagesAddLink extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::table('pages', function (Blueprint $table) {
@@ -30,4 +29,4 @@ class PagesAddLink extends Migration
$table->dropColumn('new_window');
});
}
}
};

View File

@@ -8,8 +8,7 @@ use Illuminate\Support\Facades\Schema;
/**
* Add two tables for holding user fields and the values
*/
class CreateUserFields extends Migration
{
return new class() extends Migration {
public function up()
{
/*
@@ -39,4 +38,4 @@ class CreateUserFields extends Migration
$table->index(['user_field_id', 'user_id']);
});
}
}
};

View File

@@ -7,8 +7,7 @@ use Illuminate\Support\Facades\Schema;
/**
* Add a `mtow` column for the max takeoff weight
*/
class AircraftAddMtow extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::table('aircraft', function (Blueprint $table) {
@@ -25,4 +24,4 @@ class AircraftAddMtow extends Migration
$table->dropColumn('mtow');
});
}
}
};

View File

@@ -4,8 +4,7 @@ use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateModulesTable extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::create('modules', function (Blueprint $table) {
@@ -26,4 +25,4 @@ class CreateModulesTable extends Migration
{
Schema::dropIfExists('modules');
}
}
};

View File

@@ -7,12 +7,11 @@ use Illuminate\Support\Facades\Schema;
/**
* Change the pages body column type to a Medium Text, max size of 16MB
*/
class ModifyPagesSize extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::table('pages', function (Blueprint $table) {
$table->mediumText('body')->change()->nullable();
});
}
}
};

View File

@@ -7,8 +7,7 @@ use Illuminate\Support\Facades\Schema;
/**
* Change the downloads link size
*/
class ModifyDownloadLinkSize extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::table('files', function (Blueprint $table) {
@@ -16,4 +15,4 @@ class ModifyDownloadLinkSize extends Migration
$table->mediumText('path')->change()->nullable();
});
}
}
};

View File

@@ -7,8 +7,7 @@ use Illuminate\Support\Facades\Schema;
/**
* Add a hub to the subfleet is
*/
class AddHubToSubfleets extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::table('subfleets', function (Blueprint $table) {
@@ -17,4 +16,4 @@ class AddHubToSubfleets extends Migration
->after('airline_id');
});
}
}
};

View File

@@ -7,12 +7,11 @@ use Illuminate\Support\Facades\Schema;
/**
* Change the vertical speed for the acars table to a double
*/
class ChangeAcarsVsType extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::table('acars', function (Blueprint $table) {
$table->float('vs')->change()->default(0.0)->nullable();
});
}
}
};

View File

@@ -7,8 +7,7 @@ use Illuminate\Support\Facades\Schema;
/**
* Bring the sessions table in line with the latest
*/
class UpdateSessionsTable extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::table('sessions', function (Blueprint $table) {
@@ -16,4 +15,4 @@ class UpdateSessionsTable extends Migration
$table->index('last_activity');
});
}
}
};

View File

@@ -7,8 +7,7 @@ use Illuminate\Support\Facades\Schema;
/**
* Add a `fuel_onboard` column for recording what is left in tanks
*/
class AircraftAddFuelonboard extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::table('aircraft', function (Blueprint $table) {
@@ -18,4 +17,4 @@ class AircraftAddFuelonboard extends Migration
->after('zfw');
});
}
}
};

View File

@@ -7,8 +7,7 @@ use Illuminate\Support\Facades\Schema;
/**
* Add a SimBrief Type to subfleet
*/
class AddSbtypeToSubfleets extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::table('subfleets', function (Blueprint $table) {
@@ -17,4 +16,4 @@ class AddSbtypeToSubfleets extends Migration
->after('type');
});
}
}
};

View File

@@ -7,8 +7,7 @@ use Illuminate\Support\Facades\Schema;
/**
* Add a hub to the subfleet is
*/
class AddAircraftToSimbrief extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::table('simbrief', function (Blueprint $table) {
@@ -21,4 +20,4 @@ class AddAircraftToSimbrief extends Migration
$table->mediumText('fare_data')->nullable()->after('ofp_xml');
});
}
}
};

View File

@@ -7,8 +7,7 @@ use Illuminate\Support\Facades\Schema;
/**
* Add a hub to the subfleet is
*/
class AddKvpTable extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::create('kvp', function (Blueprint $table) {
@@ -16,4 +15,4 @@ class AddKvpTable extends Migration
$table->string('value');
});
}
}
};

View File

@@ -4,8 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddDisableactivitychecksToRoles extends Migration
{
return new class() extends Migration {
/**
* Run the migrations.
*
@@ -31,4 +30,4 @@ class AddDisableactivitychecksToRoles extends Migration
$table->dropColumn('disable_activity_checks');
});
}
}
};

View File

@@ -3,8 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;
class RemoveSettingRemoveBidOnAccept extends Migration
{
return new class() extends Migration {
/**
* Run the migrations.
*
@@ -16,4 +15,4 @@ class RemoveSettingRemoveBidOnAccept extends Migration
->where(['key' => 'pireps.remove_bid_on_accept'])
->delete();
}
}
};

View File

@@ -10,8 +10,7 @@ use Illuminate\Support\Facades\Schema;
* According to FAA and EASA, callsigns must be maximum 7 chars in which first 3 chars is
* airline ICAO code remaining rest can be used freely according to airline's choices
*/
class FlightsAddAlphanumericCallsign extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::table('flights', function (Blueprint $table) {
@@ -27,4 +26,4 @@ class FlightsAddAlphanumericCallsign extends Migration
$table->dropColumn('callsign');
});
}
}
};

View File

@@ -6,8 +6,7 @@ use App\Services\Installer\ConfigService;
/**
* Migrate the configuration files
*/
class MigrateConfigs extends Migration
{
return new class() extends Migration {
public function up()
{
/** @var ConfigService $configSvc */
@@ -18,4 +17,4 @@ class MigrateConfigs extends Migration
public function down()
{
}
}
};

View File

@@ -8,8 +8,7 @@ use Illuminate\Support\Facades\Schema;
* Increase Airport ICAO size to 5 chars
* https://github.com/nabeelio/phpvms/issues/1052
*/
class IncreaseIcaoSizes extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::table('airports', function (Blueprint $table) {
@@ -23,4 +22,4 @@ class IncreaseIcaoSizes extends Migration
$table->string('alt_airport_id', 5)->change();
});
}
}
};

View File

@@ -3,8 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;
class RemoveSettingSimbriefExpireDays extends Migration
{
return new class() extends Migration {
/**
* Run the migrations.
*
@@ -16,4 +15,4 @@ class RemoveSettingSimbriefExpireDays extends Migration
->where(['key' => 'simbrief.expire_days'])
->delete();
}
}
};

View File

@@ -5,8 +5,7 @@ use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
class DiscordFields extends Migration
{
return new class() extends Migration {
public function up()
{
// Delete the old Discord fields and then a webhook will get added
@@ -29,4 +28,4 @@ class DiscordFields extends Migration
->after('rank_id');
});
}
}
};

View File

@@ -4,8 +4,7 @@ use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class DiscordPrivateChannelId extends Migration
{
return new class() extends Migration {
public function up()
{
// Add a field to the user to enter their own Discord ID
@@ -15,4 +14,4 @@ class DiscordPrivateChannelId extends Migration
->after('discord_id');
});
}
}
};

View File

@@ -4,8 +4,7 @@ use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddTypeRatingTables extends Migration
{
return new class() extends Migration {
public function up()
{
if (!Schema::hasTable('typeratings')) {
@@ -50,4 +49,4 @@ class AddTypeRatingTables extends Migration
Schema::dropIfExists('typerating_user');
Schema::dropIfExists('typerating_subfleet');
}
}
};

View File

@@ -4,12 +4,11 @@ use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddHubToAircraft extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::table('aircraft', function (Blueprint $table) {
$table->string('hub_id', 5)->nullable()->after('airport_id');
});
}
}
};

View File

@@ -4,12 +4,11 @@ use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class UpdateAwardsAddActive extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::table('awards', function (Blueprint $table) {
$table->boolean('active')->default(true)->nullable()->after('ref_model_params');
});
}
}
};

View File

@@ -4,12 +4,11 @@ use App\Contracts\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class UpdateUsersAddNotes extends Migration
{
return new class() extends Migration {
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->mediumText('notes')->nullable()->after('remember_token');
});
}
}
};

View File

@@ -0,0 +1,28 @@
<?php
use App\Contracts\Migration;
use Illuminate\Support\Facades\DB;
return new class() extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
DB::table('roles')
->where(['name' => 'admin'])
->update(['disable_activity_checks' => true]);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
};