Repository navigation
feat: Generate a client-side database from the models - #4994
Merged
marcelomendoncasoares merged 15 commits intoMay 1, 2026
Merged
marcelomendoncasoares merged 15 commits into
marcelomendoncasoares merged 15 commits into
Conversation
marcelomendoncasoares
force-pushed
the
client-database-session
branch
3 times, most recently
from
April 25, 2026 00:24
0659dcd to
1df3753
Compare
marcelomendoncasoares
marked this pull request as ready for review
April 25, 2026 01:19
marcelomendoncasoares
force-pushed
the
client-database-session
branch
5 times, most recently
from
May 1, 2026 00:59
228c903 to
663d99f
Compare
…qlite` with `database: all`
…, read definitions, write)
marcelomendoncasoares
force-pushed
the
client-database-session
branch
from
May 1, 2026 01:18
663d99f to
6e5394e
Compare
nielsenko
requested changes
May 1, 2026
nielsenko
approved these changes
May 1, 2026
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 contain all pieces left to allow the creation of client-side databases. Besides having separate issues, it would be impossible to test any of the pieces in isolation. To avoid carrying bugs from PRs that would look complete, but not tested in runtime, I decided to open a single PR that validates the feature end-to-end.
For an easier review, this PR is best reviewed commit by commit.
Closes: #4791
Closes: #4792
Closes: #4793
Closes: #4783
Fixes: #5021
About testing
One third of the changes of this PR come from the tests added on commit 7010922 to validate the runtime behavior of the client-side database. Such tests do not need review as they are a mere copy of the
serverpod_test_sqlite_serverrelation tests - only adapted to create the client session.The tests are a small subset of the integration because the database is the same SQLite database that runs on the server - the same logic applies for migration tests.
The only area that showed unexpected behaviors was CRUD involving relations, because they depend on private/implicit properties of the models that only existed on the server-side. All other database features that are not tied to the model internals can be considered tested by the existing SQLite integration tests.
Pre-launch Checklist
///), and made sure that the documentation follows the same style as other Serverpod documentation. I checked spelling and grammar.If you need help, consider asking for advice on the discussion board.
Breaking changes
None.