Class: WPB::AddTypeToWpPosts
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- WPB::AddTypeToWpPosts
- Defined in:
- lib/wpb.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
26 27 28 |
# File 'lib/wpb.rb', line 26 def self.down remove_column :wp_posts, :type end |
.up ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/wpb.rb', line 15 def self.up do unless column_exists? :wp_posts, :type add_column :wp_posts, :type, :string PagePost.reset_column_information else puts "\tWordPress Database Already Initialized" end end end |