upd(all): lock migrations table

This commit is contained in:
Tit Petric
2019-04-26 22:11:28 +02:00
parent 1a7c971597
commit c297b173eb
3 changed files with 9 additions and 0 deletions
+3
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
+3
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
+3
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