Class: AddType
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- AddType
- Defined in:
- lib/wpb.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
31 32 33 |
# File 'lib/wpb.rb', line 31 def self.down remove_column :wp_posts, :type end |
.up ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/wpb.rb', line 22 def self.up do unless column_exists? :wp_posts, :type add_column :wp_posts, :type, :string PagePost.reset_column_information end end end |