Skip to content

Commit d676d67

Browse files
committed
database: Add user.publish_notifications column
1 parent 72f9568 commit d676d67

File tree

5 files changed

+9
-0
lines changed

5 files changed

+9
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE users DROP publish_notifications;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
alter table users
2+
add column publish_notifications boolean not null default true;
3+
4+
comment on column users.publish_notifications is 'Whether or not the user wants to receive notifications when a package they own is published';

src/models/user.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ pub struct User {
2424
pub account_lock_reason: Option<String>,
2525
pub account_lock_until: Option<NaiveDateTime>,
2626
pub is_admin: bool,
27+
pub publish_notifications: bool,
2728
}
2829

2930
impl User {

src/schema.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,8 @@ diesel::table! {
806806
///
807807
/// (Automatically generated by Diesel.)
808808
is_admin -> Bool,
809+
/// Whether or not the user wants to receive notifications when a package they own is published
810+
publish_notifications -> Bool,
809811
}
810812
}
811813

src/worker/jobs/dump_db/dump-db.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ gh_id = "public"
193193
account_lock_reason = "private"
194194
account_lock_until = "private"
195195
is_admin = "private"
196+
publish_notifications = "private"
196197
[users.column_defaults]
197198
gh_access_token = "''"
198199

0 commit comments

Comments
 (0)