Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyxo committed Mar 4, 2025
1 parent ffd0294 commit b43f421
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion internal/migrator/clickhouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ type ClickHouse struct {
conn *sql.DB
config *Config
isLocked atomic.Bool
engine string
}

func (ch *ClickHouse) Open(dsn string) (database.Driver, error) {
Expand Down Expand Up @@ -76,7 +77,7 @@ func (ch *ClickHouse) Open(dsn string) (database.Driver, error) {
}
}

migrationsTableEngine := ch.config.MigrationsTableEngine
migrationsTableEngine := ch.engine
if s := purl.Query().Get("x-migrations-table-engine"); len(s) > 0 {
migrationsTableEngine = s
}
Expand Down
4 changes: 3 additions & 1 deletion internal/migrator/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ func NewMigrateClick(cfg migrations.Clickhouse) *Click {
}

func (m *Click) Run(migrationsDir string) error {
p := &ClickHouse{}
p := &ClickHouse{
engine: m.cfg.GetEngine(),
}
a := strings.Split(m.cfg.GetCredentials().Address, ":")
e := m.cfg.GetEngine()
addr := clickhouseConnectionString(
Expand Down

0 comments on commit b43f421

Please sign in to comment.