From 337d65c29831ebe7835c06c5ff13c35f749c7693 Mon Sep 17 00:00:00 2001 From: Dan Elbert Date: Fri, 14 Sep 2018 19:46:02 -0500 Subject: [PATCH] fix pg col --- db/migrate/20180915004420_fix_usda_food.rb | 5 +++++ db/schema.rb | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20180915004420_fix_usda_food.rb diff --git a/db/migrate/20180915004420_fix_usda_food.rb b/db/migrate/20180915004420_fix_usda_food.rb new file mode 100644 index 0000000..5eb3d1f --- /dev/null +++ b/db/migrate/20180915004420_fix_usda_food.rb @@ -0,0 +1,5 @@ +class FixUsdaFood < ActiveRecord::Migration[5.2] + def change + change_column :usda_foods, :ndbn, :string, limit: 25 + end +end diff --git a/db/schema.rb b/db/schema.rb index 6bee914..bb83542 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2018_09_13_204958) do +ActiveRecord::Schema.define(version: 2018_09_15_004420) do create_table "food_units", force: :cascade do |t| t.integer "food_id", null: false @@ -157,7 +157,7 @@ ActiveRecord::Schema.define(version: 2018_09_13_204958) do end create_table "usda_foods", force: :cascade do |t| - t.string "ndbn", limit: 5, null: false + t.string "ndbn", limit: 25, null: false t.string "long_description" t.string "short_description" t.decimal "water", precision: 10, scale: 2