A Clojure migration library inspired by Rails migrations, managing database schema changes through versioned up/down functions.
Drift is a database migration library for Clojure, inspired by Rails migrations. It manages schema changes by organizing migration files in a directory, tracking which ones have been run, and executing `up` or `down` functions to apply or rollback changes. It solves the problem of versioning and synchronizing database schemas across development, testing, and production environments.
Clojure developers building applications that require structured database schema evolution, particularly those familiar with Rails-style migrations or working in teams needing consistent schema management.
Developers choose Drift for its straightforward, Rails-like workflow tailored to Clojure, its minimal setup, and its flexibility to work with any database library via custom up/down functions. It integrates seamlessly with Leiningen and supports Java interoperability.
A migration library for clojure
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Adopts a familiar directory-based migration pattern from Rails, making it intuitive for developers experienced with that workflow and reducing setup complexity.
Provides built-in `lein migrate` and `lein create-migration` commands, automating detection and application of pending migrations directly from the CLI.
Supports customization via migrate-config.clj with initialization hooks and namespace content, allowing tailored setup for different environments or databases.
Can be instantiated and called directly from Java applications, making it suitable for mixed-language projects or legacy systems.
Requires custom `current-version` and `update-version` functions to be implemented by the user, adding boilerplate and potential for errors in schema management.
Lacks advanced tools like transactional rollback on failure or data migration helpers, forcing developers to handle complex scenarios manually in up/down functions.
The README provides basic examples but lacks guidance on edge cases, best practices, or integration with modern Clojure libraries, which can hinder adoption.