gitlab-org--gitlab-foss/spec/lib/gitlab/database
Stan Hu b35a6880b9 Fix counting of groups in admin dashboard
1. Ignore tables that use STI in reltuples count strategy.

   Models that use Rails' single-type inheritance, such as `Group` and
   `CiService`, need an additional WHERE clause to count the total
   properly, which isn't supported by the reltuples strategy.  For now,
   we just omit these from the statistics sampling and rely on the other
   strategies to get this data.

2. Fix tablesample count strategy not counting groups properly.

   Models such as `Group` needs a WHERE clause to distinguish it from
   namespaces. We now add in the WHERE clause if STI is in use.

Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/7435
2019-03-11 23:50:47 -07:00
..
count Fix counting of groups in admin dashboard 2019-03-11 23:50:47 -07:00
rename_reserved_paths_migration Fix misspellings in app/spec executable lines 2019-02-27 22:41:34 +09:00
count_spec.rb Move strategies in their own files 2018-12-03 21:26:53 +01:00
grant_spec.rb Fix TRIGGER checks for MySQL 2017-11-06 23:34:07 +01:00
median_spec.rb Adapt cycle analytics spec helper and cycle analytics usage data spec 2018-03-01 16:43:26 +00:00
migration_helpers_spec.rb Remove rails 4 support in CI, Gemfiles, bin/ and config/ 2018-12-14 19:36:22 +01:00
multi_threaded_migration_spec.rb
sha_attribute_spec.rb [Rails5] Update `type_cast_*_database` methods 2018-04-06 10:57:19 +00:00
subquery_spec.rb Add Gitlab::Database::Subquery.self_join to delete_all with limit 2018-09-20 16:27:09 +02:00