auth::after_upgrade (private)

 auth::after_upgrade -from_version_name from_version_name \
    -to_version_name to_version_name

Defined in packages/acs-authentication/tcl/apm-callback-procs.tcl

After upgrade callback.

Switches:
-from_version_name
(required)
-to_version_name
(required)

Partial Call Graph (max 5 caller/called nodes):
%3 acs_sc::contract::operation::new acs_sc::contract::operation::new (public) acs_sc::impl::alias::new acs_sc::impl::alias::new (public) acs_sc::impl::delete acs_sc::impl::delete (public) acs_sc::impl::get_id acs_sc::impl::get_id (public) acs_sc::msg_type::element::new acs_sc::msg_type::element::new (public) auth::after_upgrade auth::after_upgrade auth::after_upgrade->acs_sc::contract::operation::new auth::after_upgrade->acs_sc::impl::alias::new auth::after_upgrade->acs_sc::impl::delete auth::after_upgrade->acs_sc::impl::get_id auth::after_upgrade->acs_sc::msg_type::element::new

Testcases:
No testcase defined.
Source code:
    apm_upgrade_logic  -from_version_name $from_version_name  -to_version_name $to_version_name  -spec {
            5.0a1 5.0a2 {
                db_transaction {

                    # Delete and recreate contract
                    auth::process_doc::delete_contract
                    auth::process_doc::create_contract

                    # The old implementation is still there, but now it's unbound

                    # We change the name of the old implementation, so we can recreate it, but don't break foreign key references to it
                    set old_impl_id [acs_sc::impl::get_id -name "IMS_Enterprise_v_1p1" -owner "acs-authentication"]
                    db_dml update { 
                        update acs_sc_impls 
                        set   impl_name = 'IMS_Enterprise_v_1p1_old' 
                        where impl_id = :old_impl_id
                    }
                    db_dml update { 
                        update acs_sc_impl_aliases
                        set impl_name = 'IMS_Enterprise_v_1p1_old' 
                        where impl_id = :old_impl_id
                    }

                    # Create the new implementation
                    set new_impl_id [auth::sync::process_doc::ims::register_impl]

                    # Update authorities that used to use the old impl to use the new impl
                    db_dml update_authorities {
                        update auth_authorities
                        set    process_doc_impl_id = :new_impl_id
                        where  process_doc_impl_id = :old_impl_id
                    }

                    # Delete the old implementation
                    acs_sc::impl::delete -contract_name "auth_sync_process" -impl_name "IMS_Enterprise_v_1p1_old"
                }
            }
            5.1.1 5.1.2d1 {
                db_transaction {

            # this is a direct update to the SC tables, we should expect a new
            # API for handling updates on SC, but since there's no one yet,
            # we'll do this way now .... (roc)

            set sc_change [list {auth_authentication.Authenticate.InputType} {auth_password.ChangePassword.InputType} {auth_password.ResetPassword.InputType}]
            set element_msg_type_name integer

            foreach msg_type_name $sc_change {
            set msg_type_id [db_string get_msg_type_id { select msg_type_id from acs_sc_msg_types where msg_type_name = :msg_type_name }]
            set element_pos [db_string get_pos { select max(element_pos) from acs_sc_msg_type_elements where msg_type_id = :msg_type_id }]
            incr element_pos

            acs_sc::msg_type::element::new  -msg_type_name $msg_type_name  -element_name authority_id  -element_msg_type_name $element_msg_type_name  -element_msg_type_isset_p f  -element_pos $element_pos
    
            }

        }
        }
            5.1.5 5.2.0a1 {
                db_transaction {

            # I will add support to MergeUser operation 
            # this is a direct update to the SC tables, 
            # we should expect a new API for handling updates on SC, 
            # but since there's no one yet, we'll do it 
            # in this way. (quio@galileo.edu)
            ns_log notice "acs_authentication: Starting Upgrade (adding merge support)"
            acs_sc::contract::operation::new  -contract_name "auth_authentication"  -operation "MergeUser"  -input { from_user_id:integer to_user_id:integer authority_id:integer }  -output {}  -description "Merges two accounts given the user_id of each one"

             acs_sc::impl::alias::new  -contract_name "auth_authentication"  -impl_name "local"  -operation "MergeUser"  -alias "auth::local::authentication::MergeUser"  
              ns_log notice "acs_authentication: Finishing Upgrade (adding merge support)"

        }
        }
            5.5.0d1 5.5.0d2 {
                auth::search::create_contract
            }

    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: