baleen / migrations
Generic, implementation-agnostic migration library.
Requires
- php: >= 5.5
- league/tactician: ^0.6.0
- zendframework/zend-code: ^2.4
- zendframework/zend-stdlib: ^2.4|^3.0
Requires (Dev)
- mockery/mockery: ^0.9.4
- phploc/phploc: ^2.1
- phpmd/phpmd: ^2.2
- phpunit/phpunit: ~4.4|^5.0
- sebastian/phpcpd: ^2.0
- squizlabs/php_codesniffer: 2.*
Suggests
- baleen/storage-flysystem: For storing migrations using Flysystem.
- sphpdox/sphpdox: [DEV ONLY] To convert PHPDoc to Sphinx/ReStructured docs.
This package is not auto-updated.
Last update: 2022-05-02 15:20:06 UTC
README
NB!: This project is still an early release. Please do not use in production-critical environments. Refer to the LICENSE for more information.
Introduction
Baleen Migrations is a project that seeks to abstract the domain logic of performing migrations of any kind into a single package. Its simple goal is to excel at one single task: provide an intuitive, well-tested framework to migrate from point A to point B (or vice-versa if going down).
In other words, we take care of WHICH migrations are run and in what ORDER. Everything else is left up to the implementation:
- WHAT is going to be migrated? It could be a database, images, documents, etc.
- HOW its going to be migrated? You can wrap each migration into DB transactions. Or not, its up to you.
- What to do when a migration fails? We'll let you know WHEN it happens, but its up to you to the implementation to decide what to do (e.g. cancel the transaction).
Baleen CLI: Our Command-Line Tool
Are you looking for a framework-agnostic migration tool that can be used right out of the box? Then you're almost at the right place: go visit baleen/cli and get started immediately after requiring it into your project.
Once you're there you'll see that its much more than just a migrations tool: its also a migrations framework that you can use to build a customized migration experience for your projects and their unique use-cases.
If you're interested in creating another tool around the core domain then you're invited to read on.
Installation (Composer)
Installation with Composer is simple:
composer require baleen/migrations
Documentation
For more documentation please refer to the online documentation.
Contributing
See CONTRIBUTING.md
Roadmap
- We're still working on making some changes to this core domain. See branch
ddd-changes
for the latest progress. Code reviews / constructive critiques are more than welcome, and so are of course PRs! - Once we're happy with the core API we'll release
v1.0
. - With a stable core we'll shift our focus to
baleen/cli
and its future specializations (i.e. Doctrine Migrations, etc).
LICENSE
MIT - for more details please refer to LICENSE at the root directory.
About the name
We named the project ("BALEEN") after a family (or "parvorders" to be precise) of whales that are famous for migrating long distances. The humpback whale, for example, travels as far as 16,000 miles (25749.5 km) annually. That's about twice the earth's diameter.