馃挜 [DevOps] Database migration to set Report.disable
Created by: Tirokk
Authored by mattwr18
馃敟 DevOps ticket
Create a database migration to set Report.disable
to the final decision, last review rules.
Motive
Currently, we have about 300 Reports with disable
as null
, and it's labeled as non-nullable in Report.gql
. Also, we might need toggle the state of a resource disable in different Report
decisions.
This can make it difficult to find out which Report
disabled it, under which rule
. Right now, we are limited to latestReviewUpdatedAtRules
, but in the future we might move towards more of a community moderated model.
Related issues
This was a todo on issue https://github.com/Human-Connection/Human-Connection/issues/3074 but it was kind of forgotten about, and the other parts of that issue have already been merged in a while ago. It made sense to extract this into its own issue.
Implementation
Write a database migration.
Validation
MATCH (report:Report) WHERE report.disable IS NULL RETURN count(report);
should return 0