Sha256: 79f38694c1528c0bca47a82cfd4416d0b8b70379633c94183331b3fae9f74115
Contents?: true
Size: 796 Bytes
Versions: 14
Compression:
Stored size: 796 Bytes
Contents
class DropSpudPageLiquidTags < ActiveRecord::Migration class SpudPageLiquidTag < ActiveRecord::Base end def up if defined?(SpudLiquidTag) SpudPageLiquidTag.all.each do |tag| SpudLiquidTag.create({ :attachment_id => tag.attachment_id, :attachment_type => tag.attachment_type, :tag_name => tag.tag_name, :value => tag.value }) end end drop_table :spud_page_liquid_tags end def down create_table :spud_page_liquid_tags do |t| t.integer :attachment_id t.string :attachment_type t.string :tag_name t.string :value t.timestamps end add_index :spud_page_liquid_tags, [:tag_name,:value] add_index :spud_page_liquid_tags, [:attachment_type,:attachment_id] end end
Version data entries
14 entries across 14 versions & 1 rubygems