summaryrefslogtreecommitdiff
path: root/db/post_migrate/20170525140254_rename_all_reserved_paths_again.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/post_migrate/20170525140254_rename_all_reserved_paths_again.rb')
-rw-r--r--db/post_migrate/20170525140254_rename_all_reserved_paths_again.rb102
1 files changed, 0 insertions, 102 deletions
diff --git a/db/post_migrate/20170525140254_rename_all_reserved_paths_again.rb b/db/post_migrate/20170525140254_rename_all_reserved_paths_again.rb
deleted file mode 100644
index 59b8daaffdf..00000000000
--- a/db/post_migrate/20170525140254_rename_all_reserved_paths_again.rb
+++ /dev/null
@@ -1,102 +0,0 @@
-# See http://doc.gitlab.com/ce/development/migration_style_guide.html
-# for more information on how to write migrations for GitLab.
-
-class RenameAllReservedPathsAgain < ActiveRecord::Migration[4.2]
- include Gitlab::Database::RenameReservedPathsMigration::V1
-
- DOWNTIME = false
-
- disable_ddl_transaction!
-
- TOP_LEVEL_ROUTES = %w[
- -
- .well-known
- abuse_reports
- admin
- api
- assets
- autocomplete
- ci
- dashboard
- explore
- files
- groups
- health_check
- help
- import
- invites
- jwt
- koding
- notification_settings
- oauth
- profile
- projects
- public
- robots.txt
- s
- search
- sent_notifications
- snippets
- u
- unicorn_test
- unsubscribes
- uploads
- users
- ].freeze
-
- PROJECT_WILDCARD_ROUTES = %w[
- badges
- blame
- blob
- builds
- commits
- create
- create_dir
- edit
- environments/folders
- files
- find_file
- gitlab-lfs/objects
- info/lfs/objects
- new
- preview
- raw
- refs
- tree
- update
- wikis
- ].freeze
-
- GROUP_ROUTES = %w[
- activity
- analytics
- audit_events
- avatar
- edit
- group_members
- hooks
- issues
- labels
- ldap
- ldap_group_links
- merge_requests
- milestones
- notification_setting
- pipeline_quota
- projects
- ].freeze
-
- def up
- disable_statement_timeout do
- TOP_LEVEL_ROUTES.each { |route| rename_root_paths(route) }
- PROJECT_WILDCARD_ROUTES.each { |route| rename_wildcard_paths(route) }
- GROUP_ROUTES.each { |route| rename_child_paths(route) }
- end
- end
-
- def down
- disable_statement_timeout do
- revert_renames
- end
- end
-end