Sha256: 04c8f1e885793129ec270aef7f81f5f57696c0948820b4e0105133256ec18a83

Contents?: true

Size: 699 Bytes

Versions: 3

Compression:

Stored size: 699 Bytes

Contents

# This migration comes from enju_library_engine (originally 20151213070943)
class AddTranslationTableToLibraryGroup < ActiveRecord::Migration
  def up
    if defined?(Globalize)
      LibraryGroup.create_translation_table!({
                                               login_banner: :text
                                             }, migrate_data: true)
    end

    if defined?(AwesomeHstoreTranslate)
      add_column :library_groups, :login_banner, :hstore
    end
  end

  def down
    if defined?(Globalize)
      LibraryGroup.drop_translation_table! migrate_data: true
    end

    if defined?(AwesomeHstoreTranslate)
      remove_column :library_groups, :login_banner
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
enju_seed-0.3.0.beta.3 spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
enju_seed-0.3.0.beta.2 spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
enju_seed-0.3.0.beta.1 spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb