debian-mirror-gitlab/config/initializers/postgres_partitioning.rb

11 lines
339 B
Ruby
Raw Normal View History

2020-07-28 23:09:34 +05:30
# frozen_string_literal: true
# Make sure we have loaded partitioned models here
# (even with eager loading disabled).
begin
Gitlab::Database::Partitioning::PartitionCreator.new.create_partitions
rescue ActiveRecord::ActiveRecordError, PG::Error
# ignore - happens when Rake tasks yet have to create a database, e.g. for testing
end