Sha256: 4babc7a891001838112c1d6929110b16efb8dd90e63863d2b25e0f879a5461b9
Contents?: true
Size: 544 Bytes
Versions: 44
Compression:
Stored size: 544 Bytes
Contents
class AddUpstreamNameToRepository < ActiveRecord::Migration def up add_column :katello_repositories, :docker_upstream_name, :string, :limit => 255 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
44 entries across 44 versions & 1 rubygems