Sha256: 94c155d36824219efa013eb2fc53c4e51ab7ab276024750491e71851d482ab55

Contents?: true

Size: 950 Bytes

Versions: 15

Compression:

Stored size: 950 Bytes

Contents

class CreateTranslationCenterTranslations < ActiveRecord::Migration
  def change
    # if mysql
    if defined?(ActiveRecord::ConnectionAdapters::Mysql2Adapter).present? && ActiveRecord::Base.connection.instance_of?(ActiveRecord::ConnectionAdapters::Mysql2Adapter)
      
      create_table :translation_center_translations, options: 'CHARACTER SET=utf8' do |t|
        t.integer :translation_key_id
        t.text :value
        t.string :lang
        t.references :translator, polymorphic: true
        t.string :status, default: 'pending'

        t.timestamps
      end

    else

      create_table :translation_center_translations do |t|
        t.integer :translation_key_id
        t.text :value
        t.string :lang
        t.references :translator, polymorphic: true
        t.string :status, default: 'pending'

        t.timestamps
      end      

    end

    add_index :translation_center_translations, :translation_key_id
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
translation_center-2.0.2 lib/generators/translation_center/install/templates/migrations/create_translation_center_translations.rb
translation_center-2.0.1 lib/generators/translation_center/install/templates/migrations/create_translation_center_translations.rb
translation_center-1.7.2 lib/generators/translation_center/install/templates/migrations/create_translation_center_translations.rb
afalkear_translation_center-1.8.4 lib/generators/translation_center/install/templates/migrations/create_translation_center_translations.rb
afalkear_translation_center-1.8.3 lib/generators/translation_center/install/templates/migrations/create_translation_center_translations.rb
afalkear_translation_center-1.8.2 lib/generators/translation_center/install/templates/migrations/create_translation_center_translations.rb
afalkear_translation_center-1.8.1 lib/generators/translation_center/install/templates/migrations/create_translation_center_translations.rb
afalkear_translation_center-1.8.0 lib/generators/translation_center/install/templates/migrations/create_translation_center_translations.rb
afalkear_translation_center-1.7.9 lib/generators/translation_center/install/templates/migrations/create_translation_center_translations.rb
afalkear_translation_center-1.7.8 lib/generators/translation_center/install/templates/migrations/create_translation_center_translations.rb
afalkear_translation_center-0.0.0 lib/generators/translation_center/install/templates/migrations/create_translation_center_translations.rb
afalkear_translation_center-1.7.7 lib/generators/translation_center/install/templates/migrations/create_translation_center_translations.rb
translation_center-1.7.1 lib/generators/translation_center/install/templates/migrations/create_translation_center_translations.rb
translation_center-1.7.0 lib/generators/translation_center/install/templates/migrations/create_translation_center_translations.rb
translation_center-1.6.10 lib/generators/translation_center/install/templates/migrations/create_translation_center_translations.rb