Class: CreateHeartbeat
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateHeartbeat
- Defined in:
- lib/device_tracker/db/migrate/20151027073050_create_heartbeat.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 7 8 9 |
# File 'lib/device_tracker/db/migrate/20151027073050_create_heartbeat.rb', line 2 def change create_table :heartbeats do |t| t.decimal :longitude, { precision: 10, scale: 6 } t.decimal :latitude, { precision: 10, scale: 6 } t.belongs_to :device t. null: false end end |