Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Mazetto <brodock@gmail.com>2017-08-04 08:30:42 +0300
committerGabriel Mazetto <brodock@gmail.com>2017-08-22 07:33:20 +0300
commit9e6fa996eab978506af1084b79a9c3f91f6d575b (patch)
tree39cdc0aafa13c16551f4f7f244a19e94d6b8582f /db/migrate/20170802013652_add_storage_fields_to_project.rb
parent53403399577bdca0e8f0886fa62ce0e75c14a8e0 (diff)
New storage is now "Hashed" instead of "UUID"
Diffstat (limited to 'db/migrate/20170802013652_add_storage_fields_to_project.rb')
-rw-r--r--db/migrate/20170802013652_add_storage_fields_to_project.rb24
1 files changed, 2 insertions, 22 deletions
diff --git a/db/migrate/20170802013652_add_storage_fields_to_project.rb b/db/migrate/20170802013652_add_storage_fields_to_project.rb
index 269103cd472..a0815da0fcd 100644
--- a/db/migrate/20170802013652_add_storage_fields_to_project.rb
+++ b/db/migrate/20170802013652_add_storage_fields_to_project.rb
@@ -4,36 +4,16 @@
class AddStorageFieldsToProject < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
- # Set this constant to true if this migration requires downtime.
DOWNTIME = false
-
- # When a migration requires downtime you **must** uncomment the following
- # constant and define a short and easy to understand explanation as to why the
- # migration requires downtime.
- # DOWNTIME_REASON = ''
-
- # When using the methods "add_concurrent_index", "remove_concurrent_index" or
- # "add_column_with_default" you must disable the use of transactions
- # as these methods can not run in an existing transaction.
- # When using "add_concurrent_index" or "remove_concurrent_index" methods make sure
- # that either of them is the _only_ method called in the migration,
- # any other changes should go in a separate migration.
- # This ensures that upon failure _only_ the index creation or removing fails
- # and can be retried or reverted easily.
- #
- # To disable transactions uncomment the following line and remove these
- # comments:
disable_ddl_transaction!
def up
# rubocop:disable Migration/AddColumnWithDefaultToLargeTable
- add_column :projects, :uuid, :uuid
- add_column_with_default :projects, :storage_version, :integer, default: 0, limit: 1
- add_concurrent_index :projects, :uuid
+ add_column :projects, :storage_version, :integer, limit: 2
+ add_concurrent_index :projects, :storage_version
end
def down
- remove_column :projects, :uuid
remove_column :projects, :storage_version
end
end