This commit is contained in:
@@ -36,6 +36,9 @@ final class ProfileSettings
|
||||
'avatar_beard_style' => "ALTER TABLE user_profiles ADD COLUMN avatar_beard_style VARCHAR(24) NOT NULL DEFAULT 'none' AFTER avatar_eye_color",
|
||||
'avatar_glasses_style' => "ALTER TABLE user_profiles ADD COLUMN avatar_glasses_style VARCHAR(24) NOT NULL DEFAULT 'none' AFTER avatar_beard_style",
|
||||
'avatar_head_shape' => "ALTER TABLE user_profiles ADD COLUMN avatar_head_shape VARCHAR(24) NOT NULL DEFAULT 'round' AFTER avatar_glasses_style",
|
||||
'avatar_hat_style' => "ALTER TABLE user_profiles ADD COLUMN avatar_hat_style VARCHAR(24) NOT NULL DEFAULT 'none' AFTER avatar_head_shape",
|
||||
'avatar_hat_color' => "ALTER TABLE user_profiles ADD COLUMN avatar_hat_color VARCHAR(24) NOT NULL DEFAULT 'navy' AFTER avatar_hat_style",
|
||||
'avatar_outfit_color' => "ALTER TABLE user_profiles ADD COLUMN avatar_outfit_color VARCHAR(24) NOT NULL DEFAULT 'slate' AFTER avatar_hat_color",
|
||||
];
|
||||
foreach ($avatarColumns as $column => $sql) {
|
||||
if (!$this->hasColumn('user_profiles', $column)) {
|
||||
@@ -92,6 +95,9 @@ final class ProfileSettings
|
||||
avatar_beard_style = :beardStyle,
|
||||
avatar_glasses_style = :glassesStyle,
|
||||
avatar_head_shape = :headShape,
|
||||
avatar_hat_style = :hatStyle,
|
||||
avatar_hat_color = :hatColor,
|
||||
avatar_outfit_color = :outfitColor,
|
||||
updated_at = NOW()
|
||||
WHERE user_id = :id'
|
||||
);
|
||||
@@ -103,6 +109,9 @@ final class ProfileSettings
|
||||
'beardStyle' => $avatar['avatar_beard_style'],
|
||||
'glassesStyle' => $avatar['avatar_glasses_style'],
|
||||
'headShape' => $avatar['avatar_head_shape'],
|
||||
'hatStyle' => $avatar['avatar_hat_style'],
|
||||
'hatColor' => $avatar['avatar_hat_color'],
|
||||
'outfitColor' => $avatar['avatar_outfit_color'],
|
||||
'id' => $userId,
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user