]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
SQLite reflection ignores schema internal names
authorFederico Caselli <cfederico87@gmail.com>
Sat, 30 Jul 2022 10:40:37 +0000 (12:40 +0200)
committerFederico Caselli <cfederico87@gmail.com>
Mon, 1 Aug 2022 21:47:36 +0000 (21:47 +0000)
commit63d90b0f44016b15bed6c4108d90a71c15f05a09
tree5e2a360eab5e722edefbbd4ea2bb717c7294c87f
parent3ff18812d8d80b2016ceeea98c808a76cae85e48
SQLite reflection ignores schema internal names

Added new parameter to SQLite for reflection methods called
``sqlite_include_internal=True``; when omitted, local tables that start
with the prefix ``sqlite_``, which per SQLite documentation are noted as
"internal schema" tables such as the ``sqlite_sequence`` table generated to
support "AUTOINCREMENT" columns, will not be included in reflection methods
that return lists of local objects. This prevents issues for example when
using Alembic autogenerate, which previously would consider these
SQLite-generated tables as being remove from the model.

Fixes: #8234
Change-Id: I36ee7a053e04b6c46c912aaa0d7e035a5b88a4f9
doc/build/changelog/unreleased_20/8234.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/sqlite/base.py
test/dialect/test_sqlite.py