mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-11-14 14:02:12 +01:00
15 lines
302 B
Go
15 lines
302 B
Go
package upgrades
|
|
|
|
import (
|
|
"database/sql"
|
|
)
|
|
|
|
func init() {
|
|
upgrades[2] = upgrade{"Add timestamp column to messages", func(tx *sql.Tx, ctx context) error {
|
|
_, err := tx.Exec("ALTER TABLE message ADD COLUMN timestamp BIGINT NOT NULL DEFAULT 0")
|
|
if err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}}
|
|
}
|