Class: Gitlab::BackgroundMigration::BackfillNoteDiscussionId::Note
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Gitlab::BackgroundMigration::BackfillNoteDiscussionId::Note
- Includes:
- EachBatch
- Defined in:
- lib/gitlab/background_migration/backfill_note_discussion_id.rb
Overview
Migration only version of notes model
Constant Summary
Constants inherited from ApplicationRecord
Constants included from ResetOnUnionError
ResetOnUnionError::MAX_RESET_PERIOD
Instance Method Summary collapse
Methods inherited from ApplicationRecord
cached_column_list, #create_or_load_association, declarative_enum, default_select_columns, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, #readable_by?, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, #to_ability_name, underscore, where_exists, where_not_exists, with_fast_read_statement_timeout, without_order
Methods included from SensitiveSerializableHash
Instance Method Details
#generate_discussion_id ⇒ Object
17 18 19 20 21 |
# File 'lib/gitlab/background_migration/backfill_note_discussion_id.rb', line 17 def generate_discussion_id Digest::SHA1.hexdigest( [:discussion, noteable_type.try(:underscore), noteable_id || commit_id, SecureRandom.hex].join('-') ) end |