]> 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:04:01 +0000 (15:04 -0400)
commita936360ef01ab78b83d0c16ebbd61b1c55801ac2
tree7bd271218ebc88b55f77ae69a04e2f49a139b52c
parent4167b3f2b419618d0b56402cd6ad3dabc3b5a18e
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
(cherry picked from commit 1afb820427545e259397b98851a910d7379b2eb8)
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