Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Add full-primary MySQL mutation capture through a delegating database backend

未关闭
#173 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
mysql, php, wordpress
领域
backend, database

调研方向

首先验证 stock WordPress、自定义 db.php 和托管主机所支持的部署边界。定义成功和已回滚的 DML 与 DDL、事务、身份标识,以及已捕获/未捕获的混合部署如何映射到规范持久化事件。完成的标准是验收标准已记录并经过测试,其中包括兼容的 wpdb 行为、恢复、基于 capability 的 Doctor 检测、不受支持主机的处理,以及保持不变的 SQLite 兼容性。

由索引模型根据 Issue 内容生成。

描述

enhancement

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 $wpdb writes 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

  1. Direct plugin $wpdb DML and DDL mutations produce normalized canonical persistence events after successful execution.
  2. Failed and rolled-back SQL produces no canonical state change.
  3. Options, users, comments, taxonomy state, and representative plugin schemas/tables reconstruct from canonical files into an empty supported MySQL database.
  4. Existing callers observe compatible wpdb return values, errors, insert IDs, row counts, timing, and query logging.
  5. Mixed-version deployment behavior is documented and tested.
  6. Doctor distinguishes full-primary MySQL from content-primary MySQL using capabilities, not mode-name assumptions.
  7. Hosts that cannot install the required database boundary receive an explicit unsupported result and retain content-primary operation.
  8. 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.

主要语言
PHP
星标
7
派生
1
平均合并
26 分钟
30 天内合并 PR
26

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Automattic/markdown-database-integration 的其他 Issue

查看 Automattic/markdown-database-integration 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。