1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
class AddLocaleToSlugs < ActiveRecord::Migration def self.up add_column ::Slug.table_name, :locale, :string, :limit => 5 add_index ::Slug.table_name, :locale ::Slug.reset_column_information end def self.down remove_column :slugs, :locale ::Slug.reset_column_information end end