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-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)
:migrations-table-exists-sql - SQL string to check if migrations table
exists. If not supplied, database metadata is
used instead, which can be slow for large DBs.
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.