go get https://github.com/peeperklip/[email protected]
# add the -u flag for updating
- Get according go get paragraph
- Create a directory
cli
- create a file + function that you can exectute command line
//Exexute in: $PROJECT_ROOT
//File: $PROJECT_ROOT/cli/migration.go
//Execute as:
func main() {
mig := migrations.NewMigration(
utils.CreateConnection(),
"postgress",
".")
migrations.Init(*mig)
}
app.go Is the entry point for the CLI
dialect.go Will eventually be used to support multiple SQL dialects
migration.go Holds all the logic for managing migrations
structs go first, interfaces second, then the methods, then general functions. Besides that it's pretty much just gofmt .
- The unsustainable swtich case in dialect.go
- The typejuggeling througout migration.go
- The last few methods in migration.go should be moved to its own file and struct
- Inject a logger
- unify output and make more of the underlying code swapable
- general improvements throughout as well as a better distinction between exported and unexported methods