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:
authorJames Lopez <james@jameslopez.es>2016-03-21 20:38:06 +0300
committerJames Lopez <james@jameslopez.es>2016-03-21 20:38:06 +0300
commit868e4918f93021430162ec097d3362f313a4bb80 (patch)
tree5f921e6d7359deb45eca2e2a772bd4cef3582eb0 /db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb
parent19bfdcf4689e9c994f5a630da9cff75e5baa0e55 (diff)
updated migration
Diffstat (limited to 'db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb')
-rw-r--r--db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb b/db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb
index 6b4b6726fc5..cf6b983323e 100644
--- a/db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb
+++ b/db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb
@@ -36,8 +36,7 @@ class RemoveWrongImportUrlFromProjects < ActiveRecord::Migration
end
def projects_with_wrong_import_url
- # TODO Check live with #operations for possible false positives. Also, consider regex? But may have issues MySQL/PSQL
- select_all("SELECT p.id, p.import_url FROM projects p WHERE p.import_url IS NOT NULL AND (p.import_url LIKE '%//%:%@%' OR p.import_url LIKE 'https___#{"_"*40}@github.com%')")
+ select_all("SELECT p.id, p.import_url FROM projects p WHERE p.import_url IS NOT NULL AND p.import_type = 'github' AND p.import_url LIKE '%//%:%@%'")
end
def project_import_data(project_id)