]> git.openstreetmap.org Git - rails.git/blob - db/migrate/033_change_diary_entries_language.rb
use a controller method to handle cancan denials
[rails.git] / db / migrate / 033_change_diary_entries_language.rb
1 class ChangeDiaryEntriesLanguage < ActiveRecord::Migration[5.0]
2   def self.up
3     remove_column "diary_entries", "language"
4     add_column "diary_entries", "language_code", :string, :null => false, :default => "en"
5   end
6
7   def self.down
8     remove_column "diary_entries", "language_code"
9     add_column "diary_entries", "language", :string, :limit => 3
10   end
11 end