server
server copied to clipboard
DB refactoring - remove unbound jsonb fields
Refactor Project and ProjectVersion tables - remove unbound files/changes metadata jsonb fields. New table FileHistory is introduced which records changes to project files during project lifetime. This way we remove duplicates and simplify lookup in db. As a result database is smaller and more predictable. ProjectVersion table is simplified so any updates should be quick enough.
ProjectVersion.name was internally changed to integer (easier search, comparison) but we still use v
prefix in API.
Refactor metadata handling - instead of using python dicts everywhere during upload and in project files we moved to dataclasses.
Few other methods from disk.py
were simplified and / or moved to other places.