Merge "Move DB migrations documentation to its own file"
This commit is contained in:
@@ -117,21 +117,6 @@ If any of the following applies to the patch, a release note is required:
|
|||||||
A release note is suggested if a long-standing or important bug is fixed.
|
A release note is suggested if a long-standing or important bug is fixed.
|
||||||
Otherwise, a release note is not required.
|
Otherwise, a release note is not required.
|
||||||
|
|
||||||
Database Migrations
|
|
||||||
-------------------
|
|
||||||
|
|
||||||
Monasca uses `Alembic <http://alembic.zzzcomputing.com/en/latest/>`_
|
|
||||||
migrations to set up its configuration database. If you need to change the
|
|
||||||
configuration database's schema, you need to create a migration to adjust the
|
|
||||||
database accordingly, as follows::
|
|
||||||
|
|
||||||
cd monasca_api/db/
|
|
||||||
alembic revision
|
|
||||||
|
|
||||||
This will create a new skeleton revision for you to edit. You will find
|
|
||||||
existing revisions to use for inspiration in the
|
|
||||||
``/monasca_api/db/alembic/versions/`` directory.
|
|
||||||
|
|
||||||
Task Tracking
|
Task Tracking
|
||||||
~~~~~~~~~~~~~
|
~~~~~~~~~~~~~
|
||||||
.. This section is about where you track tasks- launchpad? storyboard? is there
|
.. This section is about where you track tasks- launchpad? storyboard? is there
|
||||||
|
17
doc/source/contributor/db_migrations.rst
Normal file
17
doc/source/contributor/db_migrations.rst
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
Database Migrations
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
Monasca uses `Alembic <http://alembic.zzzcomputing.com/en/latest/>`_
|
||||||
|
migrations to set up its configuration database. If you need to change the
|
||||||
|
configuration database's schema, you need to create a migration to adjust the
|
||||||
|
database accordingly, as follows::
|
||||||
|
|
||||||
|
cd monasca_api/db/
|
||||||
|
alembic revision
|
||||||
|
|
||||||
|
This will create a new skeleton revision for you to edit. You will find
|
||||||
|
existing revisions to use for inspiration in the
|
||||||
|
``/monasca_api/db/alembic/versions/`` directory.
|
||||||
|
|
||||||
|
Measurement data stored in a Time Series database (such as InfluxDB) would
|
||||||
|
be migrated to a new version using standard practice for a given TSDB.
|
@@ -6,4 +6,5 @@ Contribution documentation
|
|||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
contributing.rst
|
contributing.rst
|
||||||
|
db_migrations.rst
|
||||||
code.rst
|
code.rst
|
||||||
|
Reference in New Issue
Block a user