Commit 26909fe4 authored by Yorick Peterse's avatar Yorick Peterse

Merge branch '672-import_url-nil_migration' into 'master'

Projects without import_url cannot be mirrors

See merge request !463
parents 33a0535f 025a32e3
...@@ -8,6 +8,7 @@ v 8.9.0 (unreleased) ...@@ -8,6 +8,7 @@ v 8.9.0 (unreleased)
- Add API endpoint for Merge Request Approvals !449 - Add API endpoint for Merge Request Approvals !449
- Distribute RepositoryUpdateMirror jobs in time and add exclusive lease on them by project_id - Distribute RepositoryUpdateMirror jobs in time and add exclusive lease on them by project_id
- [Elastic] Move ES settings to application settings - [Elastic] Move ES settings to application settings
- Disable mirror flag for projects without import_url
v 8.8.5 v 8.8.5
- Make sure OAuth routes that we generate for Geo matches with the ones in Rails routes !444 - Make sure OAuth routes that we generate for Geo matches with the ones in Rails routes !444
......
# RemoveWrongImportUrlFromProjects migration missed setting the mirror flag to false when making import_url nil
# for invalid URIs that why we need this migration.
class DisableMirrorWithoutImportUrl < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
def up
execute("UPDATE projects SET mirror = false WHERE projects.mirror = true AND (projects.import_url IS NULL OR projects.import_url = '')")
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment