Skip to content

Commit

Permalink
Feature add pgcrypto ext (#795)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuliquan authored Dec 3, 2024
1 parent 868b3d5 commit ba2b3e9
Showing 1 changed file with 13 additions and 0 deletions.
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

0 comments on commit ba2b3e9

Please sign in to comment.