diff --git a/db/migrate/20151103175139_make_comments_confidence_score_default_to_0.rb b/db/migrate/20151103175139_make_comments_confidence_score_default_to_0.rb new file mode 100644 index 000000000..788601c44 --- /dev/null +++ b/db/migrate/20151103175139_make_comments_confidence_score_default_to_0.rb @@ -0,0 +1,5 @@ +class MakeCommentsConfidenceScoreDefaultTo0 < ActiveRecord::Migration + def change + change_column :comments, :confidence_score, :integer, default: 0, null: false, index: true + end +end diff --git a/db/schema.rb b/db/schema.rb index cbe2fd671..320bfffc1 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20151030182217) do +ActiveRecord::Schema.define(version: 20151103175139) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -75,7 +75,7 @@ ActiveRecord::Schema.define(version: 20151030182217) do t.integer "cached_votes_down", default: 0 t.datetime "confirmed_hide_at" t.string "ancestry" - t.integer "confidence_score" + t.integer "confidence_score", default: 0, null: false end add_index "comments", ["ancestry"], name: "index_comments_on_ancestry", using: :btree