feat: add UUID and ULID type support to SQLite grammar#22
Merged
hwbrzzl merged 5 commits intogoravel:masterfrom Jul 6, 2025
Merged
feat: add UUID and ULID type support to SQLite grammar#22hwbrzzl merged 5 commits intogoravel:masterfrom
hwbrzzl merged 5 commits intogoravel:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds support for UUID and ULID column types to the SQLite grammar and covers them with unit tests.
- Introduced
TypeUuidandTypeUlidmethods ingrammar.goto returnchar(36)andchar(26). - Added
TestTypeUuidandTestTypeUlidingrammar_test.goto verify the new methods.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| grammar.go | Added TypeUuid and TypeUlid to emit char types |
| grammar_test.go | Added tests TestTypeUuid and TestTypeUlid |
1 task
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
hwbrzzl
reviewed
Jul 5, 2025
grammar.go
Outdated
| } | ||
|
|
||
| func (r *Grammar) TypeUuid(column driver.ColumnDefinition) string { | ||
| return "char(36)" |
hwbrzzl
reviewed
Jul 6, 2025
Co-authored-by: Wenbo Han <hwbrzzl@gmail.com>
Co-authored-by: Wenbo Han <hwbrzzl@gmail.com>
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 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.
📑 Description
goravel/framework#1114
This pull request introduces support for two new column types,
UUIDandULID, in theGrammarclass and adds corresponding test cases to ensure their correct implementation. These changes enhance the database grammar's capabilities for handling these specific data types.New Column Types Added:
grammar.go: Added methodsTypeUuidandTypeUlidto theGrammarclass to define the database representations forUUID(char(36)) andULID(char(26)) column types.Test Coverage:
grammar_test.go: Added test casesTestTypeUuidandTestTypeUlidin theGrammarSuiteto validate the correct behavior of theTypeUuidandTypeUlidmethods, ensuring they return the expected database column definitions.✅ Checks