Commit d3ac3c94 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Fix Rubocop offenses for EE migrations

parent 43971ef2
# rubocop:disable Migration/Timestamps
# rubocop:disable Migration/Datetime
class CreateUserActivities < ActiveRecord::Migration
# Set this constant to true if this migration requires downtime.
DOWNTIME = true
......
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
# rubocop:disable Migration/Datetime
class DropUserActivitiesTable < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
......
# rubocop:disable Rails/ReversibleMigration
class UpdateGroupLinks < ActiveRecord::Migration
def change
provider = quote_string(Gitlab::Auth::LDAP::Config.providers.first)
......
......@@ -19,6 +19,7 @@ class CanonicalizeKerberosIdentities < ActiveRecord::Migration
def change
reversible do |dir|
# rubocop:disable Cop/AvoidReturnFromBlocks
return unless kerberos_default_realm.present?
dir.up do
......
# rubocop:disable Migration/Timestamps
# rubocop:disable Migration/Datetime
class CreateIndexStatuses < ActiveRecord::Migration
def change
create_table :index_statuses do |t|
......
# rubocop:disable Migration/Datetime
# rubocop:disable Migration/Timestamps
class CreateRemoteMirrorsEE < ActiveRecord::Migration
def up
......
# Migration type: online without errors (works on previous version and new one)
# rubocop:disable Migration/AddColumnWithDefaultToLargeTable
# rubocop:disable Migration/Datetime
# rubocop:disable Migration/UpdateLargeTable
class AddLdapSyncStateToGroups < ActiveRecord::Migration
......
# rubocop:disable Migration/AddColumnWithDefaultToLargeTable
# rubocop:disable Migration/UpdateLargeTable
class AddSquashToMergeRequestsEE < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
......
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
# rubocop:disable Migration/AddColumnWithDefaultToLargeTable
# rubocop:disable Migration/UpdateLargeTable
class AddColumnAuditorToUsers < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
......
# rubocop:disable Migration/AddColumnWithDefaultToLargeTable
# rubocop:disable Migration/UpdateLargeTable
class AddSyncScheduleToProjectsAndRemoteProjects < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
......
# rubocop:disable Migration/Datetime
class CreateGeoRepositoryUpdatedEvents < ActiveRecord::Migration
DOWNTIME = false
......
# rubocop:disable Migration/Datetime
class CreateGeoEventLog < ActiveRecord::Migration
DOWNTIME = false
......
class CreateProjectRepositoryStates < ActiveRecord::Migration
class CreateProjectRepositoryStates < ActiveRecord::Migration
DOWNTIME = false
def change
......
......@@ -18,6 +18,7 @@ class CreateChatopsTables < ActiveRecord::Migration
t.index :pipeline_id, unique: true
end
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key :ci_pipeline_chat_data, :ci_pipelines,
column: :pipeline_id,
on_delete: :cascade
......
class AddExternalAuthMutualTlsFieldsToProjectSettings < ActiveRecord::Migration
DOWNTIME = false
def change
......
......@@ -11,4 +11,3 @@ class AddNegativeMatchingCommitMessagePushRule < ActiveRecord::Migration
remove_column :push_rules, :commit_message_negative_regex
end
end
......@@ -10,6 +10,7 @@ class AddIndexesToProjectMirrorDataEE < ActiveRecord::Migration
end
def down
# rubocop:disable Migration/RemoveIndex
remove_index :project_mirror_data, :last_successful_update_at if index_exists? :project_mirror_data, :last_successful_update_at
end
end
......@@ -4,6 +4,7 @@ class AddGeoNodesVerificationMaxCapacity < ActiveRecord::Migration
DOWNTIME = false
def change
# rubocop:disable Migration/AddColumn
add_column :geo_nodes, :verification_max_capacity, :integer, default: 100, null: false
end
end
......@@ -29,6 +29,7 @@ class DropRepositoryStorageEventsForGeoEvents < ActiveRecord::Migration
private
def update_repository_storage_path(table)
# rubocop:disable Migration/UpdateColumnInBatches
update_column_in_batches(table, :repository_storage_path, update_statement) do |t, q|
q.where(t[:repository_storage_path].eq(nil))
end
......
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