]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Reflect "NO ACTION" as None; support "RESTRICT"
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 26 Jun 2019 15:45:50 +0000 (11:45 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 26 Jun 2019 19:10:53 +0000 (15:10 -0400)
commit5cf8e14d58c89fdb94c60bf5e94d8b13d296da25
tree9819e92b6dcce02ad453bac70841446843e0c05e
parent1ed2f1621510b48a6c46bedf3dd579c56bd89ccb
Reflect "NO ACTION" as None; support "RESTRICT"

The "NO ACTION" keyword for foreign key "ON UPDATE" is now considered to be
the default cascade for a foreign key on all supporting backends (SQlite,
MySQL, PostgreSQL) and when detected is not included in the reflection
dictionary; this is already the behavior for PostgreSQL and MySQL for all
previous SQLAlchemy versions in any case.   The "RESTRICT" keyword is
positively stored when detected; PostgreSQL does report on this keyword,
and MySQL as of version 8.0 does as well.  On earlier MySQL versions, it is
not reported by the database.

Fixes: #4741
Change-Id: I6becf1f2450605c1991158bb8a04d954dcc7396c
doc/build/changelog/unreleased_14/4741.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mysql/base.py
lib/sqlalchemy/dialects/mysql/reflection.py
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/dialects/sqlite/base.py
lib/sqlalchemy/testing/requirements.py
lib/sqlalchemy/testing/suite/test_reflection.py
test/dialect/postgresql/test_reflection.py
test/dialect/test_sqlite.py
test/requirements.py