Repository navigation
refactor: Only store column information on SQLite for non-basic types - #4988
Merged
marcelomendoncasoares merged 3 commits intoApr 22, 2026
Merged
marcelomendoncasoares merged 3 commits into
marcelomendoncasoares merged 3 commits into
Conversation
marcelomendoncasoares
marked this pull request as ready for review
April 22, 2026 18:00
nielsenko
approved these changes
Apr 22, 2026
nielsenko
left a comment
Collaborator
There was a problem hiding this comment.
Small and tidy 👍 LGTM
Collaborator
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.
The SQLite implementation uses an untracked table (created on the migration file directly) to store additional information about the columns. This is required because SQLite only has 4 basic column types (
INTEGER,REAL,TEXT,BLOB) that maps allColumnTypes.As a result, each
definition.sqlandmigration.sqlend up with a lot of lines just for inserting the column types into the table. This PR reduces the amount of lines by skipping the basic column types (ColumnType.integer/ColumnType.bigint,ColumnType.doublePrecision,ColumnType.bytea,ColumnType.text) that map 1:1 with the SQLite basic types.The only side-effect of this change is the loss of the
int/bigintdistinction on SQLite. Most of the reduction on the rows come from skipping theColumnType.biginttype, since it is the one used forintID columns. However, since on SQLite it is already the same asintand the migration system already skips migrations between them, this does not really matter.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.