Update server port and enhance participant management features
Changed the server port from 3000 to 3005 for local development. Enhanced the participant management functionality by adding a new endpoint to update participant group assignments, including error handling for non-existent participants. Updated the participant model to include a groupId reference, and modified the participant retrieval logic to include group information. Additionally, improved the frontend API client to accommodate the new backend structure and added filtering options in the MembersView for better user experience.
This commit is contained in:
9
backend/migrations/add_group_id_to_participants.sql
Normal file
9
backend/migrations/add_group_id_to_participants.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
-- Migration: Add group_id to participants table
|
||||
-- This allows assigning participants to groups for training organization
|
||||
|
||||
ALTER TABLE participants
|
||||
ADD COLUMN group_id INTEGER NULL REFERENCES "group"(id) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- Add index for better query performance
|
||||
CREATE INDEX IF NOT EXISTS idx_participants_group_id ON participants(group_id);
|
||||
|
||||
Reference in New Issue
Block a user