Merge pull request #553 from photoview/viktorstrate/issue502
Add bigint as correct type for exif migrations
This commit is contained in:
commit
a0e73aa3d0
|
@ -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":
|
case "double", "numeric", "real", "bigint":
|
||||||
// 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":
|
case "double", "numeric", "real", "bigint":
|
||||||
// correct type, do nothing
|
// correct type, do nothing
|
||||||
default:
|
default:
|
||||||
// do migration
|
// do migration
|
||||||
|
|
Loading…
Reference in New Issue