Sha256: 5727bf535476143eedd7588514da9d38b1c49c7d56d20e1c4648eca05567fb67
Contents?: true
Size: 529 Bytes
Versions: 10
Compression:
Stored size: 529 Bytes
Contents
class AddUpstreamNameToRepository < ActiveRecord::Migration def up add_column :katello_repositories, :docker_upstream_name, :string Katello::Repository.docker_type.each do |repo| next if repo.url.blank? update %( update #{Katello::Repository.table_name} set docker_upstream_name=#{ActiveRecord::Base.sanitize(repo.name)} where id=#{repo.id} ).gsub(/\s+/, " ").strip end end def down remove_column :katello_repositories, :docker_upstream_name end end
Version data entries
10 entries across 10 versions & 1 rubygems