mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-05-20 04:43:46 +02:00
21 lines
372 B
Go
21 lines
372 B
Go
package upgrades
|
|
|
|
import (
|
|
"database/sql"
|
|
)
|
|
|
|
func init() {
|
|
upgrades[41] = upgrade{"Update backfill queue tables to be sortable by priority", func(tx *sql.Tx, ctx context) error {
|
|
_, err := tx.Exec(`
|
|
UPDATE backfill_queue
|
|
SET type=CASE
|
|
WHEN type=1 THEN 200
|
|
WHEN type=2 THEN 300
|
|
ELSE type
|
|
END
|
|
WHERE type=1 OR type=2
|
|
`)
|
|
return err
|
|
}}
|
|
}
|