CUB-Libraries-CTA / counter-data-loader

Loads COUNTER database from JR1 report spreadsheets
1 stars 2 forks source link

Add date-time stamps to main tables #39

Closed ghost closed 2 years ago

ghost commented 2 years ago

As new rows are inserted into the title_report and metric tables, add create and update date-time stamps (both the same value on initial insert). If rows are subsequently updated, then refresh the update column accordingly.

This additional data will be useful at a later date for enhancements to the dashboard.

ghost commented 2 years ago

Timestamp columns have been added to both title_report and metric tables. For all spreadsheets loaded, the create_date and update_date for each row is the run date of the report. When both the create and update dates are equal, this signifies that the corresponding row is original and has not been updated.

If/when title or metric rows are subsequently updated, the update_date will be set to NOW().