Implement typeTinyint for SQLite grammar#226
Conversation
Add typeTinyint method to handle tinyint type in SQLite.
This comment was marked as resolved.
This comment was marked as resolved.
|
Would it be possible to submit a test case for this? |
|
@mjauvin added a test! |
|
Thanks for adding the unit-test, however if I remove the |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@mjauvin I went back and double-checked, I'm still getting this error when running PHPUnit tests in my WinterCMS app as well as the test case I wrote here. I'm running SQLite v3.51.0, not sure if it's a version issue. I suppose as an alternative to lend more support downwards into Laravel rather than patching it here could be to just add a match statement on line 47: Happy to provide more details if there's anything you're curious about here. Also thanks for getting Coderabbit to review this @LukeTowers ! |
You may be right, the environment where I tested it uses an older SQLite version (v3.31.1). |
|
@LukeTowers any idea what all those unit-test errors are? |
|
@mjauvin these test failures look unrelated, I'll merge it into 1.3 now and will work on getting 1.3 up to date along with Laravel 13 support next week. |
The
compileChangeoverride invendor/winter/storm/src/Database/Schema/Grammars/SQLiteGrammar.phpreads SQLite column type names as tinyint (from SQLite metadata for boolean columns), then calls getType() which looks for->typeTinyint(...— but only typeTinyInteger exists in the base grammar fileIlluminate\Database\Schema\Grammars\SQLiteGrammar.This should resolve migration issues others might hit when upgrading to 1.3
Summary by CodeRabbit
Bug Fixes
Tests