How to generate hypertable using Alembic? Some custom call must be added I suppose, but where? I tried event.listen but Alembic does not register it.
Asked
Active
Viewed 197 times
0
-
Timescale does not have any special support. What exactly are you trying to do? See this issue with some old sample from people that are using it with alembic: https://github.com/timescale/timescaledb/issues/551 Also, the timescale quickstart shows that you can use plain sql for most of the calls: https://docs.timescale.com/timescaledb/latest/quick-start/python/ – jonatasdp Mar 06 '23 at 21:24
-
I am creating tables using SQLAlchemy and after table creation I want to also create a hypertable so I am looking for a way to automatically generate Alembic migration that would create the hypertable. – romanzdk Mar 07 '23 at 17:44
-
I'd suggest you come to alembic framework and find a developer that can build it for you, or build it yourself. I'm not a python expert to help here, but probably you can achieve it building a kind of extension/plugin for it. – jonatasdp Apr 03 '23 at 14:41
1 Answers
1
You can create hypertables in Alembic by adding manual, custom, migration actions.
You cannot generate it automatically, because there is no specific support in Alembic for TimescaleDB and it does not understand hypertables.

Mikko Ohtamaa
- 82,057
- 50
- 264
- 435