Skip to content

Commit

Permalink
#42 supporting varaiable placeholders into sql migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
raoptimus committed Dec 4, 2024
1 parent b58cdbb commit 36dbc13
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/migrator/db_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ package migrator

import (
"net/url"
"strings"

"github.com/raoptimus/db-migrator.go/internal/action"
"github.com/raoptimus/db-migrator.go/internal/builder"
Expand Down Expand Up @@ -133,7 +134,8 @@ func (s *DBService) MigrationService() (*service.Migration, error) {
}
}

dsn, err := url.Parse(s.options.DSN)
udsn, _, _ := strings.Cut(s.options.DSN, "@")
dsn, err := url.Parse(udsn + "@")
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 36dbc13

Please sign in to comment.