DanCardin / sqlalchemy-declarative-extensions

Library to declare additional kinds of objects not natively supported by SqlAlchemy/Alembic.
https://sqlalchemy-declarative-extensions.readthedocs.io/en/latest/
Apache License 2.0
31 stars 5 forks source link

fix: Avoid using online normalization for MetaData.create_all. #28

Closed DanCardin closed 1 year ago

DanCardin commented 1 year ago

The assumption is generally that with MetaData.create_all, it's being used to create objects from an empty database, and thus, there's less/little point in doing live/connection based normalization; since there wont be an existing view to compare against.

In particular, this change fixes the case where a view (A) dependent on another view (B) are both being created in the same comparison pass (i.e. during MetaData.create_all), and the comparison for view A tries to create itself in order to get a normalized view, only to realize that view B doesn't exist.

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 4493585357


Totals Coverage Status
Change from base Build 4365875483: 0.0%
Covered Lines: 1677
Relevant Lines: 1731

💛 - Coveralls