Commit Graph

4 Commits

Author SHA1 Message Date
Timothy Andrew 8747f29db7 Fix `ON DELETE CASCADE` migrations.
Incorrect syntax.
2016-09-20 16:31:52 +05:30
Timothy Andrew 8957293d9b Implement review comments from @yorickpeterse
1. Change multiple updates to a single `update_all`

2. Use cascading deletes

3. Extract an average function for the database median.

4. Move database median to `lib/gitlab/database`

5. Use `delete_all` instead of `destroy_all`

6. Minor refactoring
2016-09-20 16:05:25 +05:30
Timothy Andrew 2cddd02ec5 Remove unused merge request metrics.
- These are not being used anymore.
- Consolidate all issue metrics into a single migration.
- Consolidate all merge request metrics into a single migration.
2016-09-19 13:12:06 +05:30
Timothy Andrew 516c838a18 Add an `Issue::Metrics` model.
- And store the `first_associated_with_milestone_at` and
  `first_added_to_board_at` times, when an issue is saved.
2016-08-26 16:27:37 +05:30