iftechfoundation / ifdb-suggestion-tracker

Bugs and feature requests for a future IFDB update
10 stars 0 forks source link

Embargo refresher is changing `reviews.moddate` #428

Closed dfabulich closed 6 months ago

dfabulich commented 6 months ago

Apropos https://github.com/iftechfoundation/ifdb/pull/270

The refresh-embargoed-reviews query updates reviews.embargopastdate. But there's a problem with that: reviews.moddate is defined like this:

CREATE TABLE `reviews` (
  `moddate` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),

So when we touch reviews.embargopastdate, we're also automagically updating reviews.moddate.

reviews.moddate is the date shown on the /viewgame page, so that's making all previously embargoed reviews look like they were written on their embargopastdate, which, for the majority of them, is the day we rolled out the schema change (today).

(Once we fix this, we'll need to manually go in and revert erroneous moddate values on the reviews table.)