mirror of
https://github.com/TECHNOFAB11/dbmate.git
synced 2025-12-13 00:20:04 +01:00
Add wait command (#35)
This commit is contained in:
parent
6ba419a74b
commit
cacf5de3ec
11 changed files with 232 additions and 4 deletions
|
|
@ -225,3 +225,15 @@ func (drv MySQLDriver) DeleteMigration(db Transaction, version string) error {
|
|||
|
||||
return err
|
||||
}
|
||||
|
||||
// Ping verifies a connection to the database server. It does not verify whether the
|
||||
// specified database exists.
|
||||
func (drv MySQLDriver) Ping(u *url.URL) error {
|
||||
db, err := drv.openRootDB(u)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer mustClose(db)
|
||||
|
||||
return db.Ping()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue