the browser-facing portion of osu!
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Require migration dependencies instead of assuming class will be declared

clayton 97ea074d 186b0b33

+58 -39
+19
app/helpers.php
··· 7 7 use App\Models\LoginAttempt; 8 8 use Egulias\EmailValidator\EmailValidator; 9 9 use Egulias\EmailValidator\Validation\NoRFCWarningsValidation; 10 + use Illuminate\Database\Migrations\Migration; 10 11 use Illuminate\Support\Arr; 11 12 use Illuminate\Support\HtmlString; 12 13 ··· 1847 1848 { 1848 1849 return app('assets-manifest')->src($resource); 1849 1850 } 1851 + 1852 + /** 1853 + * Get an instance of the named migration. 1854 + */ 1855 + function migration(string $name): object 1856 + { 1857 + $instance = app('files')->getRequire( 1858 + database_path('migrations').DIRECTORY_SEPARATOR."{$name}.php", 1859 + ); 1860 + 1861 + if (!$instance instanceof Migration) { 1862 + throw new Exception( 1863 + "\"{$name}\" does not return an instance of ".Migration::class.'.', 1864 + ); 1865 + } 1866 + 1867 + return $instance; 1868 + }
+28 -28
database/migrations/2016_10_28_000000_update_oauth_tables.php
··· 14 14 */ 15 15 public function up() 16 16 { 17 - (new CreateOauthRefreshTokensTable())->down(); 18 - (new CreateOauthAccessTokenScopesTable())->down(); 19 - (new CreateOauthAccessTokensTable())->down(); 20 - (new CreateOauthAuthCodeScopesTable())->down(); 21 - (new CreateOauthAuthCodesTable())->down(); 22 - (new CreateOauthSessionScopesTable())->down(); 23 - (new CreateOauthSessionsTable())->down(); 24 - (new CreateOauthClientGrantsTable())->down(); 25 - (new CreateOauthClientScopesTable())->down(); 26 - (new CreateOauthClientEndpointsTable())->down(); 27 - (new CreateOauthClientsTable())->down(); 28 - (new CreateOauthGrantScopesTable())->down(); 29 - (new CreateOauthGrantsTable())->down(); 30 - (new CreateOauthScopesTable())->down(); 17 + migration('2016_03_18_170013_create_oauth_refresh_tokens_table')->down(); 18 + migration('2016_03_18_170012_create_oauth_access_token_scopes_table')->down(); 19 + migration('2016_03_18_170011_create_oauth_access_tokens_table')->down(); 20 + migration('2016_03_18_170010_create_oauth_auth_code_scopes_table')->down(); 21 + migration('2016_03_18_170009_create_oauth_auth_codes_table')->down(); 22 + migration('2016_03_18_170008_create_oauth_session_scopes_table')->down(); 23 + migration('2016_03_18_170007_create_oauth_sessions_table')->down(); 24 + migration('2016_03_18_170006_create_oauth_client_grants_table')->down(); 25 + migration('2016_03_18_170005_create_oauth_client_scopes_table')->down(); 26 + migration('2016_03_18_170004_create_oauth_client_endpoints_table')->down(); 27 + migration('2016_03_18_170003_create_oauth_clients_table')->down(); 28 + migration('2016_03_18_170002_create_oauth_grant_scopes_table')->down(); 29 + migration('2016_03_18_170001_create_oauth_grants_table')->down(); 30 + migration('2016_03_18_170000_create_oauth_scopes_table')->down(); 31 31 } 32 32 33 33 /** ··· 37 37 */ 38 38 public function down() 39 39 { 40 - (new CreateOauthScopesTable())->up(); 41 - (new CreateOauthGrantsTable())->up(); 42 - (new CreateOauthGrantScopesTable())->up(); 43 - (new CreateOauthClientsTable())->up(); 44 - (new CreateOauthClientEndpointsTable())->up(); 45 - (new CreateOauthClientScopesTable())->up(); 46 - (new CreateOauthClientGrantsTable())->up(); 47 - (new CreateOauthSessionsTable())->up(); 48 - (new CreateOauthSessionScopesTable())->up(); 49 - (new CreateOauthAuthCodesTable())->up(); 50 - (new CreateOauthAuthCodeScopesTable())->up(); 51 - (new CreateOauthAccessTokensTable())->up(); 52 - (new CreateOauthAccessTokenScopesTable())->up(); 53 - (new CreateOauthRefreshTokensTable())->up(); 40 + migration('2016_03_18_170000_create_oauth_scopes_table')->up(); 41 + migration('2016_03_18_170001_create_oauth_grants_table')->up(); 42 + migration('2016_03_18_170002_create_oauth_grant_scopes_table')->up(); 43 + migration('2016_03_18_170003_create_oauth_clients_table')->up(); 44 + migration('2016_03_18_170004_create_oauth_client_endpoints_table')->up(); 45 + migration('2016_03_18_170005_create_oauth_client_scopes_table')->up(); 46 + migration('2016_03_18_170006_create_oauth_client_grants_table')->up(); 47 + migration('2016_03_18_170007_create_oauth_sessions_table')->up(); 48 + migration('2016_03_18_170008_create_oauth_session_scopes_table')->up(); 49 + migration('2016_03_18_170009_create_oauth_auth_codes_table')->up(); 50 + migration('2016_03_18_170010_create_oauth_auth_code_scopes_table')->up(); 51 + migration('2016_03_18_170011_create_oauth_access_tokens_table')->up(); 52 + migration('2016_03_18_170012_create_oauth_access_token_scopes_table')->up(); 53 + migration('2016_03_18_170013_create_oauth_refresh_tokens_table')->up(); 54 54 } 55 55 }
+4 -4
database/migrations/2017_02_01_105338_drop_slack_users.php
··· 25 25 */ 26 26 public function down() 27 27 { 28 - (new CreateOsuSlackUsersTable())->up(); 29 - (new ChangePrimaryKeyOnSlackUsers())->up(); 30 - (new OsuSlackUserMakeSlackIdNullable())->up(); 31 - (new AddIndexOnSlackId())->up(); 28 + migration('2016_02_27_103851_create_osu_slack_users_table')->up(); 29 + migration('2016_03_02_214730_change_primary_key_on_slack_users')->up(); 30 + migration('2016_03_03_223651_osu_slack_user_make_slack_id_nullable')->up(); 31 + migration('2016_03_09_083112_add_index_on_slack_id')->up(); 32 32 } 33 33 }
+2 -2
database/migrations/2017_02_13_013536_delete_contest_vote_aggregates_view.php
··· 14 14 */ 15 15 public function up() 16 16 { 17 - (new CreateContestVoteAggregatesView())->down(); 17 + migration('2016_08_25_055700_create_contest_vote_aggregates_view')->down(); 18 18 } 19 19 20 20 /** ··· 24 24 */ 25 25 public function down() 26 26 { 27 - (new CreateContestVoteAggregatesView())->up(); 27 + migration('2016_08_25_055700_create_contest_vote_aggregates_view')->up(); 28 28 } 29 29 }
+2 -2
database/migrations/2017_08_28_110634_drop_beatmapset_discussions.php
··· 14 14 */ 15 15 public function up() 16 16 { 17 - (new CreateBeatmapsetDiscussions())->down(); 17 + migration('2016_02_29_052133_create_beatmapset_discussions')->down(); 18 18 } 19 19 20 20 /** ··· 24 24 */ 25 25 public function down() 26 26 { 27 - (new CreateBeatmapsetDiscussions())->up(); 27 + migration('2016_02_29_052133_create_beatmapset_discussions')->up(); 28 28 } 29 29 }
+2 -2
database/migrations/2017_11_22_081837_remove_kudosu_refresh_votes_from_beatmap_discussions.php
··· 14 14 */ 15 15 public function up() 16 16 { 17 - (new AddKudosuRefreshVotesToBeatmapDiscussions())->down(); 17 + migration('2016_12_19_132350_add_kudosu_refresh_votes_to_beatmap_discussions')->down(); 18 18 } 19 19 20 20 /** ··· 24 24 */ 25 25 public function down() 26 26 { 27 - (new AddKudosuRefreshVotesToBeatmapDiscussions())->up(); 27 + migration('2016_12_19_132350_add_kudosu_refresh_votes_to_beatmap_discussions')->up(); 28 28 } 29 29 }
+1 -1
database/migrations/2021_09_15_065842_create_new_score_tables.php
··· 49 49 { 50 50 Schema::dropIfExists('solo_scores_process_history'); 51 51 Schema::dropIfExists('solo_scores'); 52 - (new CreateSoloScores())->up(); 52 + migration('2021_03_24_130818_create_solo_scores')->up(); 53 53 } 54 54 }