Class: CreateBlood

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/create_blood.rb

Class Method Summary collapse

Class Method Details

.downObject



17
18
19
# File 'lib/create_blood.rb', line 17

def self.down
  drop_table :blood_pressures
end

.upObject



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/create_blood.rb', line 4

def self.up
  create_table :blood_pressures do |t|
    t.column :sys,    :integer
    t.column :dia,    :integer
    t.column :hr,     :integer
    t.column :arm,    :string
    t.column :weight, :integer
    t.column :notes,  :text      
    t.timestamps      
  end
  add_index :blood_pressures, [:created_at]
end