Database organization
I realized that, in order to make the API portable, We need to map which tables are granted to exist and be maintained for every supported version of autosubmit (maybe >= 3.13?).
Going back to issue #22, we have a complete picture of all the tables and databases that exist in our production environment. Unfortunately, it seems that some of them were created or modified manually by a script to make some features work. This will lead to potential bugs when deploying the API to new environments as some data may be missing or deprecated for different versions of autosubmit.
I think that a good work path is to map what tables are from the autosubmit package (the versions we are going to support) in a clear way, and then define what is the minimal amount of tables that the API needs to extend to work properly. In this way, we can also deprecate the as_times.db
and have one central db.
This work may lead to a huge refactoring of the code (maybe making it feasible to write most of the API again), but I think it will take less time than solving the further issues generated by not doing it. Also, that in the way we can solve other issues like API-side data validation.