summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/build/changelog/changelog_14.rst3
-rw-r--r--doc/build/changelog/migration_14.rst23
2 files changed, 26 insertions, 0 deletions
diff --git a/doc/build/changelog/changelog_14.rst b/doc/build/changelog/changelog_14.rst
index 3a1c5cdbd..053f677d5 100644
--- a/doc/build/changelog/changelog_14.rst
+++ b/doc/build/changelog/changelog_14.rst
@@ -1694,6 +1694,9 @@ This document details individual issue-level changes made throughout
constraints present schema-management maintenance complexities that should
be opted in to, rather than being turned on by default.
+ .. seealso::
+
+ :ref:`change_5367`
.. change::
:tags: feature, sql
diff --git a/doc/build/changelog/migration_14.rst b/doc/build/changelog/migration_14.rst
index 5eac87964..41c91050c 100644
--- a/doc/build/changelog/migration_14.rst
+++ b/doc/build/changelog/migration_14.rst
@@ -1732,7 +1732,30 @@ on :func:`_sa.create_engine`.
The error message is described in the errors page at :ref:`error_8s2a`.
+.. _change_5367:
+Enum and Boolean datatypes no longer default to "create constraint"
+-------------------------------------------------------------------
+
+The :paramref:`.Enum.create_constraint` and
+:paramref:`.Boolean.create_constraint` parameters now default to False,
+indicating when a so-called "non-native" version of these two datatypes is
+created, a CHECK constraint will **not** be generated by default. These
+CHECK constraints present schema-management maintenance complexities that
+should be opted in to, rather than being turned on by default.
+
+
+To ensure that a CREATE CONSTRAINT is emitted for these types, set these
+flags to ``True``::
+
+ class Spam(Base):
+ __tablename__ = "spam"
+ id = Column(Integer, primary_key=True)
+ boolean = Column(Boolean(create_constraint=True))
+ enum = Column(Enum("a", "b", "c", create_constraint=True))
+
+
+:ticket:`5367`
New Features - ORM
==================