mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-12-25 15:04:26 +01:00
16 lines
414 B
Go
16 lines
414 B
Go
package upgrades
|
|
|
|
import (
|
|
"database/sql"
|
|
)
|
|
|
|
func init() {
|
|
upgrades[11] = upgrade{"Adjust the length of column topic in portal", func(tx *sql.Tx, ctx context) error {
|
|
if ctx.dialect == SQLite {
|
|
// SQLite doesn't support constraint updates, but it isn't that careful with constraints anyway.
|
|
return nil
|
|
}
|
|
_, err := tx.Exec(`ALTER TABLE portal ALTER COLUMN topic TYPE VARCHAR(512)`)
|
|
return err
|
|
}}
|
|
}
|