]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commit
dont use repr to quote string in compare_server_default
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 22 Dec 2022 23:41:20 +0000 (18:41 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 23 Dec 2022 17:16:50 +0000 (12:16 -0500)
commit26f8752a6c34c849221fa3c8c686ff67cd68e328
treedfe464c0c0a1d52b5dd8f873d30c96e83317a32b
parent4678d7f1da009689449a6550768139c32b50c646
dont use repr to quote string in compare_server_default

Fixed issue where server default compare would not work for string defaults
that contained backslashes, due to mis-rendering of these values when
comparing their contents.

The server default comparison still has a lot of not-robust behaviors,
however at least get in place a parameterized test suite so that we
can add new scenarios quickly.

Made a slight adjustment to SQLite's compare server default implementation
to better handle defaults with or without parens around them, from both
the reflected and the local metadata side.

Implemented basic server default comparison for the Oracle backend;
previously, Oracle's formatting of reflected defaults prevented any
matches from occurring.

Change-Id: If5a69eec4b22d243a564d2c89e78ae33ba5be88f
Fixes: #1145
alembic/autogenerate/compare.py
alembic/ddl/mssql.py
alembic/ddl/oracle.py
alembic/ddl/sqlite.py
docs/build/unreleased/1145.rst [new file with mode: 0644]
tests/test_autogen_diffs.py