subsite::after_upgrade (private)
subsite::after_upgrade -from_version_name from_version_name \ -to_version_name to_version_name
Defined in packages/acs-subsite/tcl/apm-callback-procs.tcl
After upgrade callback for acs-subsite.
- Switches:
- -from_version_name (required)
- -to_version_name (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: apm_upgrade_logic -from_version_name $from_version_name -to_version_name $to_version_name -spec { 5.2.0d1 5.2.0d2 { set type_id [content::type::new -content_type "email_image" -pretty_name "Email_Image" -pretty_plural "Email_Images" -table_name "users_email_image" -id_column "email_image_id"] set folder_id [content::folder::new -name "Email_Images" -label "Email_Images"] content::folder::register_content_type -folder_id $folder_id -content_type "email_image" } 5.2.0a1 5.2.0a2 { set value [parameter::get -parameter "AsmForRegisterId" -package_id [subsite::main_site_id]] if {$value eq ""} { apm_parameter_register "AsmForRegisterId" "Assessment used on the registration process." "acs-subsite" "0" "number" "user-login" } apm_parameter_register "RegImplName" "Name of the implementation used in the registration process" "acs-subsite" "asm_url" "string" "user-login" } 5.2.0a1 5.2.0a2 { set value [parameter::get -parameter "RegistrationId" -package_id [subsite::main_site_id]] if {$value eq ""} { apm_parameter_register "RegistrationId" "Assessment used on the registration process." "acs-subsite" "0" "number" "user-login" } set value [parameter::get -parameter "RegistrationId" -package_id [subsite::main_site_id]] if {$value eq ""} { apm_parameter_register "RegistrationImplName" "Name of the implementation used in the registration process" "acs-subsite" "asm_url" "string" "user-login" } } 5.2.0a2 5.2.0a3 { db_transaction { db_foreach select_group_name {select group_id, group_name from groups} { if { [namespace which ::lang::util::convert_to_i18n] ne "" } { set pretty_name [lang::util::convert_to_i18n -message_key "group_title_${group_id}" -text "$group_name"] } else { set pretty_name "$group_name" } db_dml title_update "update acs_objects set title=:pretty_name where object_id = :group_id" } } } 5.2.0a1 5.2.0a2 { set value [parameter::get -parameter "RegistrationId" -package_id [subsite::main_site_id]] if {$value eq ""} { apm_parameter_register "RegistrationId" "Assessment used on the registration process." "acs-subsite" "0" "number" "user-login" } set value [parameter::get -parameter "RegistrationId" -package_id [subsite::main_site_id]] if {$value eq ""} { apm_parameter_register "RegistrationImplName" "Name of the implementation used in the registration process" "acs-subsite" "asm_url" "string" "user-login" } } 5.2.0a2 5.2.0a3 { db_transaction { db_foreach select_group_name {select group_id, group_name from groups} { if { [namespace which ::lang::util::convert_to_i18n] ne "" } { set pretty_name [lang::util::convert_to_i18n -message_key "group_title_${group_id}" -text "$group_name"] } else { set pretty_name "$group_name" } db_dml title_update "update acs_objects set title=:pretty_name where object_id = :group_id" } } } 5.5.0d7 5.5.0d8 { db_transaction { set package_keys ([join '[subsite::package_keys]' ,]) foreach subsite_id [db_list get_subsite_ids {}] { set new_css [list] set css [parameter::get -package_id $subsite_id -parameter ThemeCSS -default ""] if { $css ne "" } { foreach css $css { lappend new_css [list [list href [lindex $css 0]] [list media [lindex $css 1]]] } parameter::set_value -package_id $subsite_id -parameter ThemeCSS -value $new_css } } } } 5.10.0d18 5.10.0d19 { if {[db_driverkey ""] eq "postgresql"} { db_transaction { db_foreach table_name {select table_name from acs_object_types} { set table_name_lc [string tolower $table_name] if {$table_name_lc ne $table_name} { ns_log notice "Fix case discrepancy in table_name attribute of acs_object_types: $table_name -> $table_name_lc" db_dml to_lower {update acs_object_types set table_name=:table_name_lc where table_name=:table_name} } } } } } 5.10.0d19 5.10.0d20 { if {[db_driverkey ""] eq "postgresql"} { db_transaction { db_foreach id_column {select id_column from acs_object_types} { set id_column_lc [string tolower $id_column] if {$id_column_lc ne $id_column} { ns_log notice "Fix case discrepancy in id_column attribute of acs_object_types: $id_column -> $id_column_lc" db_dml to_lower {update acs_object_types set id_column=:id_column_lc where id_column=:id_column} } } } } } }XQL Not present: PostgreSQL, Oracle Generic XQL file: <fullquery name="subsite::after_upgrade.get_subsite_ids"> <querytext> select package_id from apm_packages where package_key in $package_keys </querytext> </fullquery>packages/acs-subsite/tcl/apm-callback-procs.xql