apm_package_upgrade_parameters (private)

 apm_package_upgrade_parameters [ -callback callback ] parameters \
    package_key

Defined in packages/acs-tcl/tcl/apm-install-procs.tcl

Upgrades the parameters to the current version.

Switches:
-callback (optional, defaults to "apm_dummy_callback")
Parameters:
parameters (required)
package_key (required)

Partial Call Graph (max 5 caller/called nodes):
%3 apm_package_install apm_package_install (public) apm_package_upgrade_parameters apm_package_upgrade_parameters apm_package_install->apm_package_upgrade_parameters apm_parameter_register apm_parameter_register (public) apm_package_upgrade_parameters->apm_parameter_register apm_parameter_update apm_parameter_update (public) apm_package_upgrade_parameters->apm_parameter_update db_0or1row db_0or1row (public) apm_package_upgrade_parameters->db_0or1row

Testcases:
No testcase defined.
Source code:
    # Update each parameter that exists.
    foreach parameter $parameters {
        # Keep a running tally of all parameters that are in the current version.
        lassign $parameter parameter_name description section_name scope datatype min_n_values max_n_values default_value

        if {[db_0or1row parameter_id_get {
            select parameter_id from apm_parameters
            where parameter_name = :parameter_name
            and package_key = :package_key
        }]} {
            ns_log Debug "apm_package_upgrade_parameters: Updating parameter, $parameter_name:$parameter_id"
            # DRB: We don't allow one to upgrade scope and should probably throw an error.
            apm_parameter_update $parameter_id $package_key $parameter_name $description  $default_value $datatype $section_name $min_n_values $max_n_values
        } else {
            ns_log Debug "apm_package_upgrade_parameters: Registering parameter, $parameter_name."
            apm_parameter_register -scope $scope $parameter_name $description $package_key $default_value  $datatype $section_name $min_n_values $max_n_values
        }
    }
    ns_log Debug "apm_package_upgrade_parameters: Parameter Upgrade Complete."
Generic XQL file:
<fullquery name="apm_package_upgrade_parameters.parameter_id_get">
    <querytext>
      
	    select parameter_id from apm_parameters
	    where parameter_name = :parameter_name
	    and package_key = :package_key
	
      </querytext>
</fullquery>
packages/acs-tcl/tcl/apm-install-procs.xql

PostgreSQL XQL file:
packages/acs-tcl/tcl/apm-install-procs-postgresql.xql

Oracle XQL file:
packages/acs-tcl/tcl/apm-install-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: