Comprehensive Schema Redesign for UltraEdge #15
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
This PR implements a complete redesign of the UltraEdge database schema to better support the application's requirements for endurance event crew and supply management. The new schema provides improved tracking of items, dropbags, aid stations, and athlete performance.
Key Improvements
EventDropbagsto handle event-specific instances of dropbagsUserItemsfor personal inventory trackingDropbagDeploymentsto track physical dropbag movementsMajor Table Changes
profilestouserswith expanded fieldsathlete_profilesfor athlete-specific informationracestoeventswith expanded fieldsaid_stationsto be event-independentImplementation Details
20250811173500_new_schema.sqlschema.sqlfileSCHEMA_CHANGES.mdAPPLY_SCHEMA.mdTesting
The schema has been validated for SQL syntax and referential integrity. After merging, the schema should be applied to a test environment before being applied to production.
Documentation
SCHEMA_CHANGES.mdto document the changesAPPLY_SCHEMA.mdwith instructions for applying the schema to SupabaseAdditional Notes
This is a breaking change that will require data migration from the old schema to the new schema. The migration process should: