Sha256: 2b8b728048f846d416d7cbab5fcc69793edaeab44c67462c01b9d53310956a67

Contents?: true

Size: 787 Bytes

Versions: 8

Compression:

Stored size: 787 Bytes

Contents

class CreateLanguages < ActiveRecord::Migration[4.2]

  # ISO 639 is the set of international standards that lists short codes for language names.
  # Note this doesn't include macrolanguages (dialects)
  # Information on macrolanguages http://en.wikipedia.org/wiki/ISO_639_macrolanguage

  def change
    create_table :languages do |t|
      t.string :name, :null => false
      t.string :native_name
      t.text :display_name
      t.string :iso_639_1,        :size => 3
      t.string :iso_639_2,        :size => 3
      t.string :iso_639_3,        :size => 3
      t.text :note
      t.integer :position
    end
    add_index :languages, :name, :unique => true
    add_index :languages, :iso_639_1
    add_index :languages, :iso_639_2
    add_index :languages, :iso_639_3
  end
end

Version data entries

8 entries across 8 versions & 5 rubygems

Version Path
enju_purchase_request-0.3.2 spec/dummy/db/migrate/20081025083905_create_languages.rb
enju_purchase_request-0.3.1 spec/dummy/db/migrate/20081025083905_create_languages.rb
enju_loc-0.3.0 spec/dummy/db/migrate/20081025083905_create_languages.rb
enju_search_log-0.3.0.beta.1 spec/dummy/db/migrate/20081025083905_create_languages.rb
enju_purchase_request-0.3.0.beta.1 spec/dummy/db/migrate/20081025083905_create_languages.rb
enju_loc-0.3.0.beta.1 spec/dummy/db/migrate/20081025083905_create_languages.rb
enju_leaf-1.3.0.beta.2 spec/dummy/db/migrate/20081025083905_create_languages.rb
enju_manifestation_viewer-0.3.0.beta.1 spec/dummy/db/migrate/20081025083905_create_languages.rb