navapbc / template-application-rails

Ruby on Rails with USWDS template, including CI/CD, for teams building web applications
Apache License 2.0
2 stars 1 forks source link

Add database migration to enable pgcrypto #28

Closed rocketnova closed 5 months ago

rocketnova commented 5 months ago

Ticket

Changes

What was added, updated, or removed in this PR.

Context for reviewers

Background context, more in-depth details of the implementation, and anything else you'd like to call out or ask reviewers.

Using UUIDs with Postgresql requires the Postgresql extension pgcrypto to generate random UUIDs. This PR adds a database migration to enable the extension.

Note: Depending on deployment and hosting, this may be an extension that requires elevated privileges to enable. That's the case when deploying with AWS. I will be noting that in the forthcoming PR documenting integration with the Nava Platform infrastructure template.

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.

Before the migration:

CleanShot 2024-06-12 at 17 12 15@2x

After the migration:

CleanShot 2024-06-12 at 17 12 29@2x

After rollback:

CleanShot 2024-06-12 at 17 12 52@2x
rocketnova commented 5 months ago

LGTM - seems like something we should add to the accelerator repo if we have time?

👍 It's already in the accelerator repo. I missed it in the port to the rails template.