From acde6909be1b0f4e89b5d951f2070ef2f4f215d4 Mon Sep 17 00:00:00 2001 From: Dolph Mathews Date: Tue, 10 Sep 2013 14:50:58 -0500 Subject: [PATCH] fix rst syntax in database schema migrations docs Change-Id: Idde4cf9b472663da63b1cf16bcec83a3100fab5e --- doc/source/developing.rst | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/doc/source/developing.rst b/doc/source/developing.rst index ec0268cad2..c9ff4ca7f4 100644 --- a/doc/source/developing.rst +++ b/doc/source/developing.rst @@ -73,32 +73,35 @@ place:: Database Schema Migrations -------------------------- -Keystone uses SQLAlchemy-migrate -_`SQLAlchemy-migrate`:http://code.google.com/p/sqlalchemy-migrate/ to migrate the SQL database -between revisions. For core components, the migrations are kept in a central -repository under keystone/common/sql/migrate_repo. +Keystone uses SQLAlchemy-migrate_ to migrate +the SQL database between revisions. For core components, the migrations are +kept in a central repository under ``keystone/common/sql/migrate_repo``. -Extensions should be created as directories under `keystone/contrib`. An -extension that requires sql migrations should not change the common repository, -but should instead have its own repository. This repository must be in the -extension's directory in `keystone/contrib//migrate_repo.` In -addition it needs a subdirectory named `versions`. For example, if the -extension name is `my_extension` then the directory structure would be -`keystone/contrib/my_extension/migrate_repo/versions/`. For the migration -o work, both the migrate_repo and versions subdirectories must have empty -__init__.py files. SQLAlchemy-migrate will look for a configuration file in -the migrate_repo named migrate.cfg. This conforms to a Key/value ini file -format. A sample config file with the minimal set of values is:: +.. _SQLAlchemy-migrate: http://code.google.com/p/sqlalchemy-migrate/ + +Extensions should be created as directories under ``keystone/contrib``. An +extension that requires SQL migrations should not change the common repository, +but should instead have its own repository. This repository must be in the +extension's directory in ``keystone/contrib//migrate_repo``. In +addition, it needs a subdirectory named ``versions``. For example, if the +extension name is ``my_extension`` then the directory structure would be +``keystone/contrib/my_extension/migrate_repo/versions/``. For the migration to +work, both the ``migrate_repo`` and ``versions`` subdirectories must have +``__init__.py`` files. SQLAlchemy-migrate will look for a configuration file in +the ``migrate_repo`` named ``migrate.cfg``. This conforms to a key/value `ini` +file format. A sample configuration file with the minimal set of values is:: [db_settings] repository_id=my_extension version_table=migrate_version required_dbs=[] -The directory `keystone/contrib/example` contains a sample extension migration. +The directory ``keystone/contrib/example`` contains a sample extension +migration. -Migrations for extension must be explicitly run. To run a migration for a specific -extension, run `keystone-manage --extension db_sync`. +Migrations must be explicitly run for each extension individually. To run a +migration for a specific extension, run ``keystone-manage --extension +db_sync``. Initial Sample Data -------------------