Sha256: 4c9a2f2cbfd19ee7cbefdcbfca69ae52a3aee72c694565ee879fbc6bd2173f89

Contents?: true

Size: 704 Bytes

Versions: 1

Compression:

Stored size: 704 Bytes

Contents

# This migration comes from enju_library_engine (originally 20151213070943)
class AddTranslationTableToLibraryGroup < ActiveRecord::Migration[5.0]
  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

1 entries across 1 versions & 1 rubygems

Version Path
enju_seed-0.3.0.beta.4 spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb