diff --git a/files/gitlab-cookbooks/gitlab/attributes/default.rb b/files/gitlab-cookbooks/gitlab/attributes/default.rb index aaea86b..5992d46 100644 --- a/files/gitlab-cookbooks/gitlab/attributes/default.rb +++ b/files/gitlab-cookbooks/gitlab/attributes/default.rb @@ -57,6 +57,7 @@ default['gitlab']['gitlab-core']['support_email'] = "support@example.com" default['gitlab']['gitlab-core']['uploads_directory'] = "/var/opt/gitlab/uploads" default['gitlab']['gitlab-core']['rate_limit_requests_per_period'] = 10 default['gitlab']['gitlab-core']['rate_limit_period'] = 60 +default['gitlab']['gitlab-core']['automatic_migrations'] = true #### diff --git a/files/gitlab-cookbooks/gitlab/recipes/database_migrations.rb b/files/gitlab-cookbooks/gitlab/recipes/database_migrations.rb index 3f3f154..36816e1 100644 --- a/files/gitlab-cookbooks/gitlab/recipes/database_migrations.rb +++ b/files/gitlab-cookbooks/gitlab/recipes/database_migrations.rb @@ -19,3 +19,8 @@ execute "initialize database" do command "/opt/gitlab/bin/gitlab-rake db:schema:load db:seed_fu" action :nothing end + +execute "migrate database" do + command "/opt/gitlab/bin/gitlab-rake db:migrate" + only_if node['gitlab']['gitlab-core']['automatic_migrations'] +end -- libgit2 0.21.2