Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Pull request overview
Adds support for “weekly time overwrites” so locations can have recurring per-weekday time overrides, with point-in-time overrides taking precedence.
Changes:
- Adds a
weekly_time_overwrites_table(schema + migrations) and anaddWeeklyTimeOverrideupsert helper. - Extends location fetch logic to load/apply both point and weekly time overrides (with precedence rules).
- Adds/updates database tests covering weekly overrides and DST edge cases.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/database.test.ts | Adds coverage for weekly overrides + precedence over point overrides; adds an extra DST edge-case test. |
| src/db/updateLocation.ts | Adds addWeeklyTimeOverride() DB upsert function. |
| src/db/schema.ts | Defines weeklyTimeOverwritesTable with PK + weekday check constraint. |
| src/db/getLocations.ts | Applies weekly overrides (and point overrides) when constructing returned time intervals. |
| src/db/dbQueryUtils.ts | Fetches weekly overrides alongside existing point overrides. |
| drizzle/meta/_journal.json | Records new drizzle migrations. |
| drizzle/meta/0008_snapshot.json | Snapshot includes weekly overwrites table (pre-PK). |
| drizzle/meta/0009_snapshot.json | Snapshot includes weekly overwrites table with composite PK. |
| drizzle/0008_ordinary_rage.sql | Migration creating weekly overwrites table + unique index. |
| drizzle/0009_cooing_snowbird.sql | Migration converting unique index to composite primary key. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.