Skip to content

Commit

Permalink
Fix keyword from compress_interval to compress_after
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatas committed Jan 16, 2025
1 parent 0cc5b88 commit 84c3551
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion db/downloads_migrate/20240708184547_create_downloads.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def self.up
chunk_time_interval: '1 day',
compress_segmentby: 'gem_name, gem_version',
compress_orderby: 'created_at DESC',
compression_interval: '7 days'
compress_after: '7 days'
}

create_table(:downloads, id: false, hypertable: hypertable_options) do |t|
Expand Down
2 changes: 1 addition & 1 deletion db/downloads_schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
t.index ["key", "directory"], name: "index_log_downloads_on_key_and_directory", unique: true
end

create_hypertable "downloads", time_column: "created_at", chunk_time_interval: "1 day", compress_segmentby: "gem_name, gem_version", compress_orderby: "created_at DESC", compression_interval: "P7D"
create_hypertable "downloads", time_column: "created_at", chunk_time_interval: "1 day", compress_segmentby: "gem_name, gem_version", compress_orderby: "created_at DESC", compress_after: "P7D"
create_continuous_aggregate("total_downloads_per_minute", <<-SQL, refresh_policies: { start_offset: "INTERVAL 'PT10M'", end_offset: "INTERVAL 'PT1M'", schedule_interval: "INTERVAL '60'"}, materialized_only: true, finalized: true)
SELECT time_bucket('PT1M'::interval, created_at) AS created_at,
count(*) AS downloads
Expand Down

0 comments on commit 84c3551

Please sign in to comment.