Merge pull request #1913 from zed-industries/Add-column-to-signups-for-added-to-mailing-list

Add "added_to_mailing_list" column on signups table
This commit is contained in:
Joseph T. Lyons 2022-11-29 19:30:11 -05:00 committed by GitHub
commit 3a1cd6ed3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 2 deletions

View file

@ -390,10 +390,11 @@ impl Db<sqlx::Postgres> {
platform_unknown,
editor_features,
programming_languages,
device_id
device_id,
added_to_mailing_list
)
VALUES
($1, $2, FALSE, $3, $4, $5, FALSE, $6, $7, $8)
($1, $2, FALSE, $3, $4, $5, FALSE, $6, $7, $8, $9)
ON CONFLICT (email_address) DO UPDATE SET
email_address = excluded.email_address
RETURNING id
@ -407,6 +408,7 @@ impl Db<sqlx::Postgres> {
.bind(&signup.editor_features)
.bind(&signup.programming_languages)
.bind(&signup.device_id)
.bind(&signup.added_to_mailing_list)
.execute(&self.pool)
.await?;
Ok(())
@ -1272,6 +1274,7 @@ pub struct Signup {
pub editor_features: Vec<String>,
pub programming_languages: Vec<String>,
pub device_id: Option<String>,
pub added_to_mailing_list: bool,
}
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize, FromRow)]