From 808ea3a466929d249641bd3291ceaedbe4210e33 Mon Sep 17 00:00:00 2001 From: Ben Halpern Date: Wed, 2 May 2018 14:14:49 -0400 Subject: [PATCH] Add boost states in for real (#270) * Add boost states in for real * Fix schema issue --- db/migrate/20180502174301_add_boost_states_to_articles.rb | 6 ++++++ db/schema.rb | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20180502174301_add_boost_states_to_articles.rb diff --git a/db/migrate/20180502174301_add_boost_states_to_articles.rb b/db/migrate/20180502174301_add_boost_states_to_articles.rb new file mode 100644 index 000000000..b47d6836a --- /dev/null +++ b/db/migrate/20180502174301_add_boost_states_to_articles.rb @@ -0,0 +1,6 @@ +class AddBoostStatesToArticles < ActiveRecord::Migration[5.1] + def change + add_column :articles, :boost_states, :jsonb, null: false, default: {} + add_index :articles, :boost_states, using: :gin + end +end \ No newline at end of file diff --git a/db/schema.rb b/db/schema.rb index 830a7b09a..385a63b01 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -8,9 +8,9 @@ # from scratch. The latter is a flawed and unsustainable approach (the more migrations # you'll amass, the slower it'll run and the greater likelihood for issues). # -# It's strongly recommended that you check this file into your version control system. ❤️ +# It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20180502160428) do +ActiveRecord::Schema.define(version: 20180502174301) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql"