2017-04-12 14:26:02 -04:00
|
|
|
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
|
|
|
|
# for more information on how to write migrations for GitLab.
|
|
|
|
|
|
|
|
class RenameReservedDynamicPaths < ActiveRecord::Migration
|
2017-04-25 08:10:04 -04:00
|
|
|
include Gitlab::Database::RenameReservedPathsMigration::V1
|
2017-04-12 14:26:02 -04:00
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
|
|
|
DISALLOWED_ROOT_PATHS = %w[
|
2017-04-25 08:10:04 -04:00
|
|
|
-
|
|
|
|
abuse_reports
|
2017-04-12 14:26:02 -04:00
|
|
|
api
|
|
|
|
autocomplete
|
|
|
|
explore
|
2017-04-25 08:10:04 -04:00
|
|
|
health_check
|
2017-04-12 14:26:02 -04:00
|
|
|
import
|
|
|
|
invites
|
|
|
|
jwt
|
2017-04-25 08:10:04 -04:00
|
|
|
koding
|
|
|
|
member
|
|
|
|
notification_settings
|
2017-04-12 14:26:02 -04:00
|
|
|
oauth
|
|
|
|
sent_notifications
|
2017-04-30 14:06:11 -04:00
|
|
|
unicorn_test
|
2017-04-25 08:10:04 -04:00
|
|
|
uploads
|
2017-04-14 14:07:34 -04:00
|
|
|
users
|
2017-04-12 14:26:02 -04:00
|
|
|
]
|
|
|
|
|
2017-04-25 08:10:04 -04:00
|
|
|
DISALLOWED_WILDCARD_PATHS = %w[
|
|
|
|
environments/folders
|
|
|
|
gitlab-lfs/objects
|
|
|
|
info/lfs/objects
|
|
|
|
]
|
2017-04-12 14:26:02 -04:00
|
|
|
|
2017-04-30 14:06:11 -04:00
|
|
|
DISSALLOWED_GROUP_PATHS = %w[
|
|
|
|
activity
|
2017-05-04 12:11:31 -04:00
|
|
|
analytics
|
|
|
|
audit_events
|
2017-04-30 14:06:11 -04:00
|
|
|
avatar
|
|
|
|
group_members
|
2017-05-04 12:11:31 -04:00
|
|
|
hooks
|
2017-04-30 14:06:11 -04:00
|
|
|
labels
|
2017-05-04 12:11:31 -04:00
|
|
|
ldap
|
|
|
|
ldap_group_links
|
2017-04-30 14:06:11 -04:00
|
|
|
milestones
|
2017-05-04 12:11:31 -04:00
|
|
|
notification_setting
|
|
|
|
pipeline_quota
|
2017-04-30 14:06:11 -04:00
|
|
|
subgroups
|
|
|
|
]
|
|
|
|
|
2017-04-12 14:26:02 -04:00
|
|
|
def up
|
|
|
|
rename_root_paths(DISALLOWED_ROOT_PATHS)
|
|
|
|
rename_wildcard_paths(DISALLOWED_WILDCARD_PATHS)
|
2017-04-30 14:06:11 -04:00
|
|
|
rename_child_paths(DISSALLOWED_GROUP_PATHS)
|
2017-04-12 14:26:02 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
# nothing to do
|
|
|
|
end
|
|
|
|
end
|