mirror of
https://git.vectorsigma.ru/public/photoview.git
synced 2026-08-03 18:29:17 +00:00
fix false trigger of DB migration on sqlite (#936)
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user