Skip to content

Commit

Permalink
Fix DB migration. Fix #2168
Browse files Browse the repository at this point in the history
  • Loading branch information
deluan committed Feb 12, 2023
1 parent 3cd934a commit 2400e4f
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,16 @@ func upChangeImageFilesListSeparator(tx *sql.Tx) error {
return err
}

var id, imageFiles string
var id string
var imageFiles sql.NullString
for rows.Next() {
err = rows.Scan(&id, &imageFiles)
if err != nil {
return err
}

files := upChangeImageFilesListSeparatorDirs(imageFiles)
if files == imageFiles {
files := upChangeImageFilesListSeparatorDirs(imageFiles.String)
if files == imageFiles.String {
continue
}
_, err = stmt.Exec(files, id)
Expand Down

0 comments on commit 2400e4f

Please sign in to comment.