https://github.com/alfasoftware/morf
Morf is a library for evolutionary database mechanics
https://github.com/alfasoftware/morf
Last synced: about 2 months ago
JSON representation
Morf is a library for evolutionary database mechanics
- Host: GitHub
- URL: https://github.com/alfasoftware/morf
- Owner: alfasoftware
- License: apache-2.0
- Created: 2017-05-17T14:12:00.000Z (almost 9 years ago)
- Default Branch: main
- Last Pushed: 2025-11-18T22:05:19.000Z (4 months ago)
- Last Synced: 2025-11-18T22:05:51.376Z (4 months ago)
- Language: Java
- Size: 5.31 MB
- Stars: 40
- Watchers: 21
- Forks: 27
- Open Issues: 38
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-java - Morf
README
# 
[](https://opensource.org/licenses/Apache-2.0)
[](https://app.travis-ci.com/alfasoftware/morf)
[](https://sonarcloud.io/project/overview?id=org.alfasoftware:morf-parent)
[](https://github.com/alfasoftware/morf/releases)
Morf is a library for cross-platform evolutionary relational database mechanics, database access and database imaging/cloning. It has been developed over many years at Alfa and is used to manage all of our RDBMS-backed applications.
## Status
Morf is proven technology and has been used in mission-critical production applications for many years as part of our flagship product. **However**, as an open source project, it is in an early **pre-alpha** state, as we go through the process of disentangling it from parts of the rest of our stack, tidying up the code for long-term support, and making it easier and more convenient to use in other projects. Until then, consider the API unstable.
We are maintaining Morf in the open, because we believe this is the right thing to do. Please [get involved](https://github.com/alfasoftware/morf/wiki/Contributing) if you would like to help steer the project.
See the [Roadmap](https://github.com/alfasoftware/morf/wiki/Roadmap) for more information.
## Getting Started
Documentation is somewhat sparse, not least because the APIs are not quite _ready_ to document. One of the first items on the [roadmap](https://github.com/alfasoftware/morf/wiki/Roadmap) is to agree our new user "hello world" user stories, write them up and make sure the necessary APIs are in place to support them.
As we work on those, we will be expanding the [Start here](https://github.com/alfasoftware/morf/wiki/Start-Here) part of the Wiki.
## Key features
### Pure Java API
- No XML/JSON/YAML etc
- Clean and easy to integrate with existing applications
### Evolutionary Database Design
- Implements bidirectional run-time verification of upgrades against a known target schema.
- Bootstraps empty databases with no additional coding
- Manages complex data migration and fixing alongside schema changes
- Targets multiple database platforms without platform-specific scripting and without sacrificing low level control
- Cleanly integrates disordered branches
- Exports SQL upgrade scripts in any SQL dialect for DBA use
### Extensible
- Easy to add new database platform support
### Cross-platform Snapshots and Cloning
- Clone or dump a full database, including schema and data
- Create a dump of a MySQL database as XML, restore to Oracle
- Copy a live PostgreSQL database directly into in-memory H2
- Run a JUnit test over an in-memory H2 database using a snapshot from a live Oracle environment
- Automatically run missing upgrades after restoring from a snapshot
### Database Access API
- Database access at run-time using the same DSL used in upgrades
## Contributing
If you're interested in contributing to the project, please read the [contribution guide](https://github.com/alfasoftware/morf/wiki/Contributing).