aboutsummaryrefslogtreecommitdiffstats
path: root/spec/dummy/db/migrate/20110810070753_add_custom_slug_to_refinery_page_translations.rb
blob: 2feb8378c37e2db62191595ede8bb8ba6c4326be (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
class AddCustomSlugToRefineryPageTranslations < ActiveRecord::Migration
  def up
    if ::Refinery::Page::Translation.column_names.map(&:to_sym).exclude?(:custom_slug)
      add_column ::Refinery::Page::Translation.table_name, :custom_slug, :string, :default => nil
    end
  end

  def down
    remove_column ::Refinery::Page::Translation.table_name, :custom_slug
  end
end