Sha256: 5779ae97093fa6b649e5bdb6f36e3703f7a72b9d76ba0ed3b9e3962611a067a4
Contents?: true
Size: 621 Bytes
Versions: 181
Compression:
Stored size: 621 Bytes
Contents
class ChangeRepositoryPasswordToText < ActiveRecord::Migration[5.2] def up change_column :katello_repositories, :upstream_password, :text end def down add_column :katello_repositories, :temp_upstream_password, :string, :limit => 1024 Katello::Repository.find_each do |repo| next if repo.upstream_password.blank? repo.update_column(:temp_upstream_password, repo.upstream_password.length > 1024 ? nil : repo.upstream_password) end remove_column :katello_repositories, :upstream_password rename_column :katello_repositories, :temp_upstream_password, :upstream_password end end
Version data entries
181 entries across 181 versions & 1 rubygems