Skip to content

Instantly share code, notes, and snippets.

@clutchski
Created November 14, 2009 18:17
Show Gist options
  • Save clutchski/234675 to your computer and use it in GitHub Desktop.
Save clutchski/234675 to your computer and use it in GitHub Desktop.
"""
an example illustrating how to run a caribou migration
"""
import caribou
db_path = '/path/to/db.sqlite3'
migrations_path = '/path/to/migrations/dir'
version = '20091114132332'
# upgrade to most recent version
caribou.upgrade(db_path, migrations_path)
# upgrade to a specific version
caribou.upgrade(db_path, migrations_path, version)
# downgrade to a specific version
caribou.downgrade(db_path, migrations_path, version)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment