fixed rares event

This commit is contained in:
erik 2025-05-22 16:29:05 +00:00
parent c418221575
commit f86ad9a542
6 changed files with 101 additions and 2 deletions

View file

@ -72,6 +72,18 @@ spawn_events = Table(
Column("ns", Float, nullable=False),
Column("z", Float, nullable=False),
)
# Rare events: record individual rare spawns for future heatmaps
rare_events = Table(
"rare_events",
metadata,
Column("id", Integer, primary_key=True),
Column("character_name", String, nullable=False),
Column("name", String, nullable=False),
Column("timestamp", DateTime(timezone=True), nullable=False, index=True),
Column("ew", Float, nullable=False),
Column("ns", Float, nullable=False),
Column("z", Float, nullable=False),
)
async def init_db_async():
"""Create tables and enable TimescaleDB hypertable for telemetry_events."""