Skip to content

Commit e1634b3

Browse files
authored
Define DB_PATH for explicit SQLite database paths (#4374)
## Motivation for the change, related issues The SQLite integration is adopting **`DB_PATH`** as its primary database path setting. Playground currently supplies only `DB_DIR` and `DB_FILE` when `dataSqlPath` is set. ## Implementation details Define `DB_PATH` from `dataSqlPath`, keeping the matching legacy constants for older SQLite plugin versions. ## Testing Instructions (or ideally a Blueprint) Boot with `dataSqlPath` set to a custom SQLite file and confirm WordPress opens that file. Verified with SQLite integration v2.1.16, bundled trunk, and the build from PR [#512](WordPress/sqlite-database-integration#512). Related: WordPress/sqlite-database-integration#512. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * WordPress boot now uses the provided SQL data path to configure its database location, improving support for custom database setups. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 8750c89 commit e1634b3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • packages/playground/wordpress/src

‎packages/playground/wordpress/src/boot.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,9 @@ export async function bootWordPress(
263263
}
264264

265265
if (options.dataSqlPath) {
266+
php.defineConstant('DB_PATH', options.dataSqlPath);
267+
268+
// Older SQLite integrations only understand these legacy constants.
266269
php.defineConstant('DB_DIR', dirname(options.dataSqlPath));
267270
php.defineConstant('DB_FILE', basename(options.dataSqlPath));
268271
}

0 commit comments

Comments
 (0)