From 2400e4f60da705888298cb493948b1c008a1980c Mon Sep 17 00:00:00 2001 From: Deluan Date: Sun, 12 Feb 2023 14:58:33 -0500 Subject: [PATCH] Fix DB migration. Fix #2168 --- .../20230209181414_change_image_files_list_separator.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/db/migration/20230209181414_change_image_files_list_separator.go b/db/migration/20230209181414_change_image_files_list_separator.go index 4d9070cb8..9df876469 100644 --- a/db/migration/20230209181414_change_image_files_list_separator.go +++ b/db/migration/20230209181414_change_image_files_list_separator.go @@ -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)