]> rtime.felk.cvut.cz Git - coffee/coffee-flask.git/commit
Add support for another beverages (namely club mate)
authorJaroslav Klapalek <klapajar@fel.cvut.cz>
Thu, 7 Mar 2019 13:47:03 +0000 (14:47 +0100)
committerMichal Sojka <michal.sojka@cvut.cz>
Fri, 8 Mar 2019 07:37:40 +0000 (08:37 +0100)
commitc0be73d43b24e8e7a223f0730489407025a2459d
treea50c4b7648b16e56d9d85386ad198717595198fe
parent918d9dc1453b21d2d0aff6c4b3e91d2c25faa072
Add support for another beverages (namely club mate)

Required to run on the server database before using this patch:
```
alter table flavors add ord integer not null default 999;
update flavors set ord=1 where name='cappuccino';
update flavors set ord=2 where name='espresso';
update flavors set ord=3 where name='espresso lungo';
update flavors set ord=4 where name='latte macchiato';
```

This patch slightly changes structure of a `flavors` table. It adds
another column called `ord`, which is used for ordering of coffee
flavors / beverages on the graphs (to maintain the same color scheme).

Scripts `app.py` and `coffee_db.py` are modified to work with this
change.
app.py
coffee_db.py
coffee_db.sql