Commit 707a3093f6b470f10a71c7cc295e057e4ef31cb5
1 parent
642c42c1
Exists in
master
and in
3 other branches
Add a migration to fix proposals categories
Showing
1 changed file
with
13 additions
and
0 deletions
Show diff stats
... | ... | @@ -0,0 +1,13 @@ |
1 | +class AddCategoriesProposal < ActiveRecord::Migration | |
2 | + | |
3 | + def self.up | |
4 | + ProposalsDiscussionPlugin::Proposal.find_each do |proposal| | |
5 | + proposal.inherit_parent_categories | |
6 | + end | |
7 | + end | |
8 | + | |
9 | + def self.down | |
10 | + puts "Warning: cannot restore original categories" | |
11 | + end | |
12 | + | |
13 | +end | ... | ... |