forked from Ruderverein-Donau-Linz/rowt
fix
This commit is contained in:
parent
31b2ed3b37
commit
3f5fc85a8b
@ -86,7 +86,7 @@ CREATE TABLE IF NOT EXISTS "logbook_type" (
|
||||
CREATE TABLE IF NOT EXISTS "logbook" (
|
||||
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
"boat_id" INTEGER NOT NULL REFERENCES boat(id),
|
||||
"shipmaster" INTEGER NOT NULL REFERENCES user(id), -- null: club is owner
|
||||
"shipmaster" INTEGER NOT NULL REFERENCES user(id),
|
||||
"shipmaster_only_steering" boolean not null,
|
||||
"departure" datetime not null,
|
||||
"arrival" datetime, -- None -> ship is on water
|
||||
|
@ -13,7 +13,7 @@ impl Stat {
|
||||
//TODO: switch to query! macro again (once upgraded to sqlite 3.42 on server)
|
||||
sqlx::query(
|
||||
"
|
||||
SELECT u.name, SUM(sub.distance_in_km) AS rowed_km
|
||||
SELECT u.name, CAST(SUM(sub.distance_in_km) AS INTEGER) AS rowed_km
|
||||
FROM user u
|
||||
INNER JOIN (
|
||||
SELECT r.rower_id AS user_id, l.distance_in_km
|
||||
|
Loading…
x
Reference in New Issue
Block a user