diff --git a/db/migrate/20190123122511_add_hidden_at_to_proposal_translations.rb b/db/migrate/20190123122511_add_hidden_at_to_proposal_translations.rb new file mode 100644 index 000000000..c8250a2eb --- /dev/null +++ b/db/migrate/20190123122511_add_hidden_at_to_proposal_translations.rb @@ -0,0 +1,6 @@ +class AddHiddenAtToProposalTranslations < ActiveRecord::Migration[4.2] + def change + add_column :proposal_translations, :hidden_at, :datetime + add_index :proposal_translations, :hidden_at + end +end diff --git a/db/schema.rb b/db/schema.rb index 925e935f3..fc97b55bb 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1318,6 +1318,8 @@ ActiveRecord::Schema.define(version: 20190607160900) do t.text "description" t.text "summary" t.text "retired_explanation" + t.datetime "hidden_at" + t.index ["hidden_at"], name: "index_proposal_translations_on_hidden_at", using: :btree t.index ["locale"], name: "index_proposal_translations_on_locale", using: :btree t.index ["proposal_id"], name: "index_proposal_translations_on_proposal_id", using: :btree end diff --git a/spec/models/proposal_spec.rb b/spec/models/proposal_spec.rb index 9c1d0971c..40459fddf 100644 --- a/spec/models/proposal_spec.rb +++ b/spec/models/proposal_spec.rb @@ -10,6 +10,7 @@ describe Proposal do it_behaves_like "map validations" it_behaves_like "globalizable", :proposal it_behaves_like "sanitizable" + it_behaves_like "acts as paranoid", :proposal end it "is valid" do