Conversation
The value is dynamically calculating form current time
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
tabletennis | 14283ab | Commit Preview URL Branch Preview URL |
Jan 06 2026, 12:13 AM |
Deploying tabletennis with
|
| Latest commit: |
14283ab
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://306b7915.tabletennis.pages.dev |
| Branch Preview URL: | https://remove-is-past-persistence.tabletennis.pages.dev |
There was a problem hiding this comment.
Pull request overview
This PR refactors the is_past field from a stored database column to a dynamically computed field in the API layer. The field is now calculated at runtime by comparing the fixture's match date with the current date, eliminating the need to update this value in the database.
Key Changes:
- Introduced
FixtureRowtype for database records and extended it with a computedis_pastfield in theFixturetype for API responses - Updated all database operations to remove
is_pastcolumn references - Added dynamic computation of
is_pastin API endpoints that return fixture data
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| worker/src/types.ts | Added FixtureRow interface for database model and extended it with Fixture interface that includes computed is_past field |
| worker/src/index.ts | Added isPastDate import and dynamic computation of is_past field in two API endpoints that return fixtures |
| worker/src/index.test.ts | Updated test mocks to use FixtureRow type and removed is_past field from fixture test data |
| worker/src/database.ts | Removed is_past from all SQL statements, changed return types from Fixture to FixtureRow, and removed unused isPastDate import |
| worker/src/database.integration.test.ts | Updated integration tests to remove assertions on is_past storage and adjusted parameter count expectations |
| worker/schema.sql | Removed is_past column definition from fixtures table schema |
| worker/migrations/README.md | Added comprehensive migration documentation with commands for applying and verifying the migration across environments |
| worker/migrations/0001_remove_is_past.sql | Created migration script to drop the is_past column from the fixtures table |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
The value is dynamically calculating form current time