summaryrefslogtreecommitdiff
path: root/docs/build/tutorial.rst
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-04-17 10:21:16 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2012-04-17 10:21:16 -0400
commitbc0d54368ae5ac5ba720e749dc09b24fb3beb47d (patch)
treeabe13566e2240dd7432a551086601e085cc2a46c /docs/build/tutorial.rst
parent0cd6a6881ad131804df62efdb7dabd6109aa27a0 (diff)
downloadalembic-bc0d54368ae5ac5ba720e749dc09b24fb3beb47d.tar.gz
add a note specifically about Enum
Diffstat (limited to 'docs/build/tutorial.rst')
-rw-r--r--docs/build/tutorial.rst11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/build/tutorial.rst b/docs/build/tutorial.rst
index 8e47f1b..019697a 100644
--- a/docs/build/tutorial.rst
+++ b/docs/build/tutorial.rst
@@ -522,6 +522,17 @@ Autogenerate can *not* detect:
tables, and should be hand-edited into a name change instead.
* Changes of column name. Like table name changes, these are detected as
a column add/drop pair, which is not at all the same as a name change.
+* Special SQLAlchemy types such as :class:`~sqlalchemy.types.Enum` when generated
+ on a backend which doesn't support ENUM directly - this because the
+ representation of such a type
+ in the non-supporting database, i.e. a CHAR+ CHECK constraint, could be
+ any kind of CHAR+CHECK. For SQLAlchemy to determine that this is actually
+ an ENUM would only be a guess, something that's generally a bad idea.
+ To implement your own "guessing" function here, use the
+ :meth:`sqlalchemy.events.DDLEvents.column_reflect` event
+ to alter the SQLAlchemy type passed for certain columns and possibly
+ :meth:`sqlalchemy.events.DDLEvents.after_parent_attach` to intercept
+ unwanted CHECK constraints.
Autogenerate can't currently, but will *eventually* detect: