Skip to content

Commit

Permalink
Fix: migration
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky committed Oct 24, 2024
1 parent 861c567 commit 4ac8d02
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ func init() {
}

func upSignalMsgTypes(ctx context.Context, db *bun.DB) error {
if _, err := db.ExecContext(ctx, `ALTER TYPE msg_type ADD VALUE 'MsgSignalVersion' AFTER 'MsgAcknowledgement'`); err != nil {
if _, err := db.ExecContext(ctx, `ALTER TYPE msg_type ADD VALUE IF NOT EXISTS 'MsgSignalVersion' AFTER 'MsgAcknowledgement'`); err != nil {
return err
}
if _, err := db.ExecContext(ctx, `ALTER TYPE msg_type ADD VALUE 'MsgTryUpgrade' AFTER 'MsgSignalVersion'`); err != nil {
if _, err := db.ExecContext(ctx, `ALTER TYPE msg_type ADD VALUE IF NOT EXISTS 'MsgTryUpgrade' AFTER 'MsgSignalVersion'`); err != nil {
return err
}
return nil
Expand Down

0 comments on commit 4ac8d02

Please sign in to comment.