Andreas Brandl
988dc80585
Further remove code branches by database type
...
We dropped MySQL support and a lot of mysql specific code has been
removed in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/29608 .
This comes in from the other direction and removes any `if postgresql?`
branches.
2019-07-29 12:47:06 +02:00
Nick Thomas
4aa76dddec
Remove dead MySQL code
...
None of this code can be reached any more, so it can all be removed
2019-07-23 16:53:03 +01:00
Małgorzata Ksionek
2ecad462a0
Add where condition to count in median class
2019-07-04 23:11:45 +02:00
Jasper Maes
56296f1eda
Remove rails4 specific code
2018-12-16 10:48:41 +01:00
gfyoung
7e6f6e1603
Enable even more frozen string in lib/gitlab
...
Enables frozens string for the following:
* lib/gitlab/conflict/**/*.rb
* lib/gitlab/cross_project_access/**/*.rb
* lib/gitlab/cycle_analytics/**/*.rb
* lib/gitlab/data_builder/**/*.rb
* lib/gitlab/database/**/*.rb
* lib/gitlab/dependency_linker/**/*.rb
* lib/gitlab/diff/**/*.rb
* lib/gitlab/downtime_check/**/*.rb
* lib/gitlab/email/**/*.rb
* lib/gitlab/etag_caching/**/*.rb
Partially addresses gitlab-org/gitlab-ce#47424 .
2018-11-06 22:47:32 -08:00
Jasper Maes
faf94535fb
Rails5 fix arel from in mysql_median_datetime_sql
2018-06-26 00:35:47 +02:00
Jasper Maes
a91999e4fa
Rails5 Fix arel from
2018-06-02 15:00:51 +02:00
Tiago Botelho
522f4b2c6a
Adapt cycle analytics spec helper and cycle analytics usage data spec
2018-03-01 16:43:26 +00:00
Tiago Botelho
335ee79a73
Refactors median code to work with both single and multiple projects
2018-02-28 10:46:20 +00:00
Tiago Botelho
4fcbcce364
Add BatchLoader as a way to refactor the base stage code
2018-02-28 10:46:20 +00:00
Tiago Botelho
a7b3f11edd
Adds get all medians to Cycle Analytics model
2018-02-28 10:46:19 +00:00
Grzegorz Bizon
0430b76441
Enable Style/DotPosition Rubocop 👮
2017-06-21 13:48:12 +00:00
Douwe Maan
1fe7501b49
Revert "Prefer leading style for Style/DotPosition"
...
This reverts commit cb10b725c8929b8b4460f89c9d96c773af39ba6b.
2017-02-23 09:33:05 -06:00
Douwe Maan
bdbc7d967a
Revert "Enable Style/BarePercentLiterals"
...
This reverts commit 96bef54154e669f9a3e92c3a4bc76c0be3a52e48.
2017-02-23 09:32:42 -06:00
Douwe Maan
6023fbfd0f
Enable Style/EmptyLineBetweenDefs
2017-02-23 09:32:22 -06:00
Douwe Maan
206953a430
Prefer leading style for Style/DotPosition
2017-02-23 09:32:22 -06:00
Douwe Maan
baafd8de26
Enable Style/BarePercentLiterals
2017-02-23 09:31:57 -06:00
James Lopez
69ecd951a9
refactor fetcher and fixed specs
2017-01-17 11:32:55 +01:00
Timothy Andrew
244ec0a84c
Implement fourth round of comments from @DouweM.
...
- Pluralize summary titles
- Remove the `run_query` method - always return sql strings from the
`date_time_sql` methods
2016-09-21 09:57:14 +05:30
Timothy Andrew
6df2d57394
Improve indentation in `Gitlab::Database::Median`
2016-09-21 02:18:57 +05:30
Timothy Andrew
918e589c2b
Implement a second round of review comments from @DouweM.
...
- Don't use `TableReferences` - using `.arel_table` is shorter!
- Move some database-related code to `Gitlab::Database`
- Remove the `MergeRequest#issues_closed` and
`Issue#closed_by_merge_requests` associations. They were either
shadowing or were too similar to existing methods. They are not being
used anywhere, so it's better to remove them to reduce confusion.
- Use Rails 3-style validations
- Index for `MergeRequest::Metrics#first_deployed_to_production_at`
- Only include `CycleAnalyticsHelpers::TestGeneration` for specs that
need it.
- Other minor refactorings.
2016-09-21 00:47:37 +05:30
Timothy Andrew
231a9f5b87
Fix rubocop spec.
...
And `scss_lint`
2016-09-20 18:26:31 +05:30
Timothy Andrew
71d4bf721b
Implement (some) comments from @DouweM's review.
...
- Move things common to `Issue` and `MergeRequest` into `Issuable`
- Move more database-specific functions into `Gitlab::Database`
- Indentation changes and other minor refactorings.
2016-09-20 18:13:11 +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