diaspora/db/migrate/20130608171134_add_open_graph_cache.rb
2017-08-12 15:39:26 +02:00

19 lines
414 B
Ruby

class AddOpenGraphCache < ActiveRecord::Migration[4.2]
def up
create_table :open_graph_caches do |t|
t.string :title
t.string :ob_type
t.string :image
t.string :url
t.text :description
end
change_table :posts do |t|
t.integer :open_graph_cache_id
end
end
def down
remove_column :posts, :open_graph_cache_id
drop_table :open_graph_caches
end
end