Files
grecia/db/migrate/20180220211105_change_newsletter_segment_recipient_to_string.rb
Javi Martín 5b7a969964 Fix Rails/ReversibleMigration rule offenses
We forgot to do so in commit fc757428e, when we upgraded rubocop-rails.
In this upgrade, this rule was changed to include the `change_column`
method.

Just like we did in commit df959b74f, I'm raising an
`ActiveRecord::IrreversibleMigration` exception in migrations done
before version 1.0.0, since making all of them reversible would be too
much work for little benefit.
2022-08-25 21:36:31 +02:00

10 lines
233 B
Ruby

class ChangeNewsletterSegmentRecipientToString < ActiveRecord::Migration[4.2]
def up
change_column :newsletters, :segment_recipient, :string, null: false
end
def down
fail ActiveRecord::IrreversibleMigration
end
end