diff options
| author | Eugene Triguba <eugenetriguba@gmail.com> | 2024-03-09 15:50:21 -0500 |
|---|---|---|
| committer | Eugene Triguba <eugenetriguba@gmail.com> | 2024-03-09 15:50:21 -0500 |
| commit | 9d2abbe510d1719bcfe31db901423376f79b7894 (patch) | |
| tree | 00f5a057571a3ca779e5bbe96655169c58a692f9 /internal/commands/up.go | |
| parent | use docker compose to start database in workflow (diff) | |
| download | cli-9d2abbe510d1719bcfe31db901423376f79b7894.zip | |
Add MySQL support
Diffstat (limited to 'internal/commands/up.go')
| -rw-r--r-- | internal/commands/up.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/internal/commands/up.go b/internal/commands/up.go index 330864f..a203d2e 100644 --- a/internal/commands/up.go +++ b/internal/commands/up.go @@ -54,15 +54,12 @@ func (cmd *UpCmd) Execute( return subcommands.ExitFailure } - db, err := storage.DBConnect( - cfg.Connection.Driver, - storage.DBConnectionString(&cfg.Connection), - ) + db, err := storage.DBConnect(cfg.Connection) if err != nil { consoleOutputter.Error(fmt.Errorf("unable to connect to database: %w", err)) return subcommands.ExitFailure } - defer db.Close() + defer db.Session.Close() migrationDBRepo, err := repositories.NewMigrationDBRepo(db) if err != nil { |