bug_tracker::install::package_upgrade (private)
bug_tracker::install::package_upgrade \ -from_version_name from_version_name \ -to_version_name to_version_name
Defined in packages/bug-tracker/tcl/install-procs.tcl
Package before-upgrade callback
- 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 { 0.9d1 1.2d2 { # This is the upgrade that converts Bug Tracker to using the workflow package ns_log Notice "bug_tracker::install::package_upgrade - Upgrading Bug Tracker from 09d1 to 1.2d2" # This sets up the bug tracker package type workflow instance package_install # Create a workflow instance for each Bug Tracker project db_foreach select_project_ids {} { bug_tracker::bug::instance_workflow_create -package_id $project_id } } 1.4d2 1.4d3 { bug_tracker::search::register_implementations } 1.3a6 1.3a7 { ns_log Notice "bug_tracker::install::package_upgrade - Upgrading Bug Tracker from 1.3a6 to 1.3a7" # Previous upgrades added workflow and workflow cases but not enabled actions # for each workflow case. Bug. db_foreach select_case_ids {} { workflow::case::state_changed_handler -case_id $case_id } } 1.4d3 1.4d4 { db_foreach select_folder_ids {} { content::folder::register_content_type -folder_id $folder_id -content_type "content_revision" content::folder::register_content_type -folder_id $folder_id -content_type "image" } } 1.4d6 1.4d7 { db_foreach select_project_ids {} { set workflow_id [bug_tracker::bug::get_instance_workflow_id -package_id $project_id] db_dml update_project {} } } }XQL Not present: PostgreSQL, Oracle Generic XQL file: <fullquery name="bug_tracker::install::package_upgrade.select_project_ids"> <querytext> select project_id from bt_projects </querytext> </fullquery> <fullquery name="bug_tracker::install::package_upgrade.select_case_ids"> <querytext> select wc.case_id from workflow_cases wc, bt_bugs b where wc.object_id = b.bug_id </querytext> </fullquery> <fullquery name="bug_tracker::install::package_upgrade.select_folder_ids"> <querytext> select folder_id from bt_projects </querytext> </fullquery> <fullquery name="bug_tracker::install::package_upgrade.update_project"> <querytext> update bt_projects set workflow_id = :workflow_id where project_id = :project_id </querytext> </fullquery>packages/bug-tracker/tcl/install-procs.xql