mirror of
https://github.com/TECHNOFAB11/dbmate.git
synced 2025-12-11 23:50:04 +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
|
||||
ENV CGO_ENABLED 1
|
||||
|
|
|
|||
12
db.go
12
db.go
|
|
@ -195,11 +195,7 @@ func (db *DB) Migrate() error {
|
|||
}
|
||||
|
||||
// record migration
|
||||
if err := drv.InsertMigration(tx, ver); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return drv.InsertMigration(tx, ver)
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
@ -338,11 +334,7 @@ func (db *DB) Rollback() error {
|
|||
}
|
||||
|
||||
// remove migration record
|
||||
if err := drv.DeleteMigration(tx, latest); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return drv.DeleteMigration(tx, latest)
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue