lib/timescaledb/migration_helpers.rb in timescaledb-0.2.1 vs lib/timescaledb/migration_helpers.rb in timescaledb-0.2.2

- old
+ new

@@ -80,9 +80,20 @@ WITH #{"NO" unless options[:with_data]} DATA; SQL create_continuous_aggregate_policy(table_name, options[:refresh_policies] || {}) end + + + # Drop a new continuous aggregate. + # + # It basically DROP MATERIALIZED VIEW for a given @name. + # + # @param name [String, Symbol] The name of the continuous aggregate view. + def drop_continuous_aggregates view_name + execute "DROP MATERIALIZED VIEW #{view_name}" + end + alias_method :create_continuous_aggregates, :create_continuous_aggregate def create_continuous_aggregate_policy(table_name, **options) return if options.empty?