goalert
goalert copied to clipboard
db: drop pgcrypto requirement for postgres 13+
What problem would you like to solve? Please describe:
We currently have CREATE EXTENSION pgcrypto
in a couple of migrations that require special permissions, which can be a pain point for deployment. This is only required for the gen_random_uuid
function, which is standard in Postgres 13+
Describe the solution you'd like:
If Postgres 13.0 or higher is detected, filter out the CREATE EXTENSION pgcrypto
lines in the initial migration(s).
Describe alternatives you've considered: None, this is just a pain point for new installs.
On second thought, we could probably test select gen_random_uuid()
and skip the extension line if it works; then, we don't need to do any version magic.
I did some testing on this; in addition to the UUID stuff, we also used a digest function for some migrations. We could do a schema-only dump of the DB as an all-in-one migration for new installations to jump ahead (instead of running each individually), but I think that'd be the only option.
This issue has been automatically marked as stale because it has not had recent activity.