Skip to content

Commit

Permalink
fix(GODT-2522): Handle duplicate message flags during migration
Browse files Browse the repository at this point in the history
  • Loading branch information
LBeernaertProton committed Jun 28, 2023
1 parent ef66803 commit e2cfbe8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/db_impl/sqlite3/v1/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ func migrateMessageFlags(ctx context.Context, tx utils.QueryWrapper) error {
}

for _, chunk := range xslices.Chunk(flags, db.ChunkLimit) {
insertQuery := fmt.Sprintf("INSERT INTO %v (`%v`, `%v`) VALUES %v",
insertQuery := fmt.Sprintf("INSERT OR IGNORE INTO %v (`%v`, `%v`) VALUES %v",
MessageFlagsTableName,
MessageFlagsFieldMessageID,
MessageFlagsFieldValue,
Expand Down

0 comments on commit e2cfbe8

Please sign in to comment.