Closed pavelfilippi closed 1 year ago
I have removed manual migration in 7e58210df0df1cf5b5ffbcde005709b4f500a002 and forgot to make (via alembic?) weather_real_time hypertable again!
weather_real_time
Possible solution:
from sqlalchemy import Column, Integer, DateTime, event, DDL, orm Base = orm.declarative_base() class ExampleModel(Base): __tablename__ = 'example_model' id = Column(Integer, primary_key=True) time = Column(DateTime) event.listen( ExampleModel.__table__, 'after_create', DDL(f"SELECT create_hypertable('{ExampleModel.__tablename__}', 'time');") )
via https://stackoverflow.com/questions/50862609/creating-hypertables-through-sql-alchemy
Fixed in https://github.com/pavelfilippi/weather-monitor/pull/16
I have removed manual migration in 7e58210df0df1cf5b5ffbcde005709b4f500a002 and forgot to make (via alembic?)
weather_real_time
hypertable again!Possible solution:
via https://stackoverflow.com/questions/50862609/creating-hypertables-through-sql-alchemy