summaryrefslogtreecommitdiff
path: root/db/migrate/20171103000000_set_uploads_path_size_for_mysql.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20171103000000_set_uploads_path_size_for_mysql.rb')
-rw-r--r--db/migrate/20171103000000_set_uploads_path_size_for_mysql.rb25
1 files changed, 0 insertions, 25 deletions
diff --git a/db/migrate/20171103000000_set_uploads_path_size_for_mysql.rb b/db/migrate/20171103000000_set_uploads_path_size_for_mysql.rb
deleted file mode 100644
index 93cec87f999..00000000000
--- a/db/migrate/20171103000000_set_uploads_path_size_for_mysql.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# See http://doc.gitlab.com/ce/development/migration_style_guide.html
-# for more information on how to write migrations for GitLab.
-
-class SetUploadsPathSizeForMysql < ActiveRecord::Migration[4.2]
- include Gitlab::Database::MigrationHelpers
-
- # Set this constant to true if this migration requires downtime.
- DOWNTIME = false
-
- def up
- # We need at least 297 at the moment. For more detail on that number, see:
- # https://gitlab.com/gitlab-org/gitlab-ce/issues/40168#what-is-the-expected-correct-behavior
- #
- # Rails + PostgreSQL `string` is equivalent to a `text` field, but
- # Rails + MySQL `string` is `varchar(255)` by default. Also, note that we
- # have an upper limit because with a unique index, MySQL has a max key
- # length of 3072 bytes which seems to correspond to `varchar(1024)`.
- change_column :uploads, :path, :string, limit: 511
- end
-
- def down
- # It was unspecified, which is varchar(255) by default in Rails for MySQL.
- change_column :uploads, :path, :string
- end
-end