fix false trigger of DB migration on sqlite (#936)

This commit is contained in:
Alex Kabakaev
2024-04-26 06:46:32 +02:00
committed by GitHub
parent f900d55300
commit d6f34211a1

View File

@@ -22,7 +22,7 @@ func migrate_exif_fields(db *gorm.DB) error {
for _, exifCol := range mediaExifColumns { for _, exifCol := range mediaExifColumns {
if exifCol.Name() == "exposure" { if exifCol.Name() == "exposure" {
switch exifCol.DatabaseTypeName() { switch exifCol.DatabaseTypeName() {
case "double", "numeric", "real", "bigint": case "double", "numeric", "real", "bigint", "integer":
// correct type, do nothing // correct type, do nothing
default: default:
// do migration // do migration
@@ -34,7 +34,7 @@ func migrate_exif_fields(db *gorm.DB) error {
if exifCol.Name() == "flash" { if exifCol.Name() == "flash" {
switch exifCol.DatabaseTypeName() { switch exifCol.DatabaseTypeName() {
case "double", "numeric", "real", "bigint": case "double", "numeric", "real", "bigint", "integer":
// correct type, do nothing // correct type, do nothing
default: default:
// do migration // do migration