Sha256: 903c701ceb646aaa300f47762bb3a38dea40696e0ccf4fd019517d73a3bd2d91

Contents?: true

Size: 347 Bytes

Versions: 13

Compression:

Stored size: 347 Bytes

Contents

# frozen_string_literal: true

class ConvertRadioToRadioButtons < ActiveRecord::Migration[4.2]
  def up
    # UPDATE "fields" SET "as" = 'radio_buttons' WHERE "fields"."as" = $1  [["as", "radio"]]
    Field.where(as: 'radio').update_all(as: 'radio_buttons')
  end

  def down
    Field.where(as: 'radio_buttons').update_all(as: 'radio')
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
fat_free_crm-0.22.1 db/migrate/20150123060900_convert_radio_to_radio_buttons.rb
fat_free_crm-0.22.0 db/migrate/20150123060900_convert_radio_to_radio_buttons.rb
fat_free_crm-0.21.0 db/migrate/20150123060900_convert_radio_to_radio_buttons.rb
fat_free_crm-0.20.1 db/migrate/20150123060900_convert_radio_to_radio_buttons.rb
fat_free_crm-0.20.0 db/migrate/20150123060900_convert_radio_to_radio_buttons.rb
fat_free_crm-0.19.2 db/migrate/20150123060900_convert_radio_to_radio_buttons.rb
fat_free_crm-0.19.0 db/migrate/20150123060900_convert_radio_to_radio_buttons.rb
fat_free_crm-0.18.2 db/migrate/20150123060900_convert_radio_to_radio_buttons.rb
fat_free_crm-0.17.3 db/migrate/20150123060900_convert_radio_to_radio_buttons.rb
fat_free_crm-0.18.1 db/migrate/20150123060900_convert_radio_to_radio_buttons.rb
fat_free_crm-0.18.0 db/migrate/20150123060900_convert_radio_to_radio_buttons.rb
fat_free_crm-0.17.2 db/migrate/20150123060900_convert_radio_to_radio_buttons.rb
fat_free_crm-0.17.1 db/migrate/20150123060900_convert_radio_to_radio_buttons.rb