aboutsummaryrefslogtreecommitdiffstats
path: root/internal/services
diff options
context:
space:
mode:
Diffstat (limited to 'internal/services')
-rw-r--r--internal/services/migration.go26
1 files changed, 1 insertions, 25 deletions
diff --git a/internal/services/migration.go b/internal/services/migration.go
index c0d043b..bc4b9d1 100644
--- a/internal/services/migration.go
+++ b/internal/services/migration.go
@@ -1,7 +1,6 @@
package services
import (
- "database/sql"
"fmt"
"sort"
"strconv"
@@ -36,29 +35,6 @@ func NewMigrationService(
}
}
-func NewMigrationServiceFromConfig(
- db *sql.DB,
- outputter output.Outputter,
- cfg configloader.Config,
-) (MigrationService, error) {
- migrationDBRepo, err := repositories.NewMigrationDBRepo(db)
- if err != nil {
- return MigrationService{}, err
- }
-
- migrationFsRepo, err := repositories.NewMigrationFsRepo(&cfg.Migrations)
- if err != nil {
- return MigrationService{}, err
- }
-
- return NewMigrationService(
- migrationDBRepo,
- migrationFsRepo,
- cfg,
- outputter,
- ), nil
-}
-
type sortOrder int
const (
@@ -259,7 +235,7 @@ func (ms MigrationService) RevertMigration(migration *models.Migration) error {
}
if execOptions.UseTransaction {
- err = ms.dbRepo.ApplyWithTx(scriptContents, migration)
+ err = ms.dbRepo.RevertWithTx(scriptContents, migration)
} else {
err = ms.dbRepo.Revert(scriptContents, migration)
}