mirror of
https://github.com/TECHNOFAB11/dbmate.git
synced 2026-02-02 17:35:08 +01:00
Upgrade to Go 1.9 (#19)
This commit is contained in:
parent
12e798c691
commit
6d5a22fce8
2 changed files with 3 additions and 11 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
FROM golang:1.8
|
FROM golang:1.9
|
||||||
|
|
||||||
# required to force cgo (for sqlite driver) with cross compile
|
# required to force cgo (for sqlite driver) with cross compile
|
||||||
ENV CGO_ENABLED 1
|
ENV CGO_ENABLED 1
|
||||||
|
|
|
||||||
12
db.go
12
db.go
|
|
@ -195,11 +195,7 @@ func (db *DB) Migrate() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// record migration
|
// record migration
|
||||||
if err := drv.InsertMigration(tx, ver); err != nil {
|
return drv.InsertMigration(tx, ver)
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
@ -338,11 +334,7 @@ func (db *DB) Rollback() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove migration record
|
// remove migration record
|
||||||
if err := drv.DeleteMigration(tx, latest); err != nil {
|
return drv.DeleteMigration(tx, latest)
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue