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

Change all string column types to text #148

Open aaarendt opened 2 weeks ago

aaarendt commented 2 weeks ago

Suggest we replace all type declarations of "String" to "Text" following this postgres wiki.

micah-prime commented 1 week ago

Is there an advantage to using text instead of just String without the limit? The wiki seems agnostic on that

aaarendt commented 1 week ago

Good question. I think the answer within PostgreSQL is there's no difference. But according to the SQLAlchemy docs, you are required to specify a length if you use string within a CREATE TABLE statement. That is because some databases behave differently than others.

micah-prime commented 1 week ago

Ah, makes sense! Text seems like a great choice then