Skip to content

Example of how to set up migrations in Clojure using Korma, Drift, and PostgreSQL.

Notifications You must be signed in to change notification settings

pjlegato/korma-drift-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

korma-drift-template

Example templates for using Drift migrations with Korma and PostgreSQL >= 9.0.

Usage

Copy the file src/config/migrate_config.clj to your project and edit the database connection credentials as appropriate.

When you run the migrations, a table called schema_version will be created in your database, containing a version integer column and a created_at timestamp column. The current schema version of the database is defined as the version given in the row with the most recent created_at timestamp, or 0 if there are no rows in the table.

Place migrations in src/migrations. An empty migration example, 001_base_schema.clj, is provided.

See also https://github.com/macourtney/drift for details on how Drift works.

Pull requests with enhancements are welcome. :)

License

Copyright © 2012 Paul Legato. http://www.paullegato.com/

Distributed under the Eclipse Public License, the same as Clojure.

About

Example of how to set up migrations in Clojure using Korma, Drift, and PostgreSQL.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published