comparison Sphinx/source/developers/db-versioning.rst @ 0:901e8961f46e

initial commit
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 22 Apr 2016 12:57:38 +0200
parents
children cd6c91d3cef5
comparison
equal deleted inserted replaced
-1:000000000000 0:901e8961f46e
1 .. _db-versioning:
2
3 Database versioning
4 ===================
5
6 Orthanc stores the index of the DICOM instances as an embedded `SQLite
7 database <http://www.sqlite.org/>`_. The schema of this database has
8 evolved across the versions of Orthanc, making the database
9 incompatible between versions. This page clarifies which versions of
10 Orthanc are compatible with other versions.
11
12 Recent versions (post-0.3.1)
13 ----------------------------
14
15 Recent versions of Orthanc (starting 0.3.1, inclusive) include
16 information about the version of the DB schema in the SQLite table
17 ``GlobalProperties`` under the property with index 1. Versions with the
18 same version of the DB schema are compatible with each other.
19
20 When some version of Orthanc starts up, it checks whether it is
21 compatible with the database version. Orthanc will **fail to start if
22 it is not compatible with the database version**. Here is the
23 compatibility matrix:
24
25 =============================== ===== ===== ===== ===== =====
26 Version DB v2 DB v3 DB v4 DB v5 DB v6
27 =============================== ===== ===== ===== ===== =====
28 Mainline u u u x
29 Orthanc 0.9.5 - Orthanc 1.0.0 u u u x
30 Orthanc 0.8.5 - Orthanc 0.9.4 u u x
31 Orthanc 0.7.3 - Orthanc 0.8.4 u x
32 Orthanc 0.4.0 - Orthanc 0.7.2 x
33 Orthanc 0.3.1 x
34 =============================== ===== ===== ===== ===== =====
35
36 *Note 1:* "u" means that an automatic upgrade of the DB schema is
37 available, without having to :ref:`migrate the database
38 <replication>`.
39
40 *Note 2:* Starting with Orthanc 0.9.5, the option ``--upgrade`` must be provided
41 on the command-line to allow Orthanc to upgrade the database schema.
42
43
44 Early versions (pre-0.3.0)
45 --------------------------
46
47 Early versions of Orthanc (up to version 0.3.0, inclusive) **do not
48 check the version** of the database schema. Because of this, these
49 early versions are incompatible with all the other versions. Pay
50 attention to the fact that no compatibility check is done in these
51 versions, which may result in a corrupted database.