Sha256: 6ef3b2dae289b62fb1deab25e12b5528daee70faf34fee1d751084dbdb0df022

Contents?: true

Size: 826 Bytes

Versions: 3

Compression:

Stored size: 826 Bytes

Contents

Sequel.migration do
  change do
    create_table(:devices) do
      primary_key :id
      String :hostname, null: false, unique: true
      String :ip_address, null: false, unique: true
      TrueClass :active, null: false, default: 1
      Integer :port, null: false, default: 161
      Integer :snmp_version, null: false, default: 3
      foreign_key :device_cred_id, :device_creds, null: true
      Integer :frequency, null: false, default: 60

      String :environment
      String :datacenter
      String :zone

      DateTime :last_polled
      DateTime :created
      DateTime :updated

      index :hostname, unique: true
      index :ip_address, unique: true
      index :active
      index :last_polled
      index :environment
      index :datacenter
      index :zone
      index :snmp_version
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
telemetry-snmp-0.3.0 lib/telemetry/snmp/data/migrations/002_create_devices_table.rb
telemetry-snmp-0.2.0 lib/telemetry/snmp/data/migrations/002_create_devices_table.rb
telemetry-snmp-0.1.0 lib/telemetry/snmp/data/migrations/002_create_devices_table.rb