Sha256: 49ddbf93d2a82b0900a9e677ca448f84a63413940a39109feb0ce3c00c0583c9

Contents?: true

Size: 383 Bytes

Versions: 25

Compression:

Stored size: 383 Bytes

Contents

# frozen_string_literal: true

class MoveLegacyDescriptionToTitleOfTimelineEntries < ActiveRecord::Migration[6.1]
  class TimelineEntry < ApplicationRecord
    self.table_name = :decidim_accountability_timeline_entries
  end

  def up
    TimelineEntry.find_each do |timeline_entry|
      timeline_entry.update!(title: timeline_entry.description, description: nil)
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
decidim-accountability-0.27.2 db/migrate/20220331150155_move_legacy_description_to_title_of_timeline_entries.rb
decidim-accountability-0.27.1 db/migrate/20220331150155_move_legacy_description_to_title_of_timeline_entries.rb
decidim-accountability-0.27.0 db/migrate/20220331150155_move_legacy_description_to_title_of_timeline_entries.rb
decidim-accountability-0.27.0.rc2 db/migrate/20220331150155_move_legacy_description_to_title_of_timeline_entries.rb
decidim-accountability-0.27.0.rc1 db/migrate/20220331150155_move_legacy_description_to_title_of_timeline_entries.rb