Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature add pgcrypto ext #795

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

zhuliquan
Copy link
Contributor

Sometime, we want to use external PG. However, However lower version PG (i.g. 12.16) may not support gen_randon_uuid function by default and get following error in migration stage.

{"timestamp":"2024-11-27T10:22:03.165300Z","level":"ERROR","fields":{"message":"Failed to run migrations on PostgresConfig { database_name: \"postgres\", host: \"10.252.176.141\", port: 25432, user: \"postgres\", password: Sensitive(\"JvVQknYlPYhJe2.P_ZAa1\") }: Error { kind: Connection(\"error applying migration V6__add_cluster_table\", Error { kind: Db, cause: Some(DbError { severity: \"ERROR\", parsed_severity: Some(Error), code: SqlState(E42883), message: \"function gen_random_uuid() does not exist\", detail: None, hint: Some(\"No function matches the given name and argument types. You might need to add explicit type casts.\"), position: Some(Original(264)), where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some(\"parse_func.c\"), line: Some(631), routine: Some(\"ParseFuncOrColumn\") }) }), report: Some(Report { applied_migrations: [] }) }"},"target":"arroyo"}

Here, we must enable pgcrypto extension. So I add below SQL for this case.

CREATE EXTENSION IF NOT EXISTS pgcrypto;

@zhuliquan
Copy link
Contributor Author

It's seems not compatiable with history migration

@zhuliquan zhuliquan closed this Nov 28, 2024
@zhuliquan zhuliquan reopened this Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant