@@ -39,7 +43,7 @@ class RemoveWrongImportUrlFromProjects < ActiveRecord::Migration
defreplace_data_credentials(data)
data_hash=YAML::load(data['data'])ifdata['data']
ifdefined?(data_hash)&&data_hash
ifdefined?(data_hash)&&!data_hash.blank?
update_with_encrypted_data(data_hash,data['id'])
end
end
...
...
@@ -83,7 +87,7 @@ class RemoveWrongImportUrlFromProjects < ActiveRecord::Migration
#Github projects with token, and any user:password@ based URL
defprojects_with_wrong_import_url
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_url LIKE '%//%@%'")