Turn off a warning in sqlalchemy

前端 未结 2 811
孤独总比滥情好
孤独总比滥情好 2020-12-15 04:11

I\'m using sqlalchemy with reflection, a couple of partial indices in my DB make it dump warnings like this:

SAWarning: Predicate of partial index i_some_index

2条回答
  •  长情又很酷
    2020-12-15 04:17

    the warning means you did a table or metadata reflection, and it's reading in postgresql indexes that have some complex condition which the SQLAlchemy reflection code doesn't know what to do with. This is a harmless warning, as whether or not indexes are reflected doesn't affect the operation of the application, unless you wanted to re-emit CREATE statements for those tables/indexes on another database.

提交回复
热议问题