Skip to content

Commit

Permalink
added database scheme to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
FlyingBird95 committed Jun 11, 2018
1 parent 57e9c2b commit 2eb3018
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
Binary file added docs/img/database_scheme.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions docs/migration.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Migration
=========

Migrating from 1.X.X to 2.0.0
-----------------------------
Version 2.0.0 offers a lot more functionality, including Request- and Endpoint-profiling.

There are two migrations that you have to do, before you can use version 2.0.0.

1. **Migrate the database:** Since version 2.0.0 has a different database scheme, the
Flask-MonitoringDashboard cannot automatically migrate to this version.

We have created a script for you that can achieve this. It migrates the data in the existing
database into a new database, without removing the existing database.

If you want to run this script, you need to be aware of the following:

- If you already have version 1.X.X of the Flask-MonitoringDashboard installed, first update to
2.0.0 before running this script. You can update a package by:

.. code-block:: bash
pip install flask_monitoringdashboard --upgrade
- set **OLD_DB_URL** on line 16, such that it points to your existing database.

- set **NEW_DB_URL** on line 17, to a new database name version. Note that they can't be the same.

- Once you have migrated your database, you have to update the database location in your configuration-file.

- You can find `the migration script here`_.

.. _`the migration script here`: https://github.com/flask-dashboard/Flask-MonitoringDashboard/tree/master/flask_monitoringdashboard/migrate_v1_to_v2.py

2. **Migrate the configuration file**: You also have to update the configuration file completely, since we've
re factored this to make it more clear. The main difference is that several properties have been re factored
to a new header-name.

For an example of a new configuration file, see `this configuration file`_.

.. _`this configuration file`: https://github.com/flask-dashboard/Flask-MonitoringDashboard/tree/master/config.cfg

0 comments on commit 2eb3018

Please sign in to comment.