server icon indicating copy to clipboard operation
server copied to clipboard

DB refactoring - remove unbound jsonb fields

Open varmar05 opened this issue 9 months ago • 1 comments

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.

varmar05 avatar May 29 '24 12:05 varmar05