Skip to content

Upgrading to Unicorn 3

Kam Figy edited this page Jul 31, 2015 · 5 revisions

Unicorn 3 is a pretty major upgrade from v2. A significant amount of the default configuration has changed with new and different dependencies. The good news is that most of the commonly used configuration remains the same.

Starting out

Because Unicorn 3 uses a new serialization format and filesystem organization, you will need to reserialize ALL items that are stored in Unicorn. Before starting the upgrade, make sure you've got a master copy of the latest serialized items synced into your database and ensure that no other developers are making item changes until you're done upgrading and have committed the new items.

There are also some engine changes that you should be aware of:

  • Unicorn 3 uses Rainbow's SFS trees by default. These trees are rooted on disk at the root item selected in Sitecore, as opposed to the root in Sitecore. For example if you included /sitecore/content/foo, in master, Unicorn 2 would put this in $(serializationRoot)/sitecore/content/foo.item, whereas Unicorn 3 creates a tree for each include so $(serializationRoot)/foo/foo.item (you can change the name of the foo folder by adding a name attribute to your predicate entry).
  • SFS trees are "solid," meaning that you cannot have any tree nodes that do not have a serialized item. This is generally not a problem, but be aware that it means that the predicate only supports path-based includes and excludes. Unicorn 2 supported item ID and template ID-based predication as well.
  • Unicorn 3's default configuration filters out the following fields from being serialized: Last run field on Schedule template, __Originator, __Revision, __Updated, __Updated by. This is generally appropriate for serializing development artifacts but may be undesirable if you're versioning any user content.
Clone this wiki locally