Skip to content

Commit

Permalink
Removing local_user.show_scores column, since its now on the
Browse files Browse the repository at this point in the history
local_user_vote_display_mode table.

- See #4450
  • Loading branch information
dessalines committed Mar 4, 2024
1 parent 3c358e5 commit de92dfb
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 8 deletions.
1 change: 0 additions & 1 deletion crates/api/src/local_user/save_settings.rs
Expand Up @@ -116,7 +116,6 @@ pub async fn save_user_settings(
blur_nsfw: data.blur_nsfw,
auto_expand: data.auto_expand,
show_bot_accounts: data.show_bot_accounts,
show_scores: data.show_scores,
default_sort_type,
default_listing_type,
theme: data.theme.clone(),
Expand Down
1 change: 0 additions & 1 deletion crates/apub/src/api/user_settings_backup.rs
Expand Up @@ -115,7 +115,6 @@ pub async fn import_settings(
.settings
.as_ref()
.map(|s| s.send_notifications_to_email),
show_scores: data.settings.as_ref().map(|s| s.show_scores),
show_bot_accounts: data.settings.as_ref().map(|s| s.show_bot_accounts),
show_read_posts: data.settings.as_ref().map(|s| s.show_read_posts),
open_links_in_new_tab: data.settings.as_ref().map(|s| s.open_links_in_new_tab),
Expand Down
1 change: 0 additions & 1 deletion crates/db_schema/src/schema.rs
Expand Up @@ -428,7 +428,6 @@ diesel::table! {
interface_language -> Varchar,
show_avatars -> Bool,
send_notifications_to_email -> Bool,
show_scores -> Bool,
show_bot_accounts -> Bool,
show_read_posts -> Bool,
email_verified -> Bool,
Expand Down
4 changes: 0 additions & 4 deletions crates/db_schema/src/source/local_user.rs
Expand Up @@ -35,8 +35,6 @@ pub struct LocalUser {
/// Whether to show avatars.
pub show_avatars: bool,
pub send_notifications_to_email: bool,
/// Whether to show comment / post scores.
pub show_scores: bool,
/// Whether to show bot accounts.
pub show_bot_accounts: bool,
/// Whether to show read posts.
Expand Down Expand Up @@ -83,7 +81,6 @@ pub struct LocalUserInsertForm {
pub show_avatars: Option<bool>,
pub send_notifications_to_email: Option<bool>,
pub show_bot_accounts: Option<bool>,
pub show_scores: Option<bool>,
pub show_read_posts: Option<bool>,
pub email_verified: Option<bool>,
pub accepted_application: Option<bool>,
Expand Down Expand Up @@ -114,7 +111,6 @@ pub struct LocalUserUpdateForm {
pub show_avatars: Option<bool>,
pub send_notifications_to_email: Option<bool>,
pub show_bot_accounts: Option<bool>,
pub show_scores: Option<bool>,
pub show_read_posts: Option<bool>,
pub email_verified: Option<bool>,
pub accepted_application: Option<bool>,
Expand Down
1 change: 0 additions & 1 deletion crates/db_views/src/registration_application_view.rs
Expand Up @@ -258,7 +258,6 @@ mod tests {
show_avatars: inserted_sara_local_user.show_avatars,
send_notifications_to_email: inserted_sara_local_user.send_notifications_to_email,
show_bot_accounts: inserted_sara_local_user.show_bot_accounts,
show_scores: inserted_sara_local_user.show_scores,
show_read_posts: inserted_sara_local_user.show_read_posts,
email_verified: inserted_sara_local_user.email_verified,
accepted_application: inserted_sara_local_user.accepted_application,
Expand Down
@@ -0,0 +1,3 @@
ALTER TABLE local_user
ADD COLUMN show_scores boolean NOT NULL DEFAULT TRUE;

3 changes: 3 additions & 0 deletions migrations/2024-03-04-143245_remove_show_scores_column/up.sql
@@ -0,0 +1,3 @@
ALTER TABLE local_user
DROP COLUMN show_scores;

0 comments on commit de92dfb

Please sign in to comment.