Sha256: 0b80c9cc956348a6f88ad73828b1aba335a8bae60e731fd021ea298cc2a72471

Contents?: true

Size: 644 Bytes

Versions: 51

Compression:

Stored size: 644 Bytes

Contents

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

51 entries across 51 versions & 16 rubygems

Version Path
enju_seed-0.3.1 spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
enju_inventory-0.3.0 spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
enju_event-0.3.1 spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
enju_bookmark-0.3.0 spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
enju_loc-0.3.0 spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
enju_nii-0.3.0 spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
enju_ndl-0.3.0 spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
enju_event-0.3.0 spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
enju_message-0.3.0 spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
enju_seed-0.3.0 spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
enju_ndl-0.3.0.rc.1 spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
enju_message-0.3.0.rc.1 spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
enju_event-0.3.0.rc.1 spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
enju_seed-0.3.0.rc.1 spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
enju_seed-0.3.0.beta.7 spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
enju_grid-0.3.0.beta.1 spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
enju_inter_library_loan-0.3.0.beta.1 spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
enju_search_log-0.3.0.beta.1 spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
enju_purchase_request-0.3.0.beta.1 spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
enju_inventory-0.3.0.beta.1 spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb