Adds make target for rolling back database migrations
Adds documentation for how to deploy
Context for reviewers
Background context, more in-depth details of the implementation, and anything else you'd like to call out or ask reviewers.
Adding pgcrypto as a database migration breaks integration with a more secure and restricted database migration user, such as with the https://github.com/navapbc/template-infra.
Normally, you should NOT delete database migrations. Instead, you should add a follow up migration that reverts the change. However, in this case, if you try to run the application on a more restrictive database migration user, all database migrations from this point on would fail with an error similar to this:
StandardError: An error has occurred, this and all later migrations canceled: (StandardError)
PG::InsufficientPrivilege: ERROR: permission denied to create extension "pgcrypto"
HINT: Must have CREATE privilege on current database to create this extension.
That means a subsequent migration to revert the change would NOT fix the problem.
Release notes
28 was not included in any releases, but the next release should include a note mentioning the issue and instructing them to run make db-reset.
Testing
Provide testing instructions and evidence that the code works as expected. Include screenshots, GIF demos, shell commands or output to help show the changes working as expected. ProTip: you can drag and drop or paste images into this textbox.
Test local development works in the container
make init-container
make start-container
Check localhost:3100
Test local development works natively
make init-native
make start-native
Check localhost:3000
Test remote deployment using integration with infra template:
Ticket
Changes
Context for reviewers
Adding pgcrypto as a database migration breaks integration with a more secure and restricted database migration user, such as with the https://github.com/navapbc/template-infra.
Normally, you should NOT delete database migrations. Instead, you should add a follow up migration that reverts the change. However, in this case, if you try to run the application on a more restrictive database migration user, all database migrations from this point on would fail with an error similar to this:
That means a subsequent migration to revert the change would NOT fix the problem.
Release notes
28 was not included in any releases, but the next release should include a note mentioning the issue and instructing them to run
make db-reset
.Testing
Test local development works in the container
make init-container
make start-container
Test local development works natively
make init-native
make start-native
Test remote deployment using integration with infra template:
validate
branch of https://github.com/navapbc/platform-test-rails