PostgreSQL 11, Docker, Docker Compose, & Make
$ make
$ MIGRATION_PATH=<your_path_to>/graphql-gateway make migrate-init
$ MIGRATION_PATH=<your_path_to>/graphql-gateway make migrate-upStarting the container & app
$ make compose-upStopping the container & app
$ make compose-down$ MIGRATION_PATH=<your_path_to>/graphql-gateway make migrate-up$ make testDatabase migrations for this app use golang-migrate/migrate command-line utility. To simply run existing migration you do not need to download the dependancy. We are running the migration commands via a docker container. However if you want to generate the files you can download/install it locally following these instructions: https://github.com/golang-migrate/migrate/tree/master/cli and running the following command: migrate -ext sql -dir sql/migrations -seq -digits 4 <name_of_migration>
Read more about migration best practices here Read more about cli commands here
Migrate the initial setup. Requires RDS admin credentials.
$ MIGRATION_PATH=<your_path_to>/graphql-gateway make migrate-initMigrate changes up
$ MIGRATION_PATH=<your_path_to>/graphql-gateway make migrate-upMigate the changes down
make migrate-downForce migate starting at an existing version
make migrate-force -v=<migration_version_number>