Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the default migration stub to generate timezone-aware timestamp columns.
- Replaces
Timestamps()withTimestampsTz()in the migrationUpstub - No corresponding update in the
Downstub for rollback - Missing tests to verify timezone-aware behavior
Comments suppressed due to low confidence (2)
database/migration/stubs.go:50
- Add a migration test to confirm that generated migrations with
TimestampsTz()produce timezone-aware timestamp columns in both creation and rollback.
table.TimestampsTz()
database/migration/stubs.go:50
- The
Downstub likely still dropsTimestamps(). Update the rollback stub to remove timezone-aware columns, e.g., use a correspondingDropTimestampsTz()or adjust to matchTimestampsTzfor consistency.
table.TimestampsTz()
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.50.
| Benchmark suite | Current: 95fd998 | Previous: 6b6b6a8 | Ratio |
|---|---|---|---|
BenchmarkFile_ReadWrite |
361884 ns/op 6040 B/op 93 allocs/op |
226806 ns/op 6186 B/op 97 allocs/op |
1.60 |
BenchmarkFile_ReadWrite - ns/op |
361884 ns/op |
226806 ns/op |
1.60 |
This comment was automatically generated by workflow using github-action-benchmark.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## v1.15.x #1060 +/- ##
==========================================
Coverage ? 68.78%
==========================================
Files ? 218
Lines ? 18869
Branches ? 0
==========================================
Hits ? 12979
Misses ? 5229
Partials ? 661 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
Closes goravel/goravel#699
Currently, for
Timestampscolumn of Postgres and Sqlserver,2025-06-05 14:46:29 +08:00will be saved with2025-06-05 14:46:29, but when reading, ORM considers that the timezone is UTC, the timezone metadata is missed.✅ Checks