thereido / RatingSync

Keep ratings from movie websites in sync
GNU General Public License v3.0
0 stars 1 forks source link

Use the rating table for current and archive ratings #37

Closed thereido closed 2 years ago

thereido commented 2 years ago

Add a boolean 'active' column to the rating. There should be only one rating for a title on one day, so changing the rating the same day replace it. There can be many inactive ratings for a title, but only one active rating for a title.

Don't keep inactive ratings for external sources.

Add the yourRatingDay column to the primary key.

thereido commented 2 years ago

Instructions for db changes

thereido commented 2 years ago

Some things to test...

thereido commented 2 years ago

Some things to test...

* Setting the date in the client

Unit testing in MainTest covers it, but it API requests are not implemented yet.

* External source rating in Rating::saveToDb()

* Unit tests for changes (like external vs internal ratings with different results, and only one rating for a date)

Changing ratings from external sources is out of scope. Changing a rating is only for internal (RatingSync) ratings.

* Unit tests for archived ratings

Unit tests implemented

thereido commented 2 years ago

Testing shows the back-end changes pretty solid. No front-end implementation yet.