Sha256: a0953f85f3dad3d1e980a90688629dab608fd9ab59fe7212b31da0cf10ed6601

Contents?: true

Size: 1.5 KB

Versions: 177

Compression:

Stored size: 1.5 KB

Contents

class CreateClinicalBodyCompositions < ActiveRecord::Migration[5.0]
  def change
    create_table :clinical_body_compositions do |t|
      t.belongs_to :patient, index: true, foreign_key: true
      t.belongs_to :modality_description, index: true, foreign_key: true

      t.date :assessed_on, null: false
      t.decimal :overhydration, null: false, precision: 3, scale: 1
      t.decimal :volume_of_distribution, null: false, precision: 4, scale: 1
      t.decimal :total_body_water, null: false, precision: 4, scale: 1
      t.decimal :extracellular_water, null: false, precision: 4, scale: 1
      t.decimal :intracellular_water, null: false, precision: 3, scale: 1
      t.decimal :lean_tissue_index, null: false, precision: 4, scale: 1
      t.decimal :fat_tissue_index, null: false, precision: 4, scale: 1
      t.decimal :lean_tissue_mass, null: false, precision: 4, scale: 1
      t.decimal :fat_tissue_mass, null: false, precision: 4, scale: 1
      t.decimal :adipose_tissue_mass, null: false, precision: 4, scale: 1
      t.decimal :body_cell_mass, null: false, precision: 4, scale: 1
      t.decimal :quality_of_reading, null: false, precision: 6, scale: 3
      t.text :notes

      t.belongs_to :created_by, index: true, null: false
      t.belongs_to :updated_by, index: true, null: false

      t.timestamps null: false
    end

    add_reference :clinical_body_compositions, :assessor, references: :users, index: true, null: false
    add_foreign_key :clinical_body_compositions, :users, column: :assessor_id
  end
end

Version data entries

177 entries across 177 versions & 1 rubygems

Version Path
renalware-core-2.0.18 db/migrate/20170609144233_create_clinical_body_compositions.rb
renalware-core-2.0.17 db/migrate/20170609144233_create_clinical_body_compositions.rb
renalware-core-2.0.16 db/migrate/20170609144233_create_clinical_body_compositions.rb
renalware-core-2.0.15 db/migrate/20170609144233_create_clinical_body_compositions.rb
renalware-core-2.0.14 db/migrate/20170609144233_create_clinical_body_compositions.rb
renalware-core-2.0.13 db/migrate/20170609144233_create_clinical_body_compositions.rb
renalware-core-2.0.12 db/migrate/20170609144233_create_clinical_body_compositions.rb
renalware-core-2.0.11 db/migrate/20170609144233_create_clinical_body_compositions.rb
renalware-core-2.0.9 db/migrate/20170609144233_create_clinical_body_compositions.rb
renalware-core-2.0.8 db/migrate/20170609144233_create_clinical_body_compositions.rb
renalware-core-2.0.7 db/migrate/20170609144233_create_clinical_body_compositions.rb
renalware-core-2.0.5 db/migrate/20170609144233_create_clinical_body_compositions.rb
renalware-core-2.0.4 db/migrate/20170609144233_create_clinical_body_compositions.rb
renalware-core-2.0.3 db/migrate/20170609144233_create_clinical_body_compositions.rb
renalware-core-2.0.2 db/migrate/20170609144233_create_clinical_body_compositions.rb
renalware-core-2.0.1 db/migrate/20170609144233_create_clinical_body_compositions.rb
renalware-core-2.0.0 db/migrate/20170609144233_create_clinical_body_compositions.rb
renalware-core-2.0.0.pre.rc13 db/migrate/20170609144233_create_clinical_body_compositions.rb
renalware-core-2.0.0.pre.rc11 db/migrate/20170609144233_create_clinical_body_compositions.rb
renalware-core-2.0.0.pre.rc10 db/migrate/20170609144233_create_clinical_body_compositions.rb