Update doc for adding database migrations

Since Ib286cfdc6df19506e33194337ce8acb58991a139 we doesn't support
downgrades. Update doc for adding database migrations.

Change-Id: I89448eb41d5df3fc3980ea788c50037d12f925d2
This commit is contained in:
Vitaly Gridnev 2015-04-06 12:05:23 +03:00
parent 70b92f0625
commit f7fdde9dfc

View File

@ -56,7 +56,7 @@ $ mv 507eb70202af_my_new_revision.py 007_my_new_revision.py
Add Alembic Operations to the Script Add Alembic Operations to the Script
++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++
The migration script contains two methods, ``upgrade()`` and ``downgrade()``. Fill in these methods with the appropriate Alembic operations to perform upgrades or downgrades. In the above example, an upgrade will move from revision '006' to revision '007' and a downgrade will move from revision '007' to revision '006'. The migration script contains method ``upgrade()``. Since Kilo release Sahara doesn't support downgrades. Fill in this method with the appropriate Alembic operations to perform upgrades. In the above example, an upgrade will move from revision '006' to revision '007'.
Command Summary for sahara-db-manage Command Summary for sahara-db-manage
++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++
@ -81,10 +81,6 @@ Upgrade the database incrementally::
$ sahara-db-manage --config-file /path/to/sahara.conf upgrade --delta <# of revs> $ sahara-db-manage --config-file /path/to/sahara.conf upgrade --delta <# of revs>
Downgrade the database by a certain number of revisions::
$ sahara-db-manage --config-file /path/to/sahara.conf downgrade --delta <# of revs>
Create new revision:: Create new revision::
$ sahara-db-manage --config-file /path/to/sahara.conf revision -m "description of revision" --autogenerate $ sahara-db-manage --config-file /path/to/sahara.conf revision -m "description of revision" --autogenerate