ragtime.jdbc

Functions for loading SQL migrations and applying them to a SQL database.

load-directory

(load-directory path)
Load a collection of Ragtime migrations from a directory.

load-files

multimethod

Given an collection of files with the same extension, return a ordered
collection of migrations. Dispatches on extension (e.g. ".edn"). Extend
this multimethod to support new formats for specifying SQL migrations.

load-resources

(load-resources path)
Load a collection of Ragtime migrations from a classpath prefix.

sql-database

(sql-database db-spec)(sql-database db-spec options)
Given a db-spec and a map of options, return a Migratable database.
The following options are allowed:

:migrations-table - the name of the table to store the applied migrations
                    (defaults to ragtime_migrations)

sql-migration

(sql-migration migration-map)
Create a Ragtime migration from a map with a unique :id, and :up and :down
keys that map to ordered collection of SQL strings.