mautrix-whatsapp/database/upgrades/2022-05-12-history-sync-message-add-added-timestamp.go
Sumner Evans 17c697445d
history sync: store timestamp when the message got put into the DB
This will be useful for debugging issues with missing messages
2022-05-15 21:42:42 -06:00

16 lines
355 B
Go

package upgrades
import (
"database/sql"
)
func init() {
upgrades[46] = upgrade{"Add inserted time to history sync message", func(tx *sql.Tx, ctx context) error {
// Add the inserted time TIMESTAMP column to history_sync_message
_, err := tx.Exec(`
ALTER TABLE history_sync_message
ADD COLUMN inserted_time TIMESTAMP
`)
return err
}}
}