phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpgroupware-developers] how does setup work


From: Dan Kuykendall
Subject: Re: [Phpgroupware-developers] how does setup work
Date: Thu, 29 May 2003 22:43:13 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030507

You should never have the same action in each of the versions setups.

address@hidden wrote:

Hello,

When working on the tables_update functions for sitemgr, I realized
that the different upgrade functions are not only executed when it
seems appropriate, but every time setup is run. For example:


        $test[] = '0.9.15.003';
        function sitemgr_upgrade0_9_15_003()
        {
                global $setup_info,$phpgw_setup;
                $setup_info['sitemgr']['currentver'] = '0.9.15.004';

        echo "upgrading from 0.9.15.003 to 0.9.15.004";
        //insert something into database

                return $setup_info['sitemgr']['currentver'];
        }

        $test[] = '0.9.15.004';
        function sitemgr_upgrade0_9_15_004()
        {
                global $setup_info,$phpgw_setup;
                $setup_info['sitemgr']['currentver'] = '0.9.15.005';

        echo "upgrading from 0.9.15.004 to 0.9.15.005";

                return $setup_info['sitemgr']['currentver'];
        }

When 0.9.15.004 is installed and I upgrade to 0.9.15.005, I see both
message:
upgrading from 0.9.15.003 to 0.9.15.004
upgrading from 0.9.15.004 to 0.9.15.005

This is a great problem, since function  sitemgr_upgrade0_9_15_003
changes the database in a way that is harmful when it is done
twice. So that after I upgrade to upgrading from 0.9.15.004 to 0.9.15.005 the database is corrupted.

Is this problem known to others, or is there something wrong with the
way I use the setup functions?

Michael



_______________________________________________
Phpgroupware-developers mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/phpgroupware-developers





reply via email to

[Prev in Thread] Current Thread [Next in Thread]