Skip to content

Commit

Permalink
[bugfix] for the second accounts.note_raw migration (#653)
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleFox94 committed Jun 16, 2022
1 parent 0e12ee0 commit c48266c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
func init() {
up := func(ctx context.Context, db *bun.DB) error {
_, err := db.ExecContext(ctx, "ALTER TABLE ? ADD COLUMN ? TEXT", bun.Ident("accounts"), bun.Ident("note_raw"))
if err != nil && !(strings.Contains(err.Error(), "already exists") || strings.Contains(err.Error(), "duplicate column name")) {
if err != nil && !(strings.Contains(err.Error(), "already exists") || strings.Contains(err.Error(), "duplicate column name") || strings.Contains(err.Error(), "SQLSTATE 42701")) {
return err
}
return nil
Expand Down

0 comments on commit c48266c

Please sign in to comment.