]> git.openstreetmap.org Git - rails.git/blob - db/migrate/035_change_user_locale.rb
Remove comment saying when these files were generated
[rails.git] / db / migrate / 035_change_user_locale.rb
1 require 'lib/migrate'
2
3 class ChangeUserLocale < ActiveRecord::Migration
4   def self.up
5     remove_foreign_key :users, [:locale], :languages, [:code]
6
7     rename_column :users, :locale, :languages
8   end
9
10   def self.down
11     rename_column :users, :languages, :locale
12
13     add_foreign_key :users, [:locale], :languages, [:code]
14   end
15 end