Module: Timescaledb::Rails::ActiveRecord::SchemaDumper

Defined in:
lib/timescaledb/rails/extensions/active_record/schema_dumper.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#table(table, stream) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/timescaledb/rails/extensions/active_record/schema_dumper.rb', line 11

def table(table, stream)
  super(table, stream)

  return unless timescale_enabled?
  return if (hypertable = Timescaledb::Rails::Hypertable.find_by(hypertable_name: table)).nil?

  hypertable(hypertable, stream)
  hypertable_compression(hypertable, stream)
  hypertable_reorder(hypertable, stream)
  hypertable_retention(hypertable, stream)
end