mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 11:31:41 +00:00
Agregar rollups
This commit is contained in:
parent
752569c8a7
commit
094a8092de
3 changed files with 25 additions and 1 deletions
1
Gemfile
1
Gemfile
|
@ -58,6 +58,7 @@ gem 'rails-i18n'
|
|||
gem 'rails_warden'
|
||||
gem 'redis', require: %w[redis redis/connection/hiredis]
|
||||
gem 'redis-rails'
|
||||
gem 'rollups'
|
||||
gem 'rubyzip'
|
||||
gem 'rugged'
|
||||
gem 'concurrent-ruby-ext'
|
||||
|
|
10
Gemfile.lock
10
Gemfile.lock
|
@ -205,6 +205,8 @@ GEM
|
|||
ffi (~> 1.0)
|
||||
globalid (0.4.2)
|
||||
activesupport (>= 4.2.0)
|
||||
groupdate (5.2.2)
|
||||
activesupport (>= 5)
|
||||
hairtrigger (0.2.24)
|
||||
activerecord (>= 5.0, < 7)
|
||||
ruby2ruby (~> 2.4)
|
||||
|
@ -345,6 +347,7 @@ GEM
|
|||
mini_histogram (0.3.1)
|
||||
mini_magick (4.11.0)
|
||||
mini_mime (1.1.0)
|
||||
mini_portile2 (2.5.3)
|
||||
minima (2.5.1)
|
||||
jekyll (>= 3.5, < 5.0)
|
||||
jekyll-feed (~> 0.9)
|
||||
|
@ -357,7 +360,8 @@ GEM
|
|||
net-ssh (6.1.0)
|
||||
netaddr (2.0.4)
|
||||
nio4r (2.5.7-x86_64-linux-musl)
|
||||
nokogiri (1.11.7-x86_64-linux)
|
||||
nokogiri (1.11.7-x86_64-linux-musl)
|
||||
mini_portile2 (~> 2.5.0)
|
||||
racc (~> 1.4)
|
||||
orm_adapter (0.5.0)
|
||||
parallel (1.20.1)
|
||||
|
@ -479,6 +483,9 @@ GEM
|
|||
actionpack (>= 5.0)
|
||||
railties (>= 5.0)
|
||||
rexml (3.2.5)
|
||||
rollups (0.1.2)
|
||||
activesupport (>= 5.1)
|
||||
groupdate (>= 5.2)
|
||||
rouge (3.26.0)
|
||||
rubocop (1.18.3)
|
||||
parallel (~> 1.10)
|
||||
|
@ -692,6 +699,7 @@ DEPENDENCIES
|
|||
recursero-jekyll-theme
|
||||
redis
|
||||
redis-rails
|
||||
rollups
|
||||
rubocop-rails
|
||||
rubyzip
|
||||
rugged
|
||||
|
|
15
db/migrate/20210807003928_create_rollups.rb
Normal file
15
db/migrate/20210807003928_create_rollups.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Crear la tabla de Rollups
|
||||
class CreateRollups < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
create_table :rollups do |t|
|
||||
t.string :name, null: false
|
||||
t.string :interval, null: false
|
||||
t.datetime :time, null: false
|
||||
t.jsonb :dimensions, null: false, default: {}
|
||||
t.float :value
|
||||
end
|
||||
add_index :rollups, %i[name interval time dimensions], unique: true
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue