Sha256: fc83c2eb150f6e1602dc3a4c5f8fdc31d7b8e09150546ed94d580f7331a2ab63
Contents?: true
Size: 680 Bytes
Versions: 7
Compression:
Stored size: 680 Bytes
Contents
# This migration comes from tb_cms (originally 20121119030136) class ChangeLiquidTagsToPolymorphic < ActiveRecord::Migration def up rename_column :spud_page_liquid_tags, :spud_page_partial_id, :attachment_id add_column :spud_page_liquid_tags, :attachment_type, :string add_index :spud_page_liquid_tags, [:attachment_type,:attachment_id] if defined?(SpudPageLiquidTag) SpudPageLiquidTag.all.each do |f| f.update_attributes(:attachment_type => "SpudPagePartial") end end end def down rename_column :spud_page_liquid_tags, :attachment_id, :spud_page_partial_id remove_column :spud_page_liquid_tags, :attachment_type end end
Version data entries
7 entries across 7 versions & 1 rubygems