github.com/woremacx/kocha@v0.7.1-0.20150731103243-a5889322afc9/cmd/kocha-generate/kocha-generate-migration/skeleton/migration/init.go.tmpl (about) 1 package migration 2 3 import ( 4 "github.com/woremacx/kocha" 5 ) 6 7 type Migration struct{} 8 9 // AUTO-GENERATED by Kocha. 10 // DO NOT CHANGE this method signature. 11 func Up(config kocha.DatabaseConfig, n int) error { 12 return kocha.Migrate(config, &Migration{}).Up(n) 13 } 14 15 // AUTO-GENERATED by Kocha. 16 // DO NOT CHANGE this method signature. 17 func Down(config kocha.DatabaseConfig, n int) error { 18 return kocha.Migrate(config, &Migration{}).Down(n) 19 } 20 21 func init() { 22 kocha.RegisterTransactionType("{{.typeName}}", {{.tx}}) 23 }