Skip to content

Commit 3a06ab7

Browse files
authored
Merge pull request #11095 from nanaya/profile-customization-drop-cover
Remove cover json from user profile customization model
2 parents 9d9ec97 + 190e5a7 commit 3a06ab7

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

app/Models/UserProfileCustomization.php

-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use Illuminate\Database\Eloquent\Casts\AsArrayObject;
99

1010
/**
11-
* @property array|null $cover_json
1211
* @property \Carbon\Carbon $created_at
1312
* @property string|null $extras_order
1413
* @property int $id
@@ -62,7 +61,6 @@ class UserProfileCustomization extends Model
6261
public $incrementing = false;
6362

6463
protected $casts = [
65-
'cover_json' => 'array',
6664
'options' => AsArrayObject::class,
6765
];
6866
protected $primaryKey = 'user_id';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
public function up(): void
15+
{
16+
Schema::table('user_profile_customizations', function (Blueprint $table) {
17+
$table->dropColumn('cover_json');
18+
});
19+
}
20+
21+
public function down(): void
22+
{
23+
Schema::table('user_profile_customizations', function (Blueprint $table) {
24+
$table->text('cover_json')->after('user_id')->nullable(true);
25+
});
26+
}
27+
};

0 commit comments

Comments
 (0)