4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-09-17 16:22:31 +00:00

Update dependencies (#1951)

This commit is contained in:
Wim
2023-01-28 22:57:53 +01:00
committed by GitHub
parent eac2a8c8dc
commit 880586bac4
325 changed files with 151452 additions and 141118 deletions

View File

@@ -16,7 +16,7 @@ type upgradeFunc func(*sql.Tx, *Container) error
//
// This may be of use if you want to manage the database fully manually, but in most cases you
// should just call Container.Upgrade to let the library handle everything.
var Upgrades = [...]upgradeFunc{upgradeV1, upgradeV2, upgradeV3}
var Upgrades = [...]upgradeFunc{upgradeV1, upgradeV2, upgradeV3, upgradeV4}
func (c *Container) getVersion() (int, error) {
_, err := c.db.Exec("CREATE TABLE IF NOT EXISTS whatsmeow_version (version INTEGER)")
@@ -260,3 +260,14 @@ func upgradeV3(tx *sql.Tx, container *Container) error {
)`)
return err
}
func upgradeV4(tx *sql.Tx, container *Container) error {
_, err := tx.Exec(`CREATE TABLE whatsmeow_privacy_tokens (
our_jid TEXT,
their_jid TEXT,
token bytea NOT NULL,
timestamp BIGINT NOT NULL,
PRIMARY KEY (our_jid, their_jid)
)`)
return err
}