Skip to content

Bump the SQLite integration to v3.1.2 and keep the database at its fixed path - #5515

Merged
youknowriad merged 2 commits into
trunkfrom
stu-2545-bump-sqlite-integration
Oct 28, 2026
Merged

youknowriad merged 2 commits into
trunkfrom
stu-2545-bump-sqlite-integration

Conversation

@youknowriad

Copy link
Copy Markdown
Contributor

Related issues

How AI was used in this PR

Claude Code made the version bump, the db.php change and the test, then verified the result on isolated local sites. I reviewed the diff and the upstream changes in sqlite-database-integration 3.1.

Proposed Changes

  • Updates the bundled SQLite integration to v3.1.2. It includes the fix for odd-length hex literals like 0x711 (Support odd-length 0x hexadecimal literals WordPress/sqlite-database-integration#573), which made imports of some MySQL dumps fail.
  • Since 3.1, the plugin moves a database without a configured path from wp-content/database/.ht.sqlite into a randomized directory the first time it loads. Studio, phpMyAdmin, sync, and import/export all expect the fixed path. So the db.php drop-in Studio generates now sets DB_PATH to the current location, unless the site configures its own path. Existing sites keep their database where it is when they first start on the new version.
  • wp sqlite import/export needs wp-cli-sqlite-command v1.1.10 to run against 3.1.x, because v1.1.9 fails with Undefined constant FQDB. Studio's build always downloads the latest release, so this needs no change here. Run npm install (or the postinstall script) to pick it up locally.

Testing Instructions

  • Run npm run cli:build, then create a site and start it. Confirm wp-content/database/.ht.sqlite is still there and no .ht.<hash> directory or db-path.php appears.
  • Start an existing site created before this change. Its content is unchanged, and the database stays at the same path.
  • Import a SQL file containing INSERT INTO wp_posts (ID, post_title, post_name, post_type, post_status, post_content, post_excerpt, to_ping, pinged, post_content_filtered) VALUES (51701, 0x711, 0x711, 'post', 'publish', '', '', '', '', ''); with studio import file.sql. It succeeds, which fails on trunk.
  • Export the database with studio export out.sql --mode db, then re-import it. Both succeed.
  • Open phpMyAdmin for the site and check that the tables are listed.
  • npm test -- packages/common/lib/tests/sqlite-integration.test.ts

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

🤖 Generated with Claude Code

…in db.php so the plugin doesn't move it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-integration

# Conflicts:
#	packages/common/lib/sqlite-integration.ts
@wpmobilebot

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 7cec6c4 vs trunk

app-size

Metric trunk 7cec6c4 Diff Change
App Size (Mac) 954.27 MB 954.32 MB +0.05 MB ⚪ 0.0%

site-editor

Metric trunk 7cec6c4 Diff Change
load 1170 ms 1217 ms +47 ms ⚪ 0.0%

site-startup

Metric trunk 7cec6c4 Diff Change
siteCreation 4639 ms 4936 ms +297 ms 🔴 6.4%
siteStartup 1563 ms 1567 ms +4 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@youknowriad
youknowriad merged commit 6c38031 into trunk Oct 28, 2026
12 checks passed
@youknowriad
youknowriad deleted the stu-2545-bump-sqlite-integration branch October 28, 2026 10:42
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