'do I really have to remove the pgcrypto extension in order to upgrade a postgres database?
Details: We are using heroku's wizard to upgrade postgres from v9.6 to a newer version, however we've found it won't work, heroku support said that we had to drop the pgcrypto extension, and then add it back in again when its done.
Does this sound right to people? It is causing a breaking change to our schema.
We have the following in our schema:
some_ID text DEFAULT gen_random_uuid() NOT NULL,
When dropping the extenion, it complains that a particular column some_id depends on function gen_random_uuid() and to use cascade to drop the extension.
When running DROP EXTENSION pgcrypto CASCADE; it results in a changed schema - the DEFAULT gen_random_uuid() part gets stripped and we end up with some_ID text NOT NULL,
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
