]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
expand paren rules for default rendering, sqlite/mysql
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 12 Mar 2025 20:25:48 +0000 (16:25 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 17 Mar 2025 19:02:30 +0000 (15:02 -0400)
commit1afb820427545e259397b98851a910d7379b2eb8
treedefdd620d1b10c480a02bc0bc6317af70e19ef84
parentbceff0e9e60ee0e4ab3c9268f1234c6b644c36e2
expand paren rules for default rendering, sqlite/mysql

Expanded the rules for when to apply parenthesis to a server default in DDL
to suit the general case of a default string that contains non-word
characters such as spaces or operators and is not a string literal.

Fixed issue in MySQL server default reflection where a default that has
spaces would not be correctly reflected.  Additionally, expanded the rules
for when to apply parenthesis to a server default in DDL to suit the
general case of a default string that contains non-word characters such as
spaces or operators and is not a string literal.

Fixes: #12425
Change-Id: Ie40703dcd5fdc135025d676c01baba57ff3b71ad
12 files changed:
doc/build/changelog/unreleased_20/12425.rst [new file with mode: 0644]
doc/build/orm/extensions/asyncio.rst
lib/sqlalchemy/dialects/mysql/base.py
lib/sqlalchemy/dialects/mysql/reflection.py
lib/sqlalchemy/dialects/sqlite/base.py
lib/sqlalchemy/testing/assertions.py
lib/sqlalchemy/testing/requirements.py
lib/sqlalchemy/testing/suite/test_reflection.py
test/dialect/mysql/test_compiler.py
test/dialect/mysql/test_query.py
test/dialect/test_sqlite.py
test/requirements.py