-
Notifications
You must be signed in to change notification settings - Fork 47
Merge Automattic fork changes #179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
+17,735
−1,694
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading status checks…
Loading status checks…
Co-authored-by: Adam Zieliński <[email protected]>
Fix deprecation of implicitly marking parameter as nullable in PHP 8.4
Add PHP 8.4 unit tests to CI
Database configuration and migration
The new SQLite driver already uses some features from PHP 7.2. WordPress [recommends](https://wordpress.org/about/requirements/) PHP 7.4+ and requires PHP 7.2.24+. Closes Automattic/sqlite-database-integration#12.
The information schema builder requires a few small touches for the new driver release: - [X] It creates some tables that we don't support yet — let's remove those queries. - [X] It doesn't maintain the `table_constraints` table. This table will be needed in the future, and since it also store some information about primary and unique constraints, let's store it now, so we don't have to backfill it with a migration later on. - [X] Make sure identifiers are case-insensitive - [X] Verify index and constraint naming — e.g., what happens when both constraint name and index name are specified, and how duplicate names are handled.
Loading status checks…
**List of discovered issues:** - [x] Data types from `_mysql_data_types_cache` are sometimes not correctly fetched, as they can be saved in multiple formates (lowercase, uppercase, with or without backticks). - [x] MySQL applies type casting when saving data in non-strict mode, resulting in things like empty string being saved as `0` for an integer, `0000-00-00 00:00:00` for a date, etc. - [x] Functional defaults are incorrectly applied in non-strict mode (`DEFAULT CURRENT_TIMESTAMP` saves a `'CURRENT_TIMESTAMP'` string rather than the correct value). - [x] MySQL `BINARY` type is saved as `INTEGER`, but it's actually a binary string, and `BLOB` would be more suitable. - [x] MySQL supports date and time components without a zero padding, but that doesn't work with date and time functions in SQLite. (E.g.: `2025-3-7 9:5:2` is a valid datetime/timestamp value in MySQL, but SQLite requires it to be `2025-03-07 09:05:02`.) - [x] In multi-process environments (php-fpm), concurrent writes can cause "SQLSTATE[HY000]: General error: 5 database is locked" (`SQLITE_BUSY`).
This was referenced May 30, 2025
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR merges the changes from the Automattic SQLite fork as Automattic is resuming WordPress contributions.
The fork will be archived and can be found here: https://github.com/Automattic/sqlite-database-integration
List or PRs: https://github.com/Automattic/sqlite-database-integration/pulls?q=is%3Apr
Let's merge this PR as is without squashing. These individual commits carry a lot of context.