Skip to content

Commit

Permalink
Add hypertable as a valid table definition
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatas committed Apr 9, 2024
1 parent 315cd66 commit 8a96f4b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/timescaledb/migration_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ def create_table(table_name, id: :primary_key, primary_key: nil, force: nil, **o
create_hypertable(table_name, **options[:hypertable]) if options.key?(:hypertable)
end

# Override the valid_table_definition_options to include hypertable.
def valid_table_definition_options # :nodoc:
super + [:hypertable]
end

# Setup hypertable from options
# @see create_table with the hypertable options.
def create_hypertable(table_name,
Expand Down

0 comments on commit 8a96f4b

Please sign in to comment.