Improve errors in state store migration edge cases

This commit is contained in:
Tulir Asokan
2019-08-25 17:25:19 +03:00
parent ab91d326fd
commit 3be9aa2319
13 changed files with 42 additions and 23 deletions

View File

@ -5,7 +5,7 @@ import (
)
func init() {
upgrades[3] = upgrade{"Add last_connection column to users", func(dialect Dialect, tx *sql.Tx, db *sql.DB) error {
upgrades[3] = upgrade{"Add last_connection column to users", func(tx *sql.Tx, ctx context) error {
_, err := tx.Exec(`ALTER TABLE "user" ADD COLUMN last_connection BIGINT NOT NULL DEFAULT 0`)
if err != nil {
return err