Abhilash Raj has proposed merging lp:~raj-abhilash1/mailman/docs into lp:mailman.
Requested reviews: Mailman Coders (mailman-coders) For more details, see: https://code.launchpad.net/~raj-abhilash1/mailman/docs/+merge/248059 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()) -- Your team Mailman Coders is requested to review the proposed merge of lp:~raj-abhilash1/mailman/docs into lp:mailman.
=== 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 @@ as soon as a new migration is added in the sources, it will be automatically reflected in the schema on first-run post-update. +'''Note:''' When autogenerating migrations using alembic, be sure to check the +created migration before adding it to the version control. For some of the +special datatypes defined in ``mailman.database.types``, you will have to +manually change the datatype. For example, ``mailman.database.types.Enum()`` +needs to be changed to ``sa.Integer()`` ,as Enum type stores just the integer in +the database. A more complex migration would be needed for ``UUID`` depending +upon the database layer to be used. + .. _SQLAlchemy: http://www.sqlalchemy.org/ .. _SQLite3: http://docs.python.org/library/sqlite3.html
_______________________________________________ Mailman-coders mailing list Mailman-coders@python.org https://mail.python.org/mailman/listinfo/mailman-coders