debian-mirror-gitlab/db/migrate/20181108091549_cleanup_environments_external_url.rb

19 lines
386 B
Ruby
Raw Normal View History

2018-11-29 20:51:05 +05:30
# frozen_string_literal: true
2019-02-13 22:33:31 +05:30
class CleanupEnvironmentsExternalUrl < ActiveRecord::Migration[4.2]
2018-11-29 20:51:05 +05:30
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
update_column_in_batches(:environments, :external_url, nil) do |table, query|
query.where(table[:external_url].matches('javascript://%'))
end
end
def down
end
end