Awesome Open Source
Awesome Open Source

Ragtime

Build Status

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.

Installation

Add the following dependency to your deps.edn file:

dev.weavejester/ragtime {:mvn/version "0.9.2"}

Or to your Leiningen project file:

[dev.weavejester/ragtime "0.9.2"]

Overview

Ragtime needs three pieces of data to work:

  1. A migratable data store
  2. An ordered sequence of migrations
  3. A strategy on how to deal with conflicts

A data store is an implementation of the DataStore protocol, and tells Ragtime how to record which migrations are applied to an arbitrary store of data, such as a database.

Since 0.5.0, migrations are implementations of the Migration protocol, which has three methods:

  • id - returns a unique ID for the migration
  • run-up! - applies the migration to a database
  • run-down! - 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.

Documentation

License

Copyright © 2022 James Reeves

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version



Alternative Project Comparisons
Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Database (92,876
Sql (22,363
Clojure (19,293
Migration (9,903
Jdbc (3,506
Clojure Library (658