SnowEx / snowexsql

A project to access the SnowEx database holding data from the NASA SnowEx campaign
https://snowexsql.readthedocs.io/en/latest/readme.html
GNU General Public License v3.0
25 stars 6 forks source link

Revisit column defintions - Add NULL constraints and indexes #154

Open jomey opened 1 month ago

jomey commented 1 month ago

Most of our column definitions don't have the null constraint. For example - an instrument can be currently be added without a name. This can be improved by adding

Column(String(), nullable=False)

Second review while doing a swoop through the tables is to check for needed indexes. From the above example, it would also be good to have an index on names since that is a very frequent query we will have

Column(String(), nullable=False, index=True)