diff --git a/cmd/rushlink-migrate-db/main.go b/cmd/rushlink-migrate-db/main.go index 4650994..35f0f53 100644 --- a/cmd/rushlink-migrate-db/main.go +++ b/cmd/rushlink-migrate-db/main.go @@ -33,14 +33,15 @@ func main() { log.Fatalln(err) } + // Migrate database schema + m := db.Gormigrate(sqlDB) + if err := m.MigrateTo("202010251337"); err != nil { + log.Fatalln(err) + } + // Migrate all files in filestorage if err := sqlDB.Transaction(func(sqlTx *gorm.DB) error { return boltDB.Bolt.View(func(boltTx *bolt.Tx) error { - // Migrate database schema - m := db.Gormigrate(sqlTx) - if err := m.MigrateTo("202010251337"); err != nil { - return err - } // Migrate all the file uploads allFUs, err := boltdb.AllFileUploads(boltTx) if err != nil {