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
diff options
context:
space:
mode:
authorpjaspers <piet@happycamper.be>2019-06-19 14:55:31 +0300
committerpjaspers <piet@happycamper.be>2019-06-19 14:55:47 +0300
commit6f5daf49d93a05a6121bcc83ca1da146dd537adf (patch)
treef92cba3c540ec73e4f1f5bc7c62c012c4b76e56f /lib/gitlab/database
parent31438ddd8bdb924a9f7c986d779d325f9b4dc5cd (diff)
Use correct arg name
So funny story, true story. I tried to run the test locally, but didn't make it past setting up Gitaly. Here's what I tried: First attempt: `git clone gitlab-ce` `cd gitlab-ce && bundle install` `be rspec` This didn't work because I was missing the config/database.yml, I didn't see a `script/bootstrap` so I looked in the readme which redirected me to a webpage which redirected me to the gitlab-development-kit. Second attempt: `gem install gitlab-development-kit` cd gitlab-development-kit gdk init gdk isntall This broke somwhere along the way because it couldn't install Gitaly because my go version was too low. But it did clone the gitlab repo again and this time it did have a config/database.yml. So I tried to cd into it and `be rspec spec/lib/gitlab/database/migration_helpers_spec.rb` which complained about the database not being configured so I: - Changed the socket to localhost (in the config/database.yml) - `createdb <dev_db>` `createdb test_db` - `be rake db:test:prepare` Great success, it was doing things! But then failed when it came at the Gitaly step. Since I only want to change these three lines, at the point I gave up and entrusted the pipeline to do its thing. What I would have liked: - A 'It's a Rails system, I know this' readme/docs (It's in there somewhere just couldn't find it) - A way to run tests without having to use Gitaly - Not having too install all the things for a small fix (I get why'd you want this, but to me it's overkill)
Diffstat (limited to 'lib/gitlab/database')
-rw-r--r--lib/gitlab/database/migration_helpers.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/database/migration_helpers.rb b/lib/gitlab/database/migration_helpers.rb
index 2ed5074fbaa..0b12e862ded 100644
--- a/lib/gitlab/database/migration_helpers.rb
+++ b/lib/gitlab/database/migration_helpers.rb
@@ -225,7 +225,7 @@ module Gitlab
# here is based on Rails' foreign_key_name() method, which unfortunately
# is private so we can't rely on it directly.
def concurrent_foreign_key_name(table, column)
- identifier = "#{table_name}_#{column}_fk"
+ identifier = "#{table}_#{column}_fk"
hashed_identifier = Digest::SHA256.hexdigest(identifier).first(10)
"fk_#{hashed_identifier}"