Sha256: 79e4c4b9c326be8e2bce30d20a49f4b9f73f4f29f1f90222fdcc262bedd1e58b

Contents?: true

Size: 916 Bytes

Versions: 23

Compression:

Stored size: 916 Bytes

Contents

class CreateUsdaFoodsNutrients < ActiveRecord::Migration
  def change
    create_table :usda_foods_nutrients do |t|
      t.string  :nutrient_databank_number, null: false
      t.string  :nutrient_number, null: false
      t.float   :nutrient_value, null: false
      t.integer :num_data_points, null: false
      t.float   :standard_error
      t.string  :src_code, null: false
      t.string  :derivation_code
      t.string  :ref_nutrient_databank_number
      t.boolean :add_nutrient_mark
      t.integer :num_studies
      t.float   :min
      t.float   :max
      t.integer :degrees_of_freedom
      t.float   :lower_error_bound
      t.float   :upper_error_bound
      t.string  :statistical_comments
      t.string  :add_mod_date
      t.string  :confidence_code
    end

    add_index :usda_foods_nutrients,
      [:nutrient_databank_number, :nutrient_number],
      name: 'foods_nutrients_index'
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
usda-nutrient-database-2.1.2 db/migrate/3_create_usda_foods_nutrients.rb
usda-nutrient-database-1.5.0 db/migrate/3_create_usda_foods_nutrients.rb
usda-nutrient-database-1.4.1 db/migrate/3_create_usda_foods_nutrients.rb
usda-nutrient-database-2.1.1 db/migrate/3_create_usda_foods_nutrients.rb
usda-nutrient-database-2.1.0 db/migrate/3_create_usda_foods_nutrients.rb
usda-nutrient-database-2.0.0 db/migrate/3_create_usda_foods_nutrients.rb
usda-nutrient-database-1.4.0 db/migrate/3_create_usda_foods_nutrients.rb
usda-nutrient-database-1.3.0 db/migrate/3_create_usda_foods_nutrients.rb
usda-nutrient-database-1.2.0 db/migrate/3_create_usda_foods_nutrients.rb
usda-nutrient-database-1.1.0 db/migrate/3_create_usda_foods_nutrients.rb
usda-nutrient-database-1.0.1 db/migrate/3_create_usda_foods_nutrients.rb
usda-nutrient-database-1.0.0 db/migrate/3_create_usda_foods_nutrients.rb
usda-nutrient-database-0.8.1 db/migrate/3_create_usda_foods_nutrients.rb
usda-nutrient-database-0.8.0 db/migrate/3_create_usda_foods_nutrients.rb
usda-nutrient-database-0.7.0 db/migrate/3_create_usda_foods_nutrients.rb
usda-nutrient-database-0.6.0 db/migrate/3_create_usda_foods_nutrients.rb
usda-nutrient-database-0.5.0 db/migrate/3_create_usda_foods_nutrients.rb
usda-nutrient-database-0.4.0 db/migrate/3_create_usda_foods_nutrients.rb
usda-nutrient-database-0.3.0 db/migrate/3_create_usda_foods_nutrients.rb
usda-nutrient-database-0.2.0 db/migrate/3_create_usda_foods_nutrients.rb