Commit 13065a8c authored by Peter Leitzen's avatar Peter Leitzen

Stop checking migration version in project factory

Since we've truncated the migrations after 2018-12-28
(see db/migrate/20181228175414_init_schema.rb) we can safely remove this
check which reduces the query count for a project factory by 1.
parent 3c0b6a9f
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
require_relative '../support/helpers/test_env' require_relative '../support/helpers/test_env'
FactoryBot.define do FactoryBot.define do
PAGES_ACCESS_LEVEL_SCHEMA_VERSION ||= 20180423204600
# Project without repository # Project without repository
# #
# Project does not have bare repository. # Project does not have bare repository.
...@@ -54,13 +52,10 @@ FactoryBot.define do ...@@ -54,13 +52,10 @@ FactoryBot.define do
issues_access_level: evaluator.issues_access_level, issues_access_level: evaluator.issues_access_level,
forking_access_level: evaluator.forking_access_level, forking_access_level: evaluator.forking_access_level,
merge_requests_access_level: merge_requests_access_level, merge_requests_access_level: merge_requests_access_level,
repository_access_level: evaluator.repository_access_level repository_access_level: evaluator.repository_access_level,
pages_access_level: evaluator.pages_access_level
} }
if ActiveRecord::Migrator.current_version >= PAGES_ACCESS_LEVEL_SCHEMA_VERSION
hash.store("pages_access_level", evaluator.pages_access_level)
end
project.project_feature.update!(hash) project.project_feature.update!(hash)
# Normally the class Projects::CreateService is used for creating # Normally the class Projects::CreateService is used for creating
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment