-
Notifications
You must be signed in to change notification settings - Fork 229
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
Feature add pgcrypto ext #795
Conversation
It's seems not compatiable with history migration |
@@ -1,3 +1,4 @@ | |||
CREATE EXTENSION IF NOT EXISTS pgcrypto; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approach won't work unfortunately; migrations are hashed and that's used to determine which ones have been applied. So if we modify an existing migration that will break it for everyone who's already run them.
I think that instead we could run this on the database before invoking the migrations in main:
arroyo/crates/arroyo/src/main.rs
Line 375 in 29e96b0
let report = migrations::migrations::runner() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I have fix it now.
add pgcrypto extension for lower version pg
d025241
to
d0f1b5f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Sometime, we want to use external PG. However, However lower version PG (i.g. 12.16) may not support
gen_random_uuid
function by default and get following error in migration stage.Here, we must enable
pgcrypto
extension. So I add below SQL for this case.