Skip to content

Start of database schemas + migrations#21

Merged
justim merged 27 commits into
masterfrom
v1.23.x
May 26, 2026
Merged

Start of database schemas + migrations#21
justim merged 27 commits into
masterfrom
v1.23.x

Conversation

@justim

@justim justim commented Mar 17, 2026

Copy link
Copy Markdown
Owner

No description provided.

justim added 27 commits March 17, 2026 14:41
For MySQL you actually need to do something for an empty database.
Split string generation and queries.
Create database schemas with classes
The old `fields` method will still work, and a schema will be generated
based on those old values.
Just inject the condition of the `Raw` condition in a query without any
processing. Just with care.
With the first one being the `TableDoesNotExistException`.
For now, just a couple default values.
Migrations could have different values than the actual enum, most likely in the reverse migration
There is now a single point that executes a statement, can be overridden
to add custom error handling to query errors.
All methods called on the PDO instance are now wrapped by a try/catch
block to convert to a more specific exception, if possible.
Searching for something in a presenter that is not an integer can be
quite useful.
Allows limiting number of entities in a collection, directly or inside a
"multiple" presenter.
When a record is inserted that triggers a "duplicate entry" error, throw
a specific exception that can be caught separately.
Currently only the page and current ID cursor are supported.

Fix a weird inconsistency that allowed `scalar` to be used as a return
type for the filter callbacks. PHP allows this in `array_filter`, but
being more explicit about requiring a bool is better.
The default for `null` type is `String`, but with the introduction of
the type classes the string type has gotten a bit more strict, it
expects values coming from the database to be a string. The `mixed` type
just allows everything to be passed through, which is what we want for a
virtual field with no type.
@justim justim merged commit dca7274 into master May 26, 2026
25 checks passed
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.

1 participant