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
23 stars 6 forks source link

Create new table definitions #104

Open micah-prime opened 3 weeks ago

micah-prime commented 3 weeks 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)

IMG_2841

micah-prime commented 3 weeks ago

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

jomey commented 2 weeks 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 2 weeks 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 2 weeks 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