2.1. GlossaryΒΆ

Baleen Migrations has been carefully engineered with the goal of satisfying as many types migration as possible. Whether its a database migration, image transformations or even source code, this module aims to help in the process of pragmatically transform virtually anything from one state to the other, taking it through a series of pre-defined steps (migrations).

The purpose of this document is to standardise the use of certain terms throughout the context of this project, as well as to provide information about the different models that make up the “migrations” domain.


Refers to a group of objects related to each other that work towards a single purpose: migrating a Target Resource from point A to point B. In this project, some of those objects are (in no particular order):

A single application can have any number of Migration Ecosystems, but its most common to find only one or two per project.

(noun) A migration is a class that can execute an incremental (when migrating / “going up”) or decremental (when reverting / “going down”) transformation on a target resource. All classes that implement MigrationInterface are considered a migration.
(verb) Verb used to refer to the process of running one or more migrations.
(adj.) If something is “migrated” then it means that the migration’s up() method has executed successfully and the corresponding version is (or will immediately be) stored in the Storage. The opposite is true if something has NOT been migrated.
Target Resource
During a migrationm the target resource or migration target is WHAT’s being migrated. It can be a database, an image, other files, etc. There should only be one target resource for any given Migration Ecosystem.
The VersionRepository is an object that knows where to find migrations. It must use a factory to instantiate each migration.
The Storage object is used to persist information about which Versions have already been migrated.
The Timeline is an object that is in charge of executing migrations in bulk using certain pre-defined algorithms. It holds an immutable Delta Collection.
A Delta is a lightweight entity that is persisted into the Storage and holds state information about a Migration. Currently the only state information being saved is whether the Delta is migrated or not. If a Delta is present in the Storage then it means that Delta has already been migrated.
Delta Collection
A special object to represent and sort a set of Collection. Its important to note that it behaves as an ordered set of elements.