summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorolly <olly@ollycope.com>2015-09-03 10:09:22 +0000
committerolly <olly@ollycope.com>2015-09-03 10:09:22 +0000
commit807cde820d865f4ce58715c902fcd6df3dd68a29 (patch)
tree9d1e0e8b9f09ac713be3328d3fa661cc3b40746a
parentfc509fc43b1579534ea145dd64bc65c9f6ca31f3 (diff)
downloadyoyo-807cde820d865f4ce58715c902fcd6df3dd68a29.tar.gz
Document yoyo.ini options in README
-rwxr-xr-xREADME.rst49
1 files changed, 49 insertions, 0 deletions
diff --git a/README.rst b/README.rst
index 381a83f..fedd836 100755
--- a/README.rst
+++ b/README.rst
@@ -127,6 +127,55 @@ their single argument. For example::
step(do_step)
+Configuration file
+------------------
+
+Yoyo looks for a configuration file named ``yoyo.ini`` in the current working
+directory or any ancestor directory. This can contain the following
+options::
+
+ [DEFAULT]
+
+ # List of migration source directories. "%(here)s" is expanded to the
+ # full path of the directory containing this ini file.
+ sources = %(here)s/migrations %(here)s/lib/module/migrations
+
+ # Target database
+ database = postgresql://scott:tiger@localhost/mydb
+
+ # Verbosity level. Goes from 0 (least verbose) to 3 (most verbose)
+ verbosity = 3
+
+ # Disable interactive features
+ batch_mode = on
+
+ # Editor to use when starting new migrations
+ # "{}" is expanded to the filename of the new migration
+ editor = /usr/local/bin/vim -f {}
+
+ # An arbitrary command to run after a migration has been created
+ # "{}" is expanded to the filename of the new migration
+ post_create_command = hg add {}
+
+
+Config file inheritance may be used to customize configuration per site::
+
+ #
+ # file: yoyo-defaults.ini
+ #
+ [DEFAULT]
+ sources = %(here)s/migrations
+
+
+ #
+ # file: yoyo.ini
+ #
+ [DEFAULT]
+ %inherit %(here)s/yoyo-defaults.ini
+ database = sqlite:///%(here)s/mydb.sqlite
+
+
+
Transactions
------------