Add data migration to re-generate notifications
Recent refactoring on notification creation code and database structure left some inconsistent data in the database. To solve the problem, we are going to remove the affected notifications (in the previous data migration) and then we are going to re-generate the notifications (with the current data migration). In this case, we are taking objects existing in the database with certain states and conditions (requests, reviews and comments) and we are creating a notification for each of them. The notifications affected are those related to the events 'ReviewWanted', 'RequestCreate', 'RequestStatechange' and 'CommentForRequest'. This data migration makes use of the recently created NotificationCreator and refactored code. Data migration's tests included. Co-authored-by: David Kang <dkang@suse.com> Co-authored-by: Eduardo Navarro <enavarro@suse.com>
Please register or sign in to comment