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

fix: Improve support for older PostgreSQL versions #1504

Merged
merged 1 commit into from
Jan 19, 2025

Conversation

adamantike
Copy link
Collaborator

@adamantike adamantike commented Jan 18, 2025

Functions like JSON_ARRAY and JSON_OBJECT have been introduced in PostgreSQL 16 [1]. Older PostgreSQL versions were failing to run the migrations due to the usage of these functions.

This change uses jsonb_build_array and jsonb_build_object functions in PostgreSQL, which have been available since PostgreSQL 9.5 [2].

[1] https://www.postgresql.org/docs/release/16.0/
[2] https://www.postgresql.org/docs/release/9.5.0/#AEN132010

Functions like `JSON_ARRAY` and `JSON_OBJECT` have been introduced in
PostgreSQL 16 [1]. Older PostgreSQL versions were failing to run the
migrations due to the usage of these functions.

This change uses `jsonb_build_array` and `jsonb_build_object` functions
in PostgreSQL, which have been available since PostgreSQL 9.5 [2].

[1]: https://www.postgresql.org/docs/release/16.0/
[2]: https://www.postgresql.org/docs/release/9.5.0/#AEN132010
Copy link

Test Results

93 tests  ±0   93 ✅ ±0   26s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit fb622ff. ± Comparison against base commit 07c7883.

Copy link
Member

@gantoine gantoine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@adamantike adamantike merged commit 19c4c61 into master Jan 19, 2025
8 checks passed
@adamantike adamantike deleted the fix/improve-support-older-postgres-versions branch January 19, 2025 02:39
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.

2 participants