eventhub/docs/timescale/V2__enable_timescale_hypert...

11 lines
318 B
SQL

-- Optional TimescaleDB migration for the acquisition-stage event table.
-- Enable only when the target PostgreSQL instance has TimescaleDB installed.
create extension if not exists timescaledb;
select create_hypertable(
'eventhub.event',
'occurred_at',
if_not_exists => true,
migrate_data => true
);