Sha256: 108275c7b5337cabc49e94b4addcb2989b8ecc178ffe3d588a55db793cc1bf4b
Contents?: true
Size: 545 Bytes
Versions: 3
Compression:
Stored size: 545 Bytes
Contents
class BlogAddAttachmentsToArticleMigration < Migration def self.up(site) site.articles.modify do |articles| add_field :attachment, :attachment remove_field :blog end site.blogs.modify do |articles| remove_field :blog end end def self.down(site) site.pages.create_model :articles do |articles| add_field :blog, :alias, of: :parent remove_field :attachment end site.blogs.create_model :articles do |articles| add_field :blog, :alias, of: :parent end end end
Version data entries
3 entries across 3 versions & 1 rubygems