Run rubocop formatting except line length (#23632)

This commit is contained in:
Nick Schonning 2023-02-17 16:56:20 -05:00 committed by GitHub
commit 669f6d2c0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
71 changed files with 269 additions and 566 deletions

View file

@ -1,8 +1,8 @@
MIGRATION_BASE_CLASS = if ActiveRecord::VERSION::MAJOR >= 5
ActiveRecord::Migration[5.0]
else
ActiveRecord::Migration[4.2]
end
ActiveRecord::Migration[5.0]
else
ActiveRecord::Migration[4.2]
end
class RailsSettingsMigration < MIGRATION_BASE_CLASS
def self.up
@ -12,7 +12,7 @@ class RailsSettingsMigration < MIGRATION_BASE_CLASS
t.references :target, null: false, polymorphic: true, index: { name: 'index_settings_on_target_type_and_target_id' }
t.timestamps null: true
end
add_index :settings, [ :target_type, :target_id, :var ], unique: true
add_index :settings, [:target_type, :target_id, :var], unique: true
end
def self.down

View file

@ -4,9 +4,9 @@ class ImproveIndexOnStatusesForApiV1AccountsAccountIdStatuses < ActiveRecord::Mi
disable_ddl_transaction!
def change
# These changes ware reverted by migration 20180514140000.
# add_index :statuses, [:account_id, :id, :visibility], where: 'visibility IN (0, 1, 2)', algorithm: :concurrently
# add_index :statuses, [:account_id, :id], where: 'visibility = 3', algorithm: :concurrently
# remove_index :statuses, column: [:account_id, :id, :visibility, :updated_at], order: { id: :desc }, algorithm: :concurrently, name: :index_statuses_20180106
# These changes ware reverted by migration 20180514140000.
# add_index :statuses, [:account_id, :id, :visibility], where: 'visibility IN (0, 1, 2)', algorithm: :concurrently
# add_index :statuses, [:account_id, :id], where: 'visibility = 3', algorithm: :concurrently
# remove_index :statuses, column: [:account_id, :id, :visibility, :updated_at], order: { id: :desc }, algorithm: :concurrently, name: :index_statuses_20180106
end
end

View file

@ -21,4 +21,3 @@ class AddLockVersionToPolls < ActiveRecord::Migration[5.2]
remove_column :polls, :lock_version
end
end

View file

@ -4,4 +4,3 @@ class AddCommentsToDomainBlocks < ActiveRecord::Migration[5.2]
add_column :domain_blocks, :public_comment, :text
end
end

View file

@ -3,4 +3,3 @@ class AddStatusIdsToAnnouncements < ActiveRecord::Migration[5.2]
add_column :announcements, :status_ids, :bigint, array: true
end
end

View file

@ -19,4 +19,3 @@ class RemoveDuplicatedIndexesPghero < ActiveRecord::Migration[5.2]
add_index :markers, :user_id, name: :index_markers_on_user_id unless index_exists?(:markers, :user_id, name: :index_markers_on_user_id)
end
end

View file

@ -10,4 +10,3 @@ class CreateAccountNotes < ActiveRecord::Migration[5.2]
end
end
end

View file

@ -17,4 +17,3 @@ class CreateAccountStatusesCleanupPolicies < ActiveRecord::Migration[6.1]
end
end
end