diff --git a/db/migrate/20190123122113_add_hidden_at_to_budget_investment_translations.rb b/db/migrate/20190123122113_add_hidden_at_to_budget_investment_translations.rb new file mode 100644 index 000000000..b3d30070f --- /dev/null +++ b/db/migrate/20190123122113_add_hidden_at_to_budget_investment_translations.rb @@ -0,0 +1,6 @@ +class AddHiddenAtToBudgetInvestmentTranslations < ActiveRecord::Migration[4.2] + def change + add_column :budget_investment_translations, :hidden_at, :datetime + add_index :budget_investment_translations, :hidden_at + end +end diff --git a/db/schema.rb b/db/schema.rb index 383c0c078..6680cbe2c 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -241,7 +241,9 @@ ActiveRecord::Schema.define(version: 20190607160900) do t.datetime "updated_at", null: false t.string "title" t.text "description" + t.datetime "hidden_at" t.index ["budget_investment_id"], name: "index_budget_investment_translations_on_budget_investment_id", using: :btree + t.index ["hidden_at"], name: "index_budget_investment_translations_on_hidden_at", using: :btree t.index ["locale"], name: "index_budget_investment_translations_on_locale", using: :btree end diff --git a/spec/models/budget/investment_spec.rb b/spec/models/budget/investment_spec.rb index 37d015d8b..7cfc17587 100644 --- a/spec/models/budget/investment_spec.rb +++ b/spec/models/budget/investment_spec.rb @@ -8,6 +8,7 @@ describe Budget::Investment do it_behaves_like "sanitizable" it_behaves_like "globalizable", :budget_investment it_behaves_like "acts as imageable", :budget_investment_image + it_behaves_like "acts as paranoid", :budget_investment end it "is valid" do