Commit graph

6 commits

Author SHA1 Message Date
Lin Jen-Shin
b95da565cd Enable rubocop for db/**/* and ee/db/**/* 2018-07-25 17:47:12 +08:00
blackst0ne
bc00806a4e Add database helpers 'add_timestamps_with_timezone' and 'timestamps_with_timezone' 2017-06-13 22:44:13 +11:00
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