Closed zzachattack2 closed 1 month ago
Through many hours of digging on this exact same issue, I believe the problem is the raw text and it not being sql. wrapping the text in text
treats it as sql and it then proceeded to work.
postgresql.ExcludeConstraint((sa.column('native_transaction_id'), '='), (text("tsrange(issued_at - INTERVAL '1 hour', issued_at)"), '&&'), using='gist', name='transaction_unique_native_tx_id'),
I still have some more testing to do to make sure it works. I am also not sure if this is a recommended approach to fixing the issue.
any progress on this issue???
I've been having issue installing within flask with the following error:
File "/.local/share/virtualenvs/backend-Xo4Co4k2/lib/python3.7/site-packages/sqlalchemy/util/_collections.py", line 194, in __getitem__ return self._data[key] KeyError: "tsrange(issued_at - INTERVAL '1 hour', issued_at)"
Seems to be based on the following from the alembic migration script:
postgresql.ExcludeConstraint((sa.column('native_transaction_id'), '='), ("tsrange(issued_at - INTERVAL '1 hour', issued_at)", '&&'), using='gist', name='transaction_unique_native_tx_id')
Tested on both postgres 10 and 11. Any suggestions?