rename to route

This commit is contained in:
Philipp Hofer 2025-04-07 20:05:04 +02:00
parent af2e6d72a5
commit c089291f35
2 changed files with 8 additions and 8 deletions

View File

@ -7,7 +7,7 @@
## Next steps
- [x] Station
- [ ] Path
- [ ] Route
## Fancy features
- see when a group starts going to your direction

View File

@ -9,17 +9,17 @@ CREATE TABLE station (
lng REAL
);
CREATE TABLE path (
CREATE TABLE route (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL -- e.g. 'wiwö'
);
CREATE TABLE path_station (
path_id INTEGER,
CREATE TABLE route_station (
route_id INTEGER,
station_id INTEGER,
pos INTEGER,
PRIMARY KEY (path_id, station_id),
FOREIGN KEY (path_id) REFERENCES path(id),
PRIMARY KEY (route_id, station_id),
FOREIGN KEY (route_id) REFERENCES route(id),
FOREIGN KEY (station_id) REFERENCES station(id)
);
@ -30,8 +30,8 @@ CREATE TABLE "group" (
amount_people INTEGER,
first_station_id INTEGER NOT NULL,
FOREIGN KEY (first_station_id) REFERENCES station(id)
path_id INTEGER NOT NULL,
FOREIGN KEY (path_id) REFERENCES path(id)
route_id INTEGER NOT NULL,
FOREIGN KEY (route_id) REFERENCES route(id)
);
CREATE TABLE group_station (