Skip to content
Martin Trojer edited this page Aug 27, 2015 · 5 revisions

How does Joplin find the migrators?

Please note that this does not apply to :sql database type, which uses 'local folder' only.

Joplin tries quite hard to locate the folder with migration files. It goes through a three step process;

1. Local folder

Migrations should be defined as a relative path, thus the first attempt to to look for a folder with that name.

This caters for the joplin.lein usecase when migrations are stored in joplin or src folder in the same project.

2. Directories on the classpath

Second attempt is to scan over the directories on the classpath with a matching folder to the defined migrator.

This caters for the use-case when the migrators are defined in a separate project that are placed in checkouts folder recognized by leiningen.

3. Resources inside jar files on the classpath

Third attempt is to look into the jar files on the classpath for matching resource folder names.

This caters for the use-case when the migrators are defined in separate project and imported as a dependency.

How does Joplin find the seeds?

Seeds are basic clojure functions and must appear on the classpath. Joplin does not do any extra work to find them.

## How do I make joplin quiet (remove all the println)?

Wrap all calls to joplin with with-out-str, for example

(with-out-str
  (repl/migrate conf .. ..))

Joplin, as in Janis Joplin?

Nope, this library is named after Scott Joplin, arguably the most famous ragtime artist and composer of "Maple Leaf Rag".