Sha256: fdf9351c34fffcc5499951cb8e7dd8a7c6a7357c02bbf164a26455fc4b575ef5
Contents?: true
Size: 637 Bytes
Versions: 6
Compression:
Stored size: 637 Bytes
Contents
class UpdatePuppetPortParamType < ActiveRecord::Migration[6.0] def up update_port_type :to_i end def down update_port_type :to_s end private def update_port_type(method) puppet_class = Puppetclass.find_by :name => 'foreman_scap_client' return unless puppet_class port_key = puppet_class.class_params.find_by :key => 'port' return unless port_key if method == :to_i port_key.update_columns(:key_type => "integer", :default_value => port_key.default_value.to_i) else port_key.update_columns(:key_type => "string", :default_value => port_key.default_value.to_s) end end end
Version data entries
6 entries across 6 versions & 1 rubygems