-
Notifications
You must be signed in to change notification settings - Fork 664
Allow emails
table to contain multiple emails per user
#11642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,22 @@ | |
/// The `target` column of the `dependencies` table. | ||
/// | ||
/// Its SQL type is `Nullable<Varchar>`. | ||
@@ -536,13 +536,14 @@ | ||
/// | ||
/// Its SQL type is `Nullable<Timestamptz>`. | ||
/// | ||
/// (Automatically generated by Diesel.) | ||
token_generated_at -> Nullable<Timestamptz>, | ||
/// Whether this email is the primary email address for the user. | ||
- is_primary -> Bool, | ||
+ #[sql_name = "is_primary"] | ||
+ primary -> Bool, | ||
} | ||
} | ||
|
||
diesel::table! { | ||
/// Representation of the `follows` table. | ||
/// | ||
Comment on lines
+48
to
+63
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. since the patch file is already a bit hard to maintain, I think it might be easier to just use |
||
@@ -710,6 +702,24 @@ | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -538,6 +538,9 @@ diesel::table! { | |
/// | ||
/// (Automatically generated by Diesel.) | ||
token_generated_at -> Nullable<Timestamptz>, | ||
/// Whether this email is the primary email address for the user. | ||
#[sql_name = "is_primary"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
primary -> Bool, | ||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably not worth the extra complexity fixing it, but worth mentioning: if
insert_or_update_primary()
is called on aNewEmail
withprimary: false
, then this code path would not add it as a primary email. the only call site of this method is currently settingprimary: true
, but I'm wondering whether we should at leasterror!(...)
log that case for now.