Ragtime is a Clojure library for migrating structured data in a way that's database independent. It defines a common interface for expressing migrations, much like Ring defines a common interface for expressing web applications.
Add the following dependency to your project file:
Ragtime needs three pieces of data to work:
- A migratable database connection
- An ordered sequence of migrations
- A strategy on how to deal with conflicts
Migrations are maps that contain three keys:
:id- a unique ID for the migration
:up- a function that applies the migration to a database
:down- a function that rolls back the migration in a database
Ragtime comes with a way of loading SQL migrations from files, and applying them to a SQL database.
Copyright © 2015 James Reeves
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.