3
0

upd(all): lock migrations table

This commit is contained in:
Tit Petric 2019-04-26 21:29:18 +02:00
parent 1a7c971597
commit c297b173eb
3 changed files with 9 additions and 0 deletions

View File

@ -97,6 +97,9 @@ func Migrate(db *factory.DB) error {
return err
}
db.Exec("LOCK TABLE migrations WRITE;")
defer db.Exec("UNLOCK TABLES")
for _, filename := range files {
if err := migrate(filename, true); err != nil {
return err

View File

@ -97,6 +97,9 @@ func Migrate(db *factory.DB) error {
return err
}
db.Exec("LOCK TABLE migrations WRITE;")
defer db.Exec("UNLOCK TABLES")
for _, filename := range files {
if err := migrate(filename, true); err != nil {
return err

View File

@ -97,6 +97,9 @@ func Migrate(db *factory.DB) error {
return err
}
db.Exec("LOCK TABLE migrations WRITE;")
defer db.Exec("UNLOCK TABLES")
for _, filename := range files {
if err := migrate(filename, true); err != nil {
return err