debian-mirror-gitlab/config/initializers/0_acts_as_taggable.rb

20 lines
914 B
Ruby
Raw Normal View History

2021-03-11 19:13:27 +05:30
# frozen_string_literal: true
2017-08-17 22:00:37 +05:30
ActsAsTaggableOn.strict_case_match = true
# tags_counter enables caching count of tags which results in an update whenever a tag is added or removed
# since the count is not used anywhere its better performance wise to disable this cache
ActsAsTaggableOn.tags_counter = false
2017-09-10 17:25:29 +05:30
# validate that counter cache is disabled
2018-03-17 18:26:18 +05:30
raise "Counter cache is not disabled" if
2017-09-10 17:25:29 +05:30
ActsAsTaggableOn::Tagging.reflections["tag"].options[:counter_cache]
2021-09-04 01:27:46 +05:30
ActsAsTaggableOn::Tagging.include IgnorableColumns
2021-11-18 22:05:49 +05:30
ActsAsTaggableOn::Tagging.ignore_column :id_convert_to_bigint, remove_with: '14.5', remove_after: '2021-10-22'
ActsAsTaggableOn::Tagging.ignore_column :taggable_id_convert_to_bigint, remove_with: '14.5', remove_after: '2021-10-22'
2021-11-11 11:23:49 +05:30
# The tags and taggings are supposed to be part of `gitlab_ci`
ActsAsTaggableOn::Tag.gitlab_schema = :gitlab_ci
ActsAsTaggableOn::Tagging.gitlab_schema = :gitlab_ci