mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-31 10:43:10 -06:00
Fix migration, add IS NULL
This commit is contained in:
parent
6fe71d92bb
commit
eeaad35ce1
|
|
@ -17,7 +17,7 @@ func UpAddAccountType(tx *sql.Tx) error {
|
||||||
return fmt.Errorf("failed to add column: %w", err)
|
return fmt.Errorf("failed to add column: %w", err)
|
||||||
|
|
||||||
}
|
}
|
||||||
_, err = tx.Exec("UPDATE account_accounts SET account_type = 1 WHERE appservice_id = '';")
|
_, err = tx.Exec("UPDATE account_accounts SET account_type = 1 WHERE appservice_id = '' OR appservice_id IS NULL;")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to update user accounts: %w", err)
|
return fmt.Errorf("failed to update user accounts: %w", err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ func UpAddAccountType(tx *sql.Tx) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to add column: %w", err)
|
return fmt.Errorf("failed to add column: %w", err)
|
||||||
}
|
}
|
||||||
_, err = tx.Exec(`UPDATE account_accounts SET account_type = 1 WHERE appservice_id = ''`)
|
_, err = tx.Exec(`UPDATE account_accounts SET account_type = 1 WHERE appservice_id = '' OR appservice_id IS NULL`)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to update user accounts: %w", err)
|
return fmt.Errorf("failed to update user accounts: %w", err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue