Commit Graph

166 Commits

Author SHA1 Message Date
Georges-Antoine Assi
1ea1b326d3 move hashes to rom model 2024-08-11 22:38:22 -04:00
Georges-Antoine Assi
56037070fb only calc hashes exlpicit 2024-08-11 19:36:52 -04:00
Georges-Antoine Assi
a4e162e2c1 Merge branch 'master' into calc-file-hashes-roms 2024-08-11 19:07:06 -04:00
Georges-Antoine Assi
7e086cec67 fixes from code review 2024-08-11 19:06:16 -04:00
Georges-Antoine Assi
5f0577b900 more cleanup 2024-08-09 00:17:11 -04:00
Georges-Antoine Assi
1ae9cd0b5a remove unneded code 2024-08-09 00:10:31 -04:00
Georges-Antoine Assi
3a1986f453 single lines for the virtual table 2024-08-08 23:27:31 -04:00
Georges-Antoine Assi
cd54d902a7 create database view for sibling roms 2024-08-08 22:25:50 -04:00
Georges-Antoine Assi
9386ca9e4a changes from self-review 2024-07-27 16:31:32 -04:00
Georges-Antoine Assi
efc0b75cdb Merge branch 'master' into calc-file-hashes-roms 2024-07-25 22:42:46 -04:00
Georges-Antoine Assi
ad3a588631 filter collections for each user 2024-07-25 19:53:44 -04:00
Michael Manganiello
6eb8e6aeff misc: Add Redis async cache
Introduce an asynchronous Redis instance to be used in async functions.
Also, this change migrates most of the sync cache usage to the new async
cache.
2024-07-21 18:23:19 -03:00
Georges-Antoine Assi
2b2ff875ee Calculate hashes for rom files 2024-07-15 18:27:29 -04:00
Michael Manganiello
004c0b634e fix: Make some DB columns non-nullable
This change makes some database columns non-nullable, and includes the
migration to seamlessly upgrade the schema.

It includes:
* User and Platform names
* Every boolean column
2024-07-07 11:07:27 -03:00
zurdi
f2f202de9e add user collections to details 2024-07-04 01:25:44 +02:00
Zurdi
5126c56ba9 get collections for detailed rom info 2024-07-04 00:05:37 +02:00
zurdi
59c2a51a6f added collection cover management 2024-07-03 14:31:17 +02:00
Zurdi
23e0a064ab added update collection endpoint 2024-07-02 23:34:50 +02:00
zurdi
1d6ba70080 collections get_roms endpoint added 2024-07-02 14:31:27 +02:00
Zurdi
cc9e05f668 collections migration added 2024-07-01 23:47:15 +02:00
Zurdi
9f2f98d405 Merge branch 'feature/fav_for_siblings' into feature/collections 2024-07-01 22:42:34 +02:00
Georges-Antoine Assi
7530fdd576 mega refactor of pr 2024-07-01 15:12:07 -04:00
Zurdi
a937b0ddcf added publicNotes schema 2024-07-01 17:42:23 +02:00
zurdi
15f7522da5 rom db hanlder refactor to adapt to user_rom_props 2024-07-01 15:30:14 +02:00
zurdi
66e185db47 Merge branch 'master' into feature/fav_for_siblings 2024-07-01 08:34:04 +02:00
Georges-Antoine Assi
8750e343e5 Merge branch 'master' into misc/split-db-handler-logic-to-get-list 2024-06-30 19:24:59 -04:00
Michael Manganiello
8281d5679b misc: Split database handler logic to get/list entities
The current implementation for some of the database handlers, where the
same method is used to retrieve either a single entity (when an `id` is
passed), a list of entities, or `None`, makes the typing and overall
design more complex.

This change simplifies database handlers, by having two separate methods
where appropiate:

* A method that receives an `id`, and returns either an entity, or `None`.
* A method that optionally receives filters, and returns (depending on
  the current handler implementation) a list of entities, or a `Select`
  object that allows chaining more SQLAlchemy operations.
2024-06-30 13:12:48 -03:00
Michael Manganiello
e1bcd9cc06 misc: Use Python future annotations
Simplify annotations by using `__future__.annotations`, so there's no
need to add typing using types as strings.
2024-06-30 12:19:37 -03:00
Zurdi
43cd6a8383 added main sibling per user 2024-06-29 14:09:41 +02:00
zurdi
0a0bab6730 migrated rom_notes to user_rom_props 2024-06-29 11:26:16 +02:00
Zurdi
c022e9cef7 added user_rom_props entity 2024-06-29 00:13:28 +02:00
Zurdi
2515b1f0c1 Merge branch 'feature/fav_for_siblings' into feature/collections 2024-06-28 17:33:21 +02:00
Zurdi
3145aa6003 Merge branch 'feature/steamgriddb' into feature/fav_for_siblings 2024-06-28 17:33:05 +02:00
Zurdi
dc479b289b fixes from trunk 2024-06-28 17:32:04 +02:00
Zurdi
35ddac5c84 Merge branch 'feature/fav_for_siblings' into feature/collections 2024-06-28 16:48:29 +02:00
Zurdi
835339cdf6 Merge branch 'feature/steamgriddb' into feature/fav_for_siblings 2024-06-28 16:48:08 +02:00
Zurdi
d2fe08f525 added update_at and created_at to base model 2024-06-28 16:45:39 +02:00
zurdi
70200d858e Merge branch 'feature/fav_for_siblings' into feature/fav_collection 2024-06-28 16:24:04 +02:00
zurdi
b9b861d684 set main sibling added to the backend 2024-06-27 19:26:19 +02:00
zurdi
d3324b6d31 added created_at column 2024-06-27 12:12:35 +02:00
zurdi
542cc6aa64 added updated_at column to tables 2024-06-27 11:59:45 +02:00
Michael Manganiello
b99ededced misc: Migrate to SQLAlchemy declarative models
This change applies the guided migration process recommended by
SQLAlchemy [1], up to step 4, to have declarative ORM models that better
support Python typing.

The change was tested by running `alembic check`, which does not find
any schema changes.

Errors reported by `mypy` go down to 170, from the original 223 in the
current `master` commit.

[1] https://docs.sqlalchemy.org/en/20/changelog/whatsnew_20.html#migrating-an-existing-mapping
2024-06-25 23:03:20 -03:00
Michael Manganiello
33ac3ca56d misc: Apply changes generated by pyupgrade
Changes automatically made by
[`pyupgrade`](https://github.com/asottile/pyupgrade), using the
`--py311-plus` flag, to be compatible with Python 3.11.
2024-06-23 18:17:08 -03:00
Georges-Antoine Assi
a73d751d6c switch back to IDs 2024-06-19 09:36:22 -04:00
Georges-Antoine Assi
e2c5ba68cb backend tweaks + refactor 2024-06-18 23:21:17 -04:00
zurdi
daf2fd2f87 fixed siblings 2024-06-17 17:38:02 +02:00
Georges-Antoine Assi
c4ef4d92d2 run truck fixes 2024-05-31 19:00:04 -04:00
Georges-Antoine Assi
9b62641d55 Merge branch 'master' into trunk-io 2024-05-31 18:42:43 -04:00
Georges-Antoine Assi
b521af6266 run linter 2024-05-25 19:59:36 -04:00
Georges-Antoine Assi
423c6b2b29 remove check for igdb_id 2024-05-25 19:54:29 -04:00