aboutsummaryrefslogtreecommitdiffstats
path: root/spec/dummy/db/migrate/20101217113424_add_locale_to_slugs.rb
blob: 4b56f03bcc9aa59953ec10b4577514f6090c1411 (plain) (blame)
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