Commit f6a33d94655f38c9483e376df1122477f40c8ce3
1 parent
d13fb337
Exists in
master
and in
89 other branches
noosfero: make sure DB is created correctly
run db:migrate _after_ plugins are enabled system-wide so that plugins migrations are executed.
Showing
1 changed file
with
6 additions
and
6 deletions
Show diff stats
cookbooks/noosfero/recipes/default.rb
@@ -29,12 +29,6 @@ execute 'noosfero:schema' do | @@ -29,12 +29,6 @@ execute 'noosfero:schema' do | ||
29 | notifies :restart, 'service[noosfero]' | 29 | notifies :restart, 'service[noosfero]' |
30 | end | 30 | end |
31 | 31 | ||
32 | -execute 'noosfero:migrate' do | ||
33 | - command 'RAILS_ENV=production SCHEMA=/dev/null bundle exec rake db:migrate' | ||
34 | - cwd '/usr/lib/noosfero' | ||
35 | - user 'noosfero' | ||
36 | -end | ||
37 | - | ||
38 | package 'noosfero-spb' do | 32 | package 'noosfero-spb' do |
39 | action :upgrade | 33 | action :upgrade |
40 | end | 34 | end |
@@ -56,6 +50,12 @@ execute 'plugins:enable' do | @@ -56,6 +50,12 @@ execute 'plugins:enable' do | ||
56 | command '/usr/lib/noosfero/script/noosfero-plugins enable ' + plugins.join(' ') | 50 | command '/usr/lib/noosfero/script/noosfero-plugins enable ' + plugins.join(' ') |
57 | end | 51 | end |
58 | 52 | ||
53 | +execute 'noosfero:migrate' do | ||
54 | + command 'RAILS_ENV=production SCHEMA=/dev/null bundle exec rake db:migrate' | ||
55 | + cwd '/usr/lib/noosfero' | ||
56 | + user 'noosfero' | ||
57 | +end | ||
58 | + | ||
59 | execute 'plugins:activate' do | 59 | execute 'plugins:activate' do |
60 | command "RAILS_ENV=production bundle exec rake noosfero:plugins:enable_all" | 60 | command "RAILS_ENV=production bundle exec rake noosfero:plugins:enable_all" |
61 | cwd '/usr/lib/noosfero' | 61 | cwd '/usr/lib/noosfero' |