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

Merged
merged 2 commits into from
Dec 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions crates/arroyo/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,19 @@ async fn migrate(wait: Option<u32>) -> anyhow::Result<()> {
config().database.postgres
);

// make compatible with lower version PG (i.g. 12.16) which not support function
// gen_random_uuid by default.
client
.batch_execute("CREATE EXTENSION IF NOT EXISTS pgcrypto;")
.await
.map_err(|e| {
anyhow!(
"Failed to create extension pgcrypto on {:?}: {:?}",
config().database.postgres,
e
)
})?;

let report = migrations::migrations::runner()
.run_async(&mut client)
.await
Expand Down
Loading