-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: IDENTITY column support #243
Conversation
WalkthroughThis pull request introduces several enhancements to the database schema and query builder functionality. Version 8.3.0 of the library adds support for IDENTITY columns, invisible columns, change streams using Blueprint, and snapshot queries. The changes include updating the changelog, modifying the Docker emulator version, and extending the schema definition capabilities. The PR also introduces new methods for query building, updates commit option configurations, and deprecates certain existing methods. Changes
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
tests/Schema/BlueprintTest.php (1)
779-780
: Enhance tests to verify generated identity column valuesCurrently, the assertions check that
'int_gen'
and'int_genc'
are integers. It would be beneficial to assert that the values meet specific criteria, such as being positive integers or following the expected sequence pattern, to ensure that the identity columns function correctly.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
CHANGELOG.md
(1 hunks)compose.yaml
(1 hunks)src/Schema/ColumnDefinition.php
(2 hunks)src/Schema/Grammar.php
(2 hunks)tests/Schema/BlueprintTest.php
(3 hunks)
✅ Files skipped from review due to trivial changes (1)
- compose.yaml
🔇 Additional comments (6)
tests/Schema/BlueprintTest.php (1)
738-739
:
Invalid SQL syntax in generated identity column definitions
The SQL statements for the columns 'int_gen'
and 'int_genc'
may contain syntax errors. The fragment 'generated by default as identity (bit_reversed_positive start counter with 2)'
might not be valid. Consider verifying the correct syntax for identity columns in SQL and updating the generated statements.
Run the following script to check the correct SQL syntax for identity columns:
src/Schema/ColumnDefinition.php (2)
23-23
: Appropriate import of Expression
class
The addition of use Illuminate\Database\Query\Expression;
is necessary for handling the generatedAs
property, which can be of type Expression
.
37-37
: Correctly added generatedAs
property to PHPDoc
The @property string|Expression|true|null $generatedAs
annotation accurately documents the new generatedAs
property, enhancing clarity and code documentation.
CHANGELOG.md (1)
3-3
: Changelog updated accurately for version 8.3.0
The changelog entries properly reflect the new features, enhancements, and deprecations introduced in version 8.3.0, providing a clear overview of the changes.
src/Schema/Grammar.php (2)
41-41
: Verify modifier order in $modifiers
array
With the addition of 'GeneratedAs'
to the $modifiers
array, please ensure that the order of modifiers correctly reflects the intended sequence for SQL generation, as the order may affect how modifiers are applied.
736-759
:
Ensure compatibility of match
expression with PHP version
The use of the match
expression in the modifyGeneratedAs
method requires PHP 8.0 or higher. Please confirm that the project's minimum PHP version requirement is PHP 8.0 or above to prevent potential syntax errors.
Run the following script to check the project's minimum PHP version requirement:
✅ Verification successful
match
expression usage is compatible with PHP requirements
The codebase requires PHP 8.2 or higher (^8.2
) as specified in composer.json, which fully supports the match
expression introduced in PHP 8.0. The code is safe to use as is.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check the minimum PHP version requirement in composer.json.
# Expected: The 'php' requirement is '>=8.0.0' or higher.
jq '.require.php' composer.json
Length of output: 38
No description provided.