Skip to content

Conversation

@JanJakes
Copy link
Contributor

@JanJakes JanJakes commented Oct 31, 2025

Some backups don't include SET SQL_MODE = … statements, but they do rely on WordPress-compatible SQL modes to be set during import (which are different from MySQL defaults).

This works with wp db import, because the command handles that for backups imported from files.

The new SQLite driver supports some SQL modes, but the wp sqlite import command doesn't set any defaults. This may cause some backups to fail to import into the SQLite database.

To fix this, we need to set permissive defaults for the wp sqlite import command, just like the native mysqldump command does.

Fixes WordPress/sqlite-database-integration#253.

@JanJakes JanJakes marked this pull request as ready for review October 31, 2025 09:49
Copy link

@ivan-ottinger ivan-ottinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fix, @JanJakes! The changes look good and I can confirm they fix the import issue. 👌🏼

I have tested the changes directly in Studio by importing problematic export. I have also run several more import using different export files. All went well.

@wojtekn thanks for including clear instructions in older Studio PR: Automattic/studio#1506. They were helpful in testing this one as well. 🙂

@wojtekn wojtekn merged commit fcc0898 into main Nov 3, 2025
34 checks passed
@wojtekn wojtekn deleted the fix-sql-modes branch November 3, 2025 11:21
@ivan-ottinger
Copy link

Thanks for merging and releasing the new version, Wojtek.

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.

Jetpack import fails due to Integrity constraint violation: 19 NOT NULL constraint failed: wp_posts.post_content_filtered error

4 participants