Skip to content

Instantly share code, notes, and snippets.

@EnotPoloskunAndIluhaAndr
Created February 9, 2012 20:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save EnotPoloskunAndIluhaAndr/1782998 to your computer and use it in GitHub Desktop.
Save EnotPoloskunAndIluhaAndr/1782998 to your computer and use it in GitHub Desktop.
class AddNewFieldsToComments < ActiveRecord::Migration
def self.up
<<<<<<< HEAD
add_column :comments, :ip, :string
add_column :comments, :rate, :integer
add_column :comments, :email, :string
add_column :comments, :user_name, :string
add_column :comments, :description, :text
add_column :comments, :page_id, :integer
remove_column :comments, :title
remove_column :comments, :comment
=======
add_column :comments, :ip, :string
add_column :comments, :rate, :integer
add_column :comments, :email, :string
add_column :comments, :user_name, :string
add_column :comments, :description, :text
add_column :comments, :page_id, :integer
remove_column :comments, :commentable_id
remove_column :comments, :user_id
remove_index :comments, :commentable_type
end
def self.down
remove_column :comments, :ip
remove_column :comments, :rate
remove_column :comments, :email
remove_column :comments, :user_name
remove_column :comments, :description
remove_column :comments, :page_id
>>>>>>> active_admin and db fixes
end
def self.down
remove_column :comments, :ip
remove_column :comments, :rate
remove_column :comments, :email
remove_column :comments, :user_name
remove_column :comments, :description
remove_column :comments, :page_id
add_column :comments, :title, :string
add_column :comments, :comment, :text
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment