Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'db/post_migrate/20180913142237_schedule_digest_personal_access_tokens.rb')
-rw-r--r--db/post_migrate/20180913142237_schedule_digest_personal_access_tokens.rb28
1 files changed, 0 insertions, 28 deletions
diff --git a/db/post_migrate/20180913142237_schedule_digest_personal_access_tokens.rb b/db/post_migrate/20180913142237_schedule_digest_personal_access_tokens.rb
deleted file mode 100644
index 951cb3b088c..00000000000
--- a/db/post_migrate/20180913142237_schedule_digest_personal_access_tokens.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-class ScheduleDigestPersonalAccessTokens < ActiveRecord::Migration[4.2]
- include Gitlab::Database::MigrationHelpers
-
- DOWNTIME = false
-
- BATCH_SIZE = 10_000
- MIGRATION = 'DigestColumn'
- DELAY_INTERVAL = 5.minutes.to_i
-
- disable_ddl_transaction!
-
- class PersonalAccessToken < ActiveRecord::Base
- include EachBatch
-
- self.table_name = 'personal_access_tokens'
- end
-
- def up
- PersonalAccessToken.where('token is NOT NULL').each_batch(of: BATCH_SIZE) do |batch, index|
- range = batch.pluck('MIN(id)', 'MAX(id)').first
- BackgroundMigrationWorker.perform_in(index * DELAY_INTERVAL, MIGRATION, ['PersonalAccessToken', :token, :token_digest, *range])
- end
- end
-
- def down
- # raise ActiveRecord::IrreversibleMigration
- end
-end