mirror of https://github.com/status-im/migrate.git
Use both db name and migration table name for lock hash
This commit is contained in:
parent
803598293e
commit
9632882b69
|
@ -156,7 +156,8 @@ func (m *Mysql) Lock() error {
|
||||||
return database.ErrLocked
|
return database.ErrLocked
|
||||||
}
|
}
|
||||||
|
|
||||||
aid, err := database.GenerateAdvisoryLockId(m.config.DatabaseName)
|
aid, err := database.GenerateAdvisoryLockId(
|
||||||
|
fmt.Sprintf("%s:%s", m.config.DatabaseName, m.config.MigrationsTable)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -180,7 +181,8 @@ func (m *Mysql) Unlock() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
aid, err := database.GenerateAdvisoryLockId(m.config.DatabaseName)
|
aid, err := database.GenerateAdvisoryLockId(
|
||||||
|
fmt.Sprintf("%s:%s", m.config.DatabaseName, m.config.MigrationsTable)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue