vendor dependencies with dep
This commit is contained in:
parent
93d8310491
commit
1384296a47
2712 changed files with 965742 additions and 0 deletions
19
vendor/github.com/go-pg/migrations/example/2_add_id.go
generated
vendored
Normal file
19
vendor/github.com/go-pg/migrations/example/2_add_id.go
generated
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/go-pg/migrations"
|
||||
)
|
||||
|
||||
func init() {
|
||||
migrations.Register(func(db migrations.DB) error {
|
||||
fmt.Println("adding id column...")
|
||||
_, err := db.Exec(`ALTER TABLE my_table ADD id serial`)
|
||||
return err
|
||||
}, func(db migrations.DB) error {
|
||||
fmt.Println("dropping id column...")
|
||||
_, err := db.Exec(`ALTER TABLE my_table DROP id`)
|
||||
return err
|
||||
})
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue