Browse Source

Refactors the migration documentation a bit

Adrien Panay 7 years ago
parent
commit
60df665265
1 changed files with 15 additions and 11 deletions
  1. 15 11
      doc/migration.md

+ 15 - 11
doc/migration.md View File

2
 
2
 
3
 ## Introduction ##
3
 ## Introduction ##
4
 
4
 
5
-Migrations on `Tracim` lays on [`gearbox migrate`](http://turbogears.readthedocs.io/en/tg2.3.7/turbogears/migrations.html), which in turn lays on [`alembic`](http://alembic.zzzcomputing.com/en/latest/index.html) which is the migration tool dedicated to `SQLAlchemy`.
5
+This document is intended to developers.
6
 
6
 
7
-## Quick summup ##
7
+Migrations on `Tracim` lays on [`gearbox migrate`](http://turbogears.readthedocs.io/en/tg2.3.7/turbogears/migrations.html), which in turn lays on [`alembic`](http://alembic.zzzcomputing.com/en/latest/index.html) which is the migration tool dedicated to `SQLAlchemy`.
8
 
8
 
9
-In order to use the `gearbox migrate [...]` commands, change your current directory to be `tracim/` from the root of the project :
9
+In order to use the `gearbox migrate [...]` commands, change your current directory to be `tracim/` from the root of the project, also usually named `tracim/` :
10
 
10
 
11
     (tg2env) user@host:~/tracim$ cd tracim/
11
     (tg2env) user@host:~/tracim$ cd tracim/
12
     (tg2env) user@host:~/tracim/tracim$
12
     (tg2env) user@host:~/tracim/tracim$
13
 
13
 
14
+## Migration howto - Overview ##
15
+
16
+### Upgrading schema ###
17
+
18
+    gearbox migrate upgrade
19
+
20
+### Downgrading schema ###
21
+
22
+    gearbox migrate downgrade
23
+
24
+## Migration howto - Advanced (for developers) ##
25
+
14
 ### Retrieving schema current version ###
26
 ### Retrieving schema current version ###
15
 
27
 
16
     gearbox migrate db_version
28
     gearbox migrate db_version
20
 This creates a new python migration file in `tracim/migration/versions/` ending by `migration_label.py`:
32
 This creates a new python migration file in `tracim/migration/versions/` ending by `migration_label.py`:
21
 
33
 
22
     gearbox migrate create 'migration label'
34
     gearbox migrate create 'migration label'
23
-
24
-### Upgrading schema ###
25
-
26
-    gearbox migrate upgrade
27
-
28
-### Downgrading schema ###
29
-
30
-    gearbox migrate downgrade