pepkit / pepdbagent

Database for storing sample metadata
BSD 2-Clause "Simplified" License
2 stars 1 forks source link

Add columns: `last_update_date` and `submission_date` #62

Closed khoroshevskyi closed 1 year ago

khoroshevskyi commented 1 year ago

Add two additional columns to database table:

While udate date information is stored in annot_table, it's inefficient and sql syntax complicated to update this value every time we update project

nleroy917 commented 1 year ago

Hey this is great! Super helpful for pephub. It would be even better if the last_update were initialized as the submission_date when inserted into the database. As an example, I just submitted this basic PEP, and when fetching info from the database, this is the JSON:

image

Not that big of a deal since you can add logic to use submission data if last update is null, but would be convenient to init the last_update with the submission date.

khoroshevskyi commented 1 year ago

This is some I think, this is a bug, because everything was working for me. Where exactly in the code do you have this issue?

khoroshevskyi commented 1 year ago

I think, I found the error, key name will be last_update_date, I just forgot to change it in Annotation model