5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-23 00:56:22 +00:00
panel/db/migrate/20210807003928_create_rollups.rb

16 lines
427 B
Ruby
Raw Permalink Normal View History

2021-09-03 18:23:11 +00:00
# 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