mirror of
https://github.com/IS1DI/x0gp.git
synced 2026-07-16 20:47:55 +00:00
Add leaderboard for all tracks and track calendar
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
-- 014_track_calendar.sql — schema for F1-style active track scheduling.
|
||||
|
||||
CREATE TABLE IF NOT EXISTS track_calendar (
|
||||
id SERIAL PRIMARY KEY,
|
||||
track_id TEXT NOT NULL REFERENCES tracks(id) ON DELETE CASCADE,
|
||||
start_at TIMESTAMP WITH TIME ZONE NOT NULL,
|
||||
end_at TIMESTAMP WITH TIME ZONE NOT NULL,
|
||||
CHECK (start_at < end_at)
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS track_calendar_dates_idx ON track_calendar (start_at, end_at);
|
||||
Reference in New Issue
Block a user