Sha256: 233aa6823c77ba7c8f079804808de83d63582a8f1afc90b056cacda4db20aed4

Contents?: true

Size: 654 Bytes

Versions: 53

Compression:

Stored size: 654 Bytes

Contents

class CreateActiveadminSelleoCmsLocales < ActiveRecord::Migration
  def up
    create_table :activeadmin_selleo_cms_locales do |t|
      t.string :name
      t.string :code
      t.boolean :enabled, default: false
    end
    add_index :activeadmin_selleo_cms_locales, :name
    add_index :activeadmin_selleo_cms_locales, :code
    add_index :activeadmin_selleo_cms_locales, :enabled
    LanguageList::COMMON_LANGUAGES.each do |lang|
      ActiveadminSelleoCms::Locale.create({name: lang.name, code: lang.iso_639_1, enabled: ['en'].include?(lang.iso_639_1)}, as: :admin)
    end
  end

  def down
    drop_table :activeadmin_selleo_cms_locales
  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
activeadmin-selleo-cms-0.0.14 db/migrate/20121129160200_create_activeadmin_selleo_cms_locales.rb
activeadmin-selleo-cms-0.0.13 db/migrate/20121129160200_create_activeadmin_selleo_cms_locales.rb
activeadmin-selleo-cms-0.0.12 db/migrate/20121129160200_create_activeadmin_selleo_cms_locales.rb
activeadmin-selleo-cms-0.0.11 db/migrate/20121129160200_create_activeadmin_selleo_cms_locales.rb
activeadmin-selleo-cms-0.0.10 db/migrate/20121129160200_create_activeadmin_selleo_cms_locales.rb
activeadmin-selleo-cms-0.0.9 db/migrate/20121129160200_create_activeadmin_selleo_cms_locales.rb
activeadmin-selleo-cms-0.0.8 db/migrate/20121129160200_create_activeadmin_selleo_cms_locales.rb
activeadmin-selleo-cms-0.0.7 db/migrate/20121129160200_create_activeadmin_selleo_cms_locales.rb
activeadmin-selleo-cms-0.0.6 db/migrate/20121129160200_create_activeadmin_selleo_cms_locales.rb
activeadmin-selleo-cms-0.0.5 db/migrate/20121129160200_create_activeadmin_selleo_cms_locales.rb
activeadmin-selleo-cms-0.0.4 db/migrate/20121129160200_create_activeadmin_selleo_cms_locales.rb
activeadmin-selleo-cms-0.0.3 db/migrate/20121129160200_create_activeadmin_selleo_cms_locales.rb
activeadmin-selleo-cms-0.0.2 db/migrate/20121129160200_create_activeadmin_selleo_cms_locales.rb