Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-09-03 18:10:41 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-09-03 18:10:41 +0400
commit6f423b987f0c461ace7702a142c7230082d122be (patch)
tree41bec3d503b03bf3e2033f163a08f46d375621d6 /db
parente8f1331fa4b3f4c4037f6509b2a846f521f506fc (diff)
Update repos hooks in migration
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20140903115954_migrate_to_new_shell.rb10
-rw-r--r--db/schema.rb2
2 files changed, 11 insertions, 1 deletions
diff --git a/db/migrate/20140903115954_migrate_to_new_shell.rb b/db/migrate/20140903115954_migrate_to_new_shell.rb
new file mode 100644
index 00000000000..69912887da8
--- /dev/null
+++ b/db/migrate/20140903115954_migrate_to_new_shell.rb
@@ -0,0 +1,10 @@
+class MigrateToNewShell < ActiveRecord::Migration
+ def change
+ gitlab_shell_path = Gitlab.config.gitlab_shell.path
+ if system("sh #{gitlab_shell_path}/support/rewrite-hooks.sh")
+ puts 'Repositories updated with new hooks'
+ else
+ raise 'Failed to rewrite gitlab-shell hooks in repositories'
+ end
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 9159556ac72..a2dda07c102 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20140730111702) do
+ActiveRecord::Schema.define(version: 20140903115954) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"