mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-24 13:36:21 +00:00
16 lines
427 B
Ruby
16 lines
427 B
Ruby
|
# 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
|