the browser-facing portion of osu!
0
fork

Configure Feed

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

Merge branch 'master' into mp-solo-link-migration

authored by

Edho Arief and committed by
GitHub
e49a06b4 58646b29

+128 -10
-4
app/Models/Beatmap.php
··· 37 37 * @property int $hit_length 38 38 * @property \Carbon\Carbon $last_update 39 39 * @property mixed $mode 40 - * @property bool $orphaned 41 40 * @property int $passcount 42 41 * @property int $playcount 43 42 * @property int $playmode ··· 58 57 59 58 protected $casts = [ 60 59 'last_update' => 'datetime', 61 - 'orphaned' => 'boolean', 62 60 ]; 63 61 64 62 public $timestamps = false; ··· 247 245 'total_length', 248 246 'user_id', 249 247 'youtube_preview' => $this->getRawAttribute($key), 250 - 251 - 'orphaned' => (bool) $this->getRawAttribute($key), 252 248 253 249 'deleted_at', 254 250 'last_update' => $this->getTimeFast($key),
-4
app/Models/User.php
··· 161 161 * @property int $user_last_privmsg 162 162 * @property int $user_last_search 163 163 * @property int $user_last_warning 164 - * @property string $user_lastfm 165 - * @property string $user_lastfm_session 166 164 * @property Carbon|null $user_lastmark 167 165 * @property string $user_lastpage 168 166 * @property Carbon|null $user_lastpost_time ··· 784 782 'user_last_privmsg', 785 783 'user_last_search', 786 784 'user_last_warning', 787 - 'user_lastfm', 788 - 'user_lastfm_session', 789 785 'user_lastpage', 790 786 'user_login_attempts', 791 787 'user_message_rules',
+2 -2
database/migrations/2020_05_15_083037_sync_structure.php
··· 7 7 use Illuminate\Database\Schema\Blueprint; 8 8 use Illuminate\Support\Facades\Schema; 9 9 10 - class SyncStructure extends Migration 10 + return new class extends Migration 11 11 { 12 12 const MODE_SUFFIXES = ['', '_fruits', '_mania', '_taiko']; 13 13 ··· 449 449 { 450 450 throw new Exception('no rolling back from this migration =)'); 451 451 } 452 - } 452 + };
+126
database/migrations/2023_08_17_133006_sync_structure.php
··· 1 + <?php 2 + 3 + // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0. 4 + // See the LICENCE file in the repository root for full licence text. 5 + 6 + declare(strict_types=1); 7 + 8 + use Illuminate\Database\Migrations\Migration; 9 + use Illuminate\Database\Schema\Blueprint; 10 + use Illuminate\Support\Facades\Schema; 11 + 12 + return new class extends Migration 13 + { 14 + const RULESET_TABLE_SUFFIXES = ['', '_fruits', '_mania', '_mania_4k', '_mania_7k', '_taiko']; 15 + 16 + /** 17 + * Run the migrations. 18 + */ 19 + public function up(): void 20 + { 21 + Schema::table('artist_tracks', function (Blueprint $table) { 22 + $table->string('licence_text')->nullable()->after('genre'); 23 + $table->string('cover_url', 512)->nullable()->change(); 24 + $table->string('preview', 512)->nullable(false)->change(); 25 + $table->string('osz', 512)->nullable(false)->change(); 26 + }); 27 + Schema::table('artists', function (Blueprint $table) { 28 + $table->string('alternative_name')->nullable()->after('name'); 29 + $table->boolean('use_for_linking')->nullable(false)->default(true)->after('header_url'); 30 + }); 31 + Schema::table('osu_banchostats', function (Blueprint $table) { 32 + $table->mediumInteger('users_osu')->change(); 33 + }); 34 + Schema::table('osu_beatmaps', function (Blueprint $table) { 35 + $columns = ['countTotal', 'countNormal', 'countSlider', 'countSpinner']; 36 + foreach ($columns as $column) { 37 + $table->unsignedMediumInteger($column)->default(0)->change(); 38 + } 39 + 40 + $table->dropColumn('orphaned'); 41 + }); 42 + DB::statement('ALTER TABLE osu_beatmaps MODIFY bpm float NOT NULL DEFAULT 60'); 43 + Schema::table('osu_beatmapsets', function (Blueprint $table) { 44 + $table->tinyInteger('comment_locked')->nullable()->default(0)->change(); 45 + }); 46 + Schema::table('osu_kudos_exchange', function (Blueprint $table) { 47 + $table->unsignedInteger('giver_id')->nullable()->change(); 48 + $table->unsignedInteger('receiver_id')->nullable(false)->change(); 49 + }); 50 + Schema::table('osu_user_achievements', function (Blueprint $table) { 51 + $table->index('achievement_id', 'achievement_id'); 52 + }); 53 + foreach (static::RULESET_TABLE_SUFFIXES as $suffix) { 54 + DB::statement("ALTER TABLE osu_user_stats{$suffix} MODIFY rank_score_exp float unsigned NOT NULL DEFAULT 0"); 55 + } 56 + Schema::table('phpbb_users', function (Blueprint $table) { 57 + $table->dropColumn('user_lastfm'); 58 + $table->dropColumn('user_lastfm_session'); 59 + }); 60 + Schema::table('solo_scores', function (Blueprint $table) { 61 + $table->boolean('has_replay')->nullable()->default(false)->change(); 62 + $table->datetime('created_at')->nullable(false)->change(); 63 + }); 64 + Schema::table('score_pins', function (Blueprint $table) { 65 + $table->index('score_type', 'score_type'); 66 + }); 67 + 68 + DB::connection('mysql-chat')->statement('ALTER TABLE messages MODIFY message_id bigint unsigned NOT NULL AUTO_INCREMENT'); 69 + } 70 + 71 + /** 72 + * Reverse the migrations. 73 + */ 74 + public function down(): void 75 + { 76 + Schema::table('artist_tracks', function (Blueprint $table) { 77 + $table->dropColumn('licence_text'); 78 + $table->string('cover_url')->nullable()->change(); 79 + $table->string('preview')->nullable(false)->change(); 80 + $table->string('osz')->nullable(false)->change(); 81 + }); 82 + Schema::table('artists', function (Blueprint $table) { 83 + $table->dropColumn('alternative_name'); 84 + $table->dropColumn('use_for_linking'); 85 + }); 86 + Schema::table('osu_kudos_exchange', function (Blueprint $table) { 87 + $table->unsignedMediumInteger('giver_id')->nullable()->change(); 88 + $table->unsignedMediumInteger('receiver_id')->nullable(false)->change(); 89 + }); 90 + Schema::table('osu_beatmapsets', function (Blueprint $table) { 91 + $table->tinyInteger('comment_locked')->nullable(false)->default(0)->change(); 92 + }); 93 + Schema::table('osu_beatmaps', function (Blueprint $table) { 94 + $columns = ['countTotal', 'countNormal', 'countSlider', 'countSpinner']; 95 + foreach ($columns as $column) { 96 + $table->unsignedSmallInteger($column)->default(0)->change(); 97 + } 98 + $table->tinyInteger('orphaned')->default(0)->after('passcount'); 99 + $table->double('bpm')->nullable(false)->default(60)->change(); 100 + }); 101 + Schema::table('osu_banchostats', function (Blueprint $table) { 102 + $table->smallInteger('users_osu')->change(); 103 + }); 104 + Schema::table('osu_user_achievements', function (Blueprint $table) { 105 + $table->dropIndex('achievement_id'); 106 + }); 107 + foreach (static::RULESET_TABLE_SUFFIXES as $suffix) { 108 + Schema::table("osu_user_stats{$suffix}", function (Blueprint $table) { 109 + $table->unsignedDouble('rank_score_exp')->nullable(false)->default(0)->change(); 110 + }); 111 + } 112 + Schema::table('phpbb_users', function (Blueprint $table) { 113 + $table->string('user_lastfm')->default('')->after('user_from'); 114 + $table->string('user_lastfm_session')->default('')->after('user_lastfm'); 115 + }); 116 + Schema::table('score_pins', function (Blueprint $table) { 117 + $table->dropIndex('score_type'); 118 + }); 119 + Schema::table('solo_scores', function (Blueprint $table) { 120 + $table->boolean('has_replay')->nullable(false)->default(false)->change(); 121 + $table->timestamp('created_at')->nullable()->change(); 122 + }); 123 + 124 + DB::connection('mysql-chat')->statement('ALTER TABLE messages MODIFY message_id int unsigned NOT NULL AUTO_INCREMENT'); 125 + } 126 + };