diff options
Diffstat (limited to 'db/migrate/20200116175538_update_timestamp_softwarelicensespolicy.rb')
-rw-r--r-- | db/migrate/20200116175538_update_timestamp_softwarelicensespolicy.rb | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/db/migrate/20200116175538_update_timestamp_softwarelicensespolicy.rb b/db/migrate/20200116175538_update_timestamp_softwarelicensespolicy.rb deleted file mode 100644 index 5ed797e33a3..00000000000 --- a/db/migrate/20200116175538_update_timestamp_softwarelicensespolicy.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# See http://doc.gitlab.com/ce/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class UpdateTimestampSoftwarelicensespolicy < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - time = Time.zone.now - - update_column_in_batches(:software_license_policies, :created_at, time) do |table, query| - query.where(table[:created_at].eq(nil)) - end - - update_column_in_batches(:software_license_policies, :updated_at, time) do |table, query| - query.where(table[:updated_at].eq(nil)) - end - end - - def down - # no-op - end -end |