summaryrefslogtreecommitdiff
path: root/db/migrate/20190902131045_replace_indexes_for_counting_active_users.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20190902131045_replace_indexes_for_counting_active_users.rb')
-rw-r--r--db/migrate/20190902131045_replace_indexes_for_counting_active_users.rb23
1 files changed, 0 insertions, 23 deletions
diff --git a/db/migrate/20190902131045_replace_indexes_for_counting_active_users.rb b/db/migrate/20190902131045_replace_indexes_for_counting_active_users.rb
deleted file mode 100644
index 2c7c47bee96..00000000000
--- a/db/migrate/20190902131045_replace_indexes_for_counting_active_users.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-class ReplaceIndexesForCountingActiveUsers < ActiveRecord::Migration[5.2]
- include Gitlab::Database::MigrationHelpers
-
- DOWNTIME = false
-
- disable_ddl_transaction!
-
- def up
- remove_concurrent_index_by_name(:users, 'index_users_on_state_and_internal')
-
- add_concurrent_index(:users, :state, where: 'ghost IS NOT TRUE', name: 'index_users_on_state_and_internal')
- add_concurrent_index(:users, :state, where: 'ghost IS NOT TRUE AND bot_type IS NULL', name: 'index_users_on_state_and_internal_ee')
- end
-
- def down
- remove_concurrent_index_by_name(:users, 'index_users_on_state_and_internal_ee')
- remove_concurrent_index_by_name(:users, 'index_users_on_state_and_internal')
-
- add_concurrent_index(:users, :state, where: 'ghost <> true AND bot_type IS NULL', name: 'index_users_on_state_and_internal')
- end
-end