Upgrade message content in db to new protocol schema

This commit is contained in:
Tulir Asokan
2019-05-24 01:09:42 +03:00
parent 8d0d5ff504
commit 95e62fae77
6 changed files with 68 additions and 7 deletions

View File

@ -5,7 +5,7 @@ import (
)
func init() {
upgrades[1] = upgrade{"Add ON DELETE CASCADE to message table", func(dialect Dialect, tx *sql.Tx) error {
upgrades[1] = upgrade{"Add ON DELETE CASCADE to message table", func(dialect Dialect, tx *sql.Tx, db *sql.DB) error {
if dialect == SQLite {
// SQLite doesn't support constraint updates, but it isn't that careful with constraints anyway.
return nil