diff options
Diffstat (limited to 'db/migrate/20190516155724_change_packages_size_defaults_in_project_statistics.rb')
-rw-r--r-- | db/migrate/20190516155724_change_packages_size_defaults_in_project_statistics.rb | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/db/migrate/20190516155724_change_packages_size_defaults_in_project_statistics.rb b/db/migrate/20190516155724_change_packages_size_defaults_in_project_statistics.rb deleted file mode 100644 index eba154df496..00000000000 --- a/db/migrate/20190516155724_change_packages_size_defaults_in_project_statistics.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class ChangePackagesSizeDefaultsInProjectStatistics < ActiveRecord::Migration[5.1] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - change_column_default :project_statistics, :packages_size, 0 - - update_column_in_batches(:project_statistics, :packages_size, 0) do |table, query| - query.where(table[:packages_size].eq(nil)) - end - - change_column_null :project_statistics, :packages_size, false - end - - def down - change_column_null :project_statistics, :packages_size, true - change_column_default :project_statistics, :packages_size, nil - end -end |