Sha256: 80b8bd15551e2c6cd93d76bd42bd6adba5d695bc7d2ec278b5702b939825d8c7

Contents?: true

Size: 465 Bytes

Versions: 35

Compression:

Stored size: 465 Bytes

Contents

class FixTranslationUserRelation < ActiveRecord::Migration
  def up
    rename_column :translation_center_translations, :user_id, :translator_id
    add_column :translation_center_translations, :translator_type, :string
    TranslationCenter::Translation.update_all(translator_type: 'User')
  end

  def down
    rename_column :translation_center_translations, :translator_id, :user_id
    remove_column :translation_center_translations, :translator_type
  end
end

Version data entries

35 entries across 33 versions & 2 rubygems

Version Path
translation_center-2.0.2 spec/dummy/db/migrate/20130506103956_fix_translation_user_relation.translation_center.rb
translation_center-2.0.2 db/migrate/20130506103609_fix_translation_user_relation.rb
translation_center-2.0.1 db/migrate/20130506103609_fix_translation_user_relation.rb
translation_center-2.0.1 spec/dummy/db/migrate/20130506103956_fix_translation_user_relation.translation_center.rb
translation_center-1.7.2 test/dummy/db/migrate/20130506103956_fix_translation_user_relation.rb
afalkear_translation_center-1.8.4 test/dummy/db/migrate/20130506103956_fix_translation_user_relation.rb
afalkear_translation_center-1.8.3 test/dummy/db/migrate/20130506103956_fix_translation_user_relation.rb
afalkear_translation_center-1.8.2 test/dummy/db/migrate/20130506103956_fix_translation_user_relation.rb
afalkear_translation_center-1.8.1 test/dummy/db/migrate/20130506103956_fix_translation_user_relation.rb
afalkear_translation_center-1.8.0 test/dummy/db/migrate/20130506103956_fix_translation_user_relation.rb
afalkear_translation_center-1.7.9 test/dummy/db/migrate/20130506103956_fix_translation_user_relation.rb
afalkear_translation_center-1.7.8 test/dummy/db/migrate/20130506103956_fix_translation_user_relation.rb
afalkear_translation_center-0.0.0 test/dummy/db/migrate/20130506103956_fix_translation_user_relation.rb
afalkear_translation_center-1.7.7 test/dummy/db/migrate/20130506103956_fix_translation_user_relation.rb
translation_center-1.7.1 test/dummy/db/migrate/20130506103956_fix_translation_user_relation.rb
translation_center-1.7.0 test/dummy/db/migrate/20130506103956_fix_translation_user_relation.rb
translation_center-1.6.10 test/dummy/db/migrate/20130506103956_fix_translation_user_relation.rb
translation_center-1.6.9 test/dummy/db/migrate/20130506103956_fix_translation_user_relation.rb
translation_center-1.6.8 test/dummy/db/migrate/20130506103956_fix_translation_user_relation.rb
translation_center-1.6.7 test/dummy/db/migrate/20130506103956_fix_translation_user_relation.rb