[obs-commits] [openSUSE/open-build-service] 98cd74: Add data migration to remove obsolete notifications
![](https://seccdn.libravatar.org/avatar/9181eb84f9c35729a3bad740fb7f9d93.jpg?s=120&d=mm&r=g)
Branch: refs/heads/master Home: https://github.com/openSUSE/open-build-service Commit: 98cd7431fade4d70cd20bf0d3283ae7a88030ae8 https://github.com/openSUSE/open-build-service/commit/98cd7431fade4d70cd20bf... Author: Saray Cabrera Padrón <scabrerapadron@suse.de> Date: 2020-04-08 (Wed, 08 Apr 2020) Changed paths: A src/api/db/data/20200326170855_remove_obsolete_notifications.rb A src/api/spec/db/data/remove_obsolete_notifications_spec.rb Log Message: ----------- Add data migration to remove obsolete notifications Recent refactoring on notification creation code and database structure left some inconsistent data in the database. To solve the problem, with the current data migration we are going to remove the affected notifications as first step. Then, they will be re-generated in the following data migration. Data migration's tests included. Co-authored-by: David Kang <dkang@suse.com> Co-authored-by: Eduardo Navarro <enavarro@suse.com> Commit: b976d49909d9e1d98288465ad1582e40cfeff7a9 https://github.com/openSUSE/open-build-service/commit/b976d49909d9e1d9828846... Author: Saray Cabrera Padrón <scabrerapadron@suse.de> Date: 2020-04-08 (Wed, 08 Apr 2020) Changed paths: A src/api/db/data/20200326221616_regenerate_notifications.rb A src/api/spec/db/data/regenerate_notifications_spec.rb M src/api/spec/factories/event_subscriptions.rb Log Message: ----------- 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> Commit: eaaddd835e4392111078db0ead2f8acdb2b68c88 https://github.com/openSUSE/open-build-service/commit/eaaddd835e4392111078db... Author: Henne Vogelsang <hvogel@opensuse.org> Date: 2020-04-09 (Thu, 09 Apr 2020) Changed paths: A src/api/db/data/20200326170855_remove_obsolete_notifications.rb A src/api/db/data/20200326221616_regenerate_notifications.rb A src/api/spec/db/data/regenerate_notifications_spec.rb A src/api/spec/db/data/remove_obsolete_notifications_spec.rb M src/api/spec/factories/event_subscriptions.rb Log Message: ----------- Merge pull request #9355 from saraycp/notifications_data_migration Notifications data migration Compare: https://github.com/openSUSE/open-build-service/compare/ba8f248b8246...eaaddd...
participants (1)
-
Henne Vogelsang