Add PostgreSQL database driver#428
Draft
adamziel wants to merge 441 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Big picture
Adds PostgreSQL backend support alongside the existing SQLite backend.
WordPress core unit tests pass to the same extent as with the SQLite backend.
Implementation checkpoints
e1b0bacfe9cd7dc12c2ab0927e7e1a7c73c53cb7(Rewrite MySQL UDF calls for PostgreSQL).Try it on a fresh WordPress site
Prerequisites:
pdoandpdo_pgsqlenabled in PHP.Install the plugin files into the WordPress site:
Install the WordPress database drop-in:
Configure the database access in
wp-config.php:Then open the site in a browser and run the normal WordPress installer at
/wp-admin/install.php. Thewp-content/db.phpdrop-in loads the PostgreSQLwpdbadapter before install, and the PostgreSQL install hooks translate the WordPress schema for PostgreSQL.After install, a quick smoke test is enough to confirm the site is using the PostgreSQL adapter:
Expected output includes:
Repo test environment
The repo still has a supported generated test environment for CI and local parity work:
Those commands generate the WordPress checkout, Docker override, test configs, drop-in wiring, and node dependencies used by CI. They are useful for repeatable testing, but they are not required to try PostgreSQL on a fresh WordPress site.