lgrosz / climb-rs

0 stars 0 forks source link

Ascent styles #29

Open lgrosz opened 2 months ago

lgrosz commented 2 months ago

It would be common attribute a sort of style to an ascent.. for example, this was done "on lead" or "on top-rope." It could also be common to describe in what manner these were done.. this problem was "flashed" or "worked." Finally, some attributes may describe the ascent in a larger context like that ascent was the "first-ascent" or "second-ascent."

Additionally, some may find it historically significant to log about effort that did not result in an ascent.

lgrosz commented 2 months ago

While working on #28, I initially came up with this

CREATE TABLE ascent_styles (
    id SERIAL PRIMARY KEY,
    name VARCHAR(50) NOT NULL UNIQUE
);

INSERT INTO ascent_styles (name) VALUES
    -- general styles
    ('aid'),
    ('boulder'),
    ('lead'),
    ('rope-solo'),
    ('simul'),
    ('solo'),
    ('top-rope'),

    -- generally modifiers to the above styles
    ('flash'),
    ('ground-up'),
    ('onsight'),
    ('repeat'),
    ('worked'),

    -- even further additional modifiers
    ('first-ascent'),
    ('first-female-ascent'),
    ('first-known-ascent'),
    ('fourth-ascent'),
    ('second-ascent'),
    ('third-ascent');

CREATE TABLE ascent_style_assignments (
    ascent_id INT NOT NULL REFERENCES ascents(id) ON DELETE CASCADE,
    style_id INT NOT NULL REFERENCES ascent_styles(id) ON DELETE CASCADE,
    PRIMARY KEY (ascent_id, style_id)
);

There are some questions that arose from this