This is a toy project I've been working on to teach myself the go programming language.
All data and database structure are from the pokedata repo, but I ended up adding keys and changing the names a little bit. Also had to change the order of rows on the pokemon csv to make it easier to be inserted since now it has a self referencing key.
Migrations are managed using goose.
goose -dir database/migrations postgres "host=localhost user=pokedex password=pokedex dbname=pokedex port=5432 sslmode=disable" up
goose -dir database/migrations postgres "host=localhost user=pokedex password=pokedex dbname=pokedex port=5432 sslmode=disable" reset
goose -dir database/migrations postgres "host=localhost user=pokedex password=pokedex dbname=pokedex port=5432 sslmode=disable" down
I've been using Air for live
reloading. The only change I've made to the default configuration is the
executable name since it would've used main
otherwise.