Class: OnlineMigrations::BackgroundMigrations::BackfillCallRecordRecordingSource
- Inherits:
-
OnlineMigrations::BackgroundMigration
- Object
- OnlineMigrations::BackgroundMigration
- OnlineMigrations::BackgroundMigrations::BackfillCallRecordRecordingSource
- Defined in:
- lib/online_migrations/background_migrations/backfill_call_record_recording_source.rb
Overview
Backfill recording_source = 'switchvox' for existing CallRecords with NULL
This ensures the recording source filter works correctly for both sources
Delegated Instance Attributes collapse
-
#count ⇒ Object
Alias for Relation#count.
Instance Method Summary collapse
Instance Method Details
#count ⇒ Object
Alias for Relation#count
16 |
# File 'lib/online_migrations/background_migrations/backfill_call_record_recording_source.rb', line 16 delegate :count, to: :relation |
#process_batch(call_records) ⇒ Object
12 13 14 |
# File 'lib/online_migrations/background_migrations/backfill_call_record_recording_source.rb', line 12 def process_batch(call_records) call_records.update_all(recording_source: 'switchvox') end |
#relation ⇒ Object
8 9 10 |
# File 'lib/online_migrations/background_migrations/backfill_call_record_recording_source.rb', line 8 def relation CallRecord.where(recording_source: nil) end |