From 3f7b8401b816aa9c6ff68e2a4b004867b8d19ae4 Mon Sep 17 00:00:00 2001 From: Abhilash Raj Date: Fri, 30 Jan 2015 03:48:35 +0530 Subject: add more docs for autogenerating migrations using alembic --- src/mailman/docs/DATABASE.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mailman/docs/DATABASE.rst b/src/mailman/docs/DATABASE.rst index a64c371f7..f6ef45f44 100644 --- a/src/mailman/docs/DATABASE.rst +++ b/src/mailman/docs/DATABASE.rst @@ -85,6 +85,14 @@ People upgrading Mailman from previous versions need not do anything manually, 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 -- cgit v1.2.3-70-g09d2