Closed diegoalzate closed 1 month ago
This migration introduces substantial updates to the database schema, including the renaming of the alerts
table to nav_links
and the addition of an event_id
column to establish connections with events. These changes permeate the application, with adjustments made to handlers, routers, and schemas, thereby enhancing data integrity and improving the overall functionality regarding event-related navigation.
File(s) | Change Summary |
---|---|
migrations/0029_mushy_vermin.sql |
Renamed alerts table to nav_links , added event_id column, and established a foreign key. |
migrations/meta/0029_snapshot.json |
Defined schema for multiple tables, including nav_links , with relevant columns and constraints. |
src/db/schema/events.ts |
Updated to include a relationship to navLinks . |
src/db/schema/index.ts |
Changed export from alerts to nav-links . |
src/db/schema/nav-links.ts |
Renamed table from alerts to nav_links , added eventId , and updated types and relations. |
src/handlers/events.ts |
Introduced getEventNavLinksHandler to retrieve navigation links for specific events. |
src/handlers/nav-links.ts |
Added getActiveNavLinks to fetch active navigation links, replacing getActiveAlerts . |
src/routers/api.ts |
Replaced alertsRouter with navLinksRouter . |
src/routers/events.ts |
Added endpoint to retrieve navigation links associated with events. |
src/routers/nav-links.ts |
Renamed router from alertsRouter to navLinksRouter . |
sequenceDiagram
participant User
participant API
participant EventHandler
participant NavLinksHandler
participant Database
User->>API: Request navigation links by event ID
API->>EventHandler: Route to event related handler
EventHandler->>NavLinksHandler: Get navigation links
NavLinksHandler->>Database: Query nav_links with event ID
Database-->>NavLinksHandler: Return navigation links
NavLinksHandler-->>EventHandler: Send navigation links back
EventHandler-->>API: Return navigation links to user
🐇 In the garden, links now bloom,
Navigation paths dispel the gloom.
From alerts to navs, a joyful hop,
Events and stories never stop!
With every click, new journeys start,
A rabbit's cheer, from the heart! 🌼
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?
overview
Summary by CodeRabbit
New Features
Enhancements
Bug Fixes