mirror of https://github.com/status-im/migrate.git
fix: set current database
This commit is contained in:
parent
e86f4a201c
commit
8cd9761d29
|
@ -80,7 +80,7 @@ func (ch *ClickHouse) Open(dsn string) (database.Driver, error) {
|
||||||
|
|
||||||
func (ch *ClickHouse) init() error {
|
func (ch *ClickHouse) init() error {
|
||||||
if len(ch.config.DatabaseName) == 0 {
|
if len(ch.config.DatabaseName) == 0 {
|
||||||
if err := ch.conn.QueryRow("SELECT currentDatabase()").Scan(ch.config.DatabaseName); err != nil {
|
if err := ch.conn.QueryRow("SELECT currentDatabase()").Scan(&ch.config.DatabaseName); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue