Merge lp:~raj-abhilash1/mailman/docs into lp:mailman

Proposed by Abhilash Raj
Status: Merged
Merged at revision: 7326
Proposed branch: lp:~raj-abhilash1/mailman/docs
Merge into: lp:mailman
Diff against target: 18 lines (+8/-0)
1 file modified
src/mailman/docs/DATABASE.rst (+8/-0)
To merge this branch: bzr merge lp:~raj-abhilash1/mailman/docs
Reviewer Review Type Date Requested Status
Mailman Coders Pending
Review via email:

Description of the change

Alembic uses the datatype from mailman.database.types for migrations, which is not desired as they
require the field in database to be different( int for Enum() and depending on dailect different for UUID())

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/mailman/docs/DATABASE.rst'
2--- src/mailman/docs/DATABASE.rst 2015-01-26 21:30:47 +0000
3+++ src/mailman/docs/DATABASE.rst 2015-01-29 22:23:25 +0000
4@@ -85,6 +85,14 @@
5 as soon as a new migration is added in the sources, it will be automatically
6 reflected in the schema on first-run post-update.
8+'''Note:''' When autogenerating migrations using alembic, be sure to check the
9+created migration before adding it to the version control. For some of the
10+special datatypes defined in ``mailman.database.types``, you will have to
11+manually change the datatype. For example, ``mailman.database.types.Enum()``
12+needs to be changed to ``sa.Integer()`` ,as Enum type stores just the integer in
13+the database. A more complex migration would be needed for ``UUID`` depending
14+upon the database layer to be used.
17 .. _SQLAlchemy:
18 .. _SQLite3: