diaspora/db/migrate/20160802212635_cleanup_posts_table.rb

26 lines
1.1 KiB
Ruby

class CleanupPostsTable < ActiveRecord::Migration
def change
remove_index :posts, column: %i(status_message_guid pending),
name: :index_posts_on_status_message_guid_and_pending, length: {status_message_guid: 190}
remove_index :posts, column: :status_message_guid, name: :index_posts_on_status_message_guid, length: 191
# from photos?
remove_column :posts, :remote_photo_path, :text
remove_column :posts, :remote_photo_name, :string
remove_column :posts, :random_string, :string
remove_column :posts, :processed_image, :string
remove_column :posts, :unprocessed_image, :string
remove_column :posts, :status_message_guid, :string
# old cubbi.es stuff
remove_column :posts, :object_url, :string
remove_column :posts, :image_url, :string
remove_column :posts, :image_height, :integer
remove_column :posts, :image_width, :integer
remove_column :posts, :actor_url, :string
remove_column :posts, :objectId, :string
# old single post view templates
remove_column :posts, :frame_name, :string
end
end