edh-elo/DEVELOPMENT.md
Jack Jackson 2fb5a291e5 Implement incremental updating
When `seed/all_in_one` is now called, it will update with only that data
that exists later than the most-recently-played* game, allowing the
upload to be used repeatedly without having to clear the database.

\* Actually, "highest-ID game", as we haven't implemented
`list_games_by_date`, yet
2024-07-27 20:05:28 -07:00

25 lines
737 B
Markdown

# Pre-commit
This repo uses [pre-commit](https://pre-commit.com/). Install the tool with `pip install pre-commit` (or just `pip install -r requirements-dev.txt`), then install the hooks with `pre-commit install`
Not yet configured to run this in CI, as I'm the only contributor :P but I definitely should if I start getting contributions!
# To wipe the database:
```
delete from elo_scores;
delete from games;
delete from decks;
delete from players;
alter sequence decks_id_seq restart with 1;
alter sequence games_id_seq restart with 1;
alter sequence players_id_seq restart with 1;
alter sequence elo_scores_id_seq restart with 1;
```
# To copy the database out to local
```
$ docker cp edh-elo-server-1:/app/database/<name>
```