From a678d8beaaf68ddfa360b1a9cae6e04336b984a3 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Tue, 11 Feb 2014 14:21:39 +0100 Subject: [PATCH] Allow the git user to modify db/schema.rb --- files/gitlab-cookbooks/gitlab/recipes/database_migrations.rb | 3 +++ 1 file changed, 3 insertions(+), 0 deletions(-) diff --git a/files/gitlab-cookbooks/gitlab/recipes/database_migrations.rb b/files/gitlab-cookbooks/gitlab/recipes/database_migrations.rb index 8fe0071..0dd9ab1 100644 --- a/files/gitlab-cookbooks/gitlab/recipes/database_migrations.rb +++ b/files/gitlab-cookbooks/gitlab/recipes/database_migrations.rb @@ -20,6 +20,9 @@ execute "initialize database" do action :nothing end +user_group = "#{node['gitlab']['user']['username']}:#{node['gitlab']['user']['group']}" +execute "chown #{user_group} /opt/gitlab/embedded/service/gitlab-core/db/schema.rb" + execute "migrate database" do command "/opt/gitlab/bin/gitlab-rake db:migrate" end -- libgit2 0.21.2