mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-12-23 22:14:06 +01:00
parent
da9fadb009
commit
d52b012b37
2 changed files with 4 additions and 4 deletions
|
@ -108,7 +108,7 @@ func Migrate(old *Database, new *Database) {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
err = migrateTable(old, new, "message", "chat_jid", "chat_receiver", "jid", "mxid", "sender", "content", "timestamp")
|
||||
err = migrateTable(old, new, "message", "chat_jid", "chat_receiver", "jid", "mxid", "sender", "timestamp", "sent")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ func Migrate(old *Database, new *Database) {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
err = migrateTable(old, new, "mx_user_profile", "room_id", "user_id", "membership")
|
||||
err = migrateTable(old, new, "mx_user_profile", "room_id", "user_id", "membership", "displayname", "avatar_url")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ func Migrate(old *Database, new *Database) {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
err = migrateTable(old, new, "crypto_megolm_inbound_session", "account_id", "session_id", "sender_key", "signing_key", "room_id", "session", "forwarding_chains")
|
||||
err = migrateTable(old, new, "crypto_megolm_inbound_session", "account_id", "session_id", "sender_key", "signing_key", "room_id", "session", "forwarding_chains", "withheld_code", "withheld_reason")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
2
main.go
2
main.go
|
@ -120,7 +120,7 @@ func (bridge *Bridge) MigrateDatabase() {
|
|||
os.Exit(31)
|
||||
}
|
||||
|
||||
newDB, err := database.New(bridge.Config.AppService.Database.Type, bridge.Config.AppService.Database.URI, bridge.Log)
|
||||
newDB, err := database.New(bridge.Config.AppService.Database.Type, bridge.Config.AppService.Database.URI, log.DefaultLogger)
|
||||
if err != nil {
|
||||
fmt.Println("Failed to open new database:", err)
|
||||
os.Exit(32)
|
||||
|
|
Loading…
Reference in a new issue