Database

Manage DB

Browse collections and tables, and watch the CQRS timing pipeline.

← Overviewβ€’Course & GeographyPhysical Track

Coursescourses

Physical course track, distance, elevation profile, and GPX navigation route file.

Table Columns & Types (8)

courses
ColumnPostgreSQL TypeConstraintsDefaultDocumentation
iduuid
NOT NULLPK
gen_random_uuid()Unique course identifier.
organizationIduuid
NOT NULLFK -> organizations.id
β€”Owning organization.
nametext
NOT NULL
β€”Course title (e.g. "Western States 100 Trail").
distanceMetersdouble precision
NOT NULL
β€”Official measured course distance in meters.
elevationGainMetersinteger
nullable
β€”Cumulative positive elevation gain in meters.
gpxRouteUrltext
nullable
β€”Public URL to the official GPX elevation route file.
copiedFromCourseIduuid
nullableFK -> courses.idON DELETE SET NULL
β€”Optional reference to the source course from which this course was cloned or derived.
createdAttimestamp with time zone
NOT NULL
now()Creation timestamp.

Database Indexes (2)

Index NameColumnsTypeQuery Performance Rationale
courses_org_idx(organizationId)INDEXAccelerates course catalog browsing by organization.
courses_copied_from_idx(copiedFromCourseId)INDEXAccelerates lookup of course copy hierarchies, templates, and provenance lineage.