5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 12:46:22 +00:00
panel/db/migrate/20210807003928_create_rollups.rb
2021-09-03 15:25:41 -03:00

15 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