3 class AddTextFormat < ActiveRecord::Migration[4.2]
5 create_enumeration :format_enum, %w[html markdown text]
6 add_column :users, :description_format, :format_enum, :null => false, :default => "html"
7 add_column :user_blocks, :reason_format, :format_enum, :null => false, :default => "html"
8 add_column :diary_entries, :body_format, :format_enum, :null => false, :default => "html"
9 add_column :diary_comments, :body_format, :format_enum, :null => false, :default => "html"
10 add_column :messages, :body_format, :format_enum, :null => false, :default => "html"
14 remove_column :messages, :body_format
15 remove_column :diary_comments, :body_format
16 remove_column :diary_entries, :body_format
17 remove_column :user_blocks, :reason_format
18 remove_column :users, :description_format
19 drop_enumeration :format_enum