This commit is contained in:
5
lnvps_db/migrations/20250313140640_empty_country.sql
Normal file
5
lnvps_db/migrations/20250313140640_empty_country.sql
Normal file
@ -0,0 +1,5 @@
|
||||
alter table users
|
||||
change column country_code country_code varchar (3);
|
||||
-- assume country_code was not actually set until now
|
||||
update users
|
||||
set country_code = null;
|
@ -22,7 +22,7 @@ pub struct User {
|
||||
/// If user should be contacted via email for notifications
|
||||
pub contact_email: bool,
|
||||
/// Users country
|
||||
pub country_code: String,
|
||||
pub country_code: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(FromRow, Clone, Debug, Default)]
|
||||
|
@ -441,7 +441,8 @@ impl LNVpsDb for LNVpsDbMysql {
|
||||
|
||||
let mut tx = self.db.begin().await?;
|
||||
|
||||
sqlx::query("update vm_payment set is_paid = true where id = ?")
|
||||
sqlx::query("update vm_payment set is_paid = true, external_data = ? where id = ?")
|
||||
.bind(&vm_payment.external_data)
|
||||
.bind(&vm_payment.id)
|
||||
.execute(&mut *tx)
|
||||
.await?;
|
||||
|
Reference in New Issue
Block a user