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

@ -6,9 +6,9 @@ import (
)
func init() {
upgrades[0] = upgrade{"Initial schema", func(dialect Dialect, tx *sql.Tx, db *sql.DB) error {
upgrades[0] = upgrade{"Initial schema", func(tx *sql.Tx, ctx context) error {
var byteType string
if dialect == SQLite {
if ctx.dialect == SQLite {
byteType = "BLOB"
} else {
byteType = "bytea"