Adding new models
If your group uses a new method that is not implemented to specatalog you can contribute to the code and add a new Modelclass for the database.
Add the new Model classes to
specatalog.models.creation_pydantic_measurementsandspecatalog.models.measurements. Orient yourself at the existing models.Add the new class to the mapping-dictionaries
specatalog.crud_db.read.model_mapping_filters,specatalog.crud_db.read.model_mapping_orderingandspecatalog.crud_db.update.model_mapping_update.Run the following commands in the specatalog-root-folder:
alembic revision --autogenerate -m "add uvvis measurement" alembic upgrade head
Give permission to write to the table to your DB-Users:
sudo -u postgres psql \c specatalog GRANT INSERT, SELECT, UPDATE, DELETE ON TABLE new_table TO db_usr; GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public TO db_usr;
Run an Update.
In the documentation you have to add the new model in the files
models.rstandcrud_db.rst.