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: mp+248059@code.launchpad.net

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
=== modified file 'src/mailman/docs/DATABASE.rst'
--- src/mailman/docs/DATABASE.rst 2015-01-26 21:30:47 +0000
+++ src/mailman/docs/DATABASE.rst 2015-01-29 22:23:25 +0000
@@ -85,6 +85,14 @@
85as soon as a new migration is added in the sources, it will be automatically85as soon as a new migration is added in the sources, it will be automatically
86reflected in the schema on first-run post-update.86reflected in the schema on first-run post-update.
8787
88'''Note:''' When autogenerating migrations using alembic, be sure to check the
89created migration before adding it to the version control. For some of the
90special datatypes defined in ``mailman.database.types``, you will have to
91manually change the datatype. For example, ``mailman.database.types.Enum()``
92needs to be changed to ``sa.Integer()`` ,as Enum type stores just the integer in
93the database. A more complex migration would be needed for ``UUID`` depending
94upon the database layer to be used.
95
8896
89.. _SQLAlchemy: http://www.sqlalchemy.org/97.. _SQLAlchemy: http://www.sqlalchemy.org/
90.. _SQLite3: http://docs.python.org/library/sqlite3.html98.. _SQLite3: http://docs.python.org/library/sqlite3.html