Update notes for 2018-09-24

This commit is contained in:
2018-09-25 11:33:05 +03:00
parent 27c3f48ef6
commit 2634aff405
3 changed files with 25 additions and 8 deletions

View File

@ -459,5 +459,14 @@ Type "help", "copyright", "credits" or "license" for more information.
- Or maybe I should just bite the bullet and migrate this to PostgreSQL, as it [supports `UPSERT` since version 9.5](https://wiki.postgresql.org/wiki/UPSERT) and also seems to have my new favorite `LIMIT` and `OFFSET`
- I changed the syntax of the SQLite stuff and PostgreSQL is working flawlessly with psycopg2... hmmm.
- For reference, creating a PostgreSQL database for testing this locally (though `indexer.py` will create the table):
```
$ createdb -h localhost -U postgres -O dspacestatistics --encoding=UNICODE dspacestatistics
$ createuser -h localhost -U postgres --pwprompt dspacestatistics
$ psql -h localhost -U postgres dspacestatistics
dspacestatistics=> CREATE TABLE IF NOT EXISTS items
dspacestatistics-> (id INT PRIMARY KEY, views INT DEFAULT 0, downloads INT DEFAULT 0)
```
<!-- vim: set sw=2 ts=2: -->