View Source Timescale.Migration (Timescale v0.1.1)

This module provides helpers for installing TimescaleDB, as well as creating, modifying, and configuring Timescale resources.

Link to this section Summary

Functions

Adds a compression policy to a hypertable using the add_compression_policy function

Adds TimescaleDB as a Postgres extension

Disables compression on an existing hypertable. Note that chunks must be decompressed before its called

Drops TimescaleDB as a Postgres extension

Drops the TimescaleDB toolkit as a Postgres Extension

Enables compression on an existing hypertable

Removes a compression policy from a hypertable using the remove_compression_policy function

Link to this section Functions

Link to this macro

add_compression_policy(hypertable, compress_after, opts \\ [])

View Source (macro)

Adds a compression policy to a hypertable using the add_compression_policy function

Link to this macro

create_hypertable(relation, time_column_name, opts \\ [])

View Source (macro)

Creates a new hypertable in an Ecto Migration.

create_hypertable(:conditions, :time)
Link to this macro

create_timescaledb_extension()

View Source (macro)

Adds TimescaleDB as a Postgres extension

Link to this macro

create_timescaledb_toolkit_extension()

View Source (macro)

Adds the TimescaleDB toolkit as a Postgres Extension

Link to this macro

disable_hypertable_compression(table)

View Source (macro)

Disables compression on an existing hypertable. Note that chunks must be decompressed before its called

See the ALTER TABLE (Compression) documentation

Link to this macro

drop_timescaledb_extension()

View Source (macro)

Drops TimescaleDB as a Postgres extension

Link to this macro

drop_timescaledb_toolkit_extension()

View Source (macro)

Drops the TimescaleDB toolkit as a Postgres Extension

Link to this macro

enable_hypertable_compression(table, args \\ [])

View Source (macro)

Enables compression on an existing hypertable

See the ALTER TABLE (Compression) documentation

required-arguments

Required arguments

  • :segment_by - Column list on which to key the compressed segments
Link to this macro

remove_compression_policy(hypertable, opts \\ [])

View Source (macro)

Removes a compression policy from a hypertable using the remove_compression_policy function

Link to this macro

update_timescaledb_toolkit_extension()

View Source (macro)

Updates the existing TimescaleDB toolkit extension