Add full-primary MySQL mutation capture through a delegating database backend
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by verifying the supported deployment boundary for stock WordPress, custom db.php, and managed hosts. Define how successful and rolled-back DML and DDL, transactions, identities, and mixed captured/uncaptured deployments map to canonical persistence events. Done means the acceptance criteria are documented and tested, including compatible wpdb behavior, recovery, capability-based Doctor detection, unsupported-host handling, and unchanged SQLite compatibility.
Written by the indexing model from the issue text.
Description
Problem
The MySQL content backend can make selected posts file-primary through WordPress lifecycle events, but full MDI primary semantics also cover options, users, comments, schemas, and arbitrary plugin tables. Those writes can bypass WordPress content hooks and require successful database-level mutation capture.
This is a later child of #57. It follows the MySQL content backend and does not block it.
Desired Capability
Add a delegating MySQL backend that captures successful mutations at the WordPress database boundary while preserving normal MySQL execution:
WordPress wpdb
-> MDI delegating backend
-> normal MySQL execution
-> normalized successful mutation events
-> canonical persistence core
The backend owns MySQL result normalization, transactions, schema introspection, affected-resource discovery, and mutation capture. The canonical core remains SQL- and database-neutral.
Required Design Evidence
Before implementation, verify the supported deployment boundary for stock WordPress, custom db.php, and managed hosts. The backend must define:
- which direct
$wpdbwrites are captured; - transaction and rollback timing;
- read-after-write behavior;
- schema DDL handling;
- auto-increment identity reconstruction;
- mixed captured/uncaptured deployment behavior;
- operational recovery when canonical persistence fails after MySQL succeeds.
Acceptance Criteria
- Direct plugin
$wpdbDML and DDL mutations produce normalized canonical persistence events after successful execution. - Failed and rolled-back SQL produces no canonical state change.
- Options, users, comments, taxonomy state, and representative plugin schemas/tables reconstruct from canonical files into an empty supported MySQL database.
- Existing callers observe compatible
wpdbreturn values, errors, insert IDs, row counts, timing, and query logging. - Mixed-version deployment behavior is documented and tested.
- Doctor distinguishes full-primary MySQL from content-primary MySQL using capabilities, not mode-name assumptions.
- Hosts that cannot install the required database boundary receive an explicit unsupported result and retain content-primary operation.
- SQLite compatibility remains unchanged.
AI Assistance
OpenAI GPT-5.6 Sol via OpenCode was used to inspect MDI's existing full-state persistence guarantees and draft this issue. Chris Huber directed the architecture and remains responsible for the proposed capability boundary.
- Dominant language
- PHP
- Stars
- 7
- Forks
- 1
- Avg merge
- 26m
- Merged PRs (30d)
- 26
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Automattic/markdown-database-integration
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Automattic/markdown-database-integration#424 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 78/100
Automattic/markdown-database-integration#420 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Automattic/markdown-database-integration#415 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 78/100
Automattic/markdown-database-integration#414 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
Automattic/markdown-database-integration#401 ·
Maintainers usually reply within 1 day
All issues in Automattic/markdown-database-integration
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
glpi-project/glpi#25922 ·
Maintainers usually reply within 1 day
-
Translation TwigBridge
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
symfony/symfony-docs#23308 ·
Maintainers usually reply within 3 days
-
sync-en
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
sync-en
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 4 days
-
Перевод устарел
Difficulty 1/5 Under an hour Newbie friendliness 88/100