]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Support `ARRAY` of `Enum`, `JSON` or `JSONB`
authorFederico Caselli <cfederico87@gmail.com>
Sun, 19 Apr 2020 18:09:39 +0000 (20:09 +0200)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 20 Apr 2020 15:54:20 +0000 (11:54 -0400)
commitaaec1bdedfc73ead3aef3a3e4d835a8df339e2dd
tree70dd9f841bcd9e9c8b14d6d7f4238abeda64fc46
parent2f617f56f2acdce00b88f746c403cf5ed66d4d27
Support `ARRAY` of `Enum`, `JSON` or `JSONB`

Added support for columns or type :class:`.ARRAY` of :class:`.Enum`,
:class:`.JSON` or :class:`_postgresql.JSONB` in PostgreSQL.
Previously a workaround was required in these use cases.
Raise an explicit :class:`.exc.CompileError` when adding a table with a
column of type :class:`.ARRAY` of :class:`.Enum` configured with
:paramref:`.Enum.native_enum` set to ``False`` when
:paramref:`.Enum.create_constraint` is not set to ``False``

Fixes: #5265
Fixes: #5266
Change-Id: I83a2d20a599232b7066d0839f3e55ff8b78cd8fc
doc/build/changelog/unreleased_13/5265.rst [new file with mode: 0644]
doc/build/changelog/unreleased_13/5266.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/array.py
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/dialects/postgresql/hstore.py
lib/sqlalchemy/dialects/postgresql/json.py
lib/sqlalchemy/dialects/postgresql/ranges.py
test/dialect/postgresql/test_types.py