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

Create new table definitions #104

Closed micah-prime closed 1 month ago

micah-prime commented 3 months ago

Let's create all the new table definitions as outlined in the re-organization diagram

Tables to create are

Each table can have it's own file (like @jomey 's reorg)

Tables to update are:

Also linking to a discussion around observers

137

IMG_2841

micah-prime commented 3 months ago

These are being pushed to the dev branch, so PRs can be made there

jomey commented 3 months ago

Noting that we should also add some indexes on the foreign key columns. One example on how to do this:

name = Column(String, index=True)
jomey commented 3 months ago

Other definition to consider is to require the presence of an attribute/column via NOT NULL

name = Column(String, nullable=False)

https://docs.sqlalchemy.org/en/20/core/metadata.html#sqlalchemy.schema.Column.params.nullable

jomey commented 3 months ago

Saving a reference on why we don't need to set limits on varchar https://wiki.postgresql.org/wiki/Don%27t_Do_This#Don.27t_use_varchar.28n.29_by_default