phpgroupware-developers
[Top][All Lists]
Advanced

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

[Phpgroupware-developers] how does setup work


From: totschnig . michael
Subject: [Phpgroupware-developers] how does setup work
Date: Fri, 30 May 2003 00:58:55 -0400
User-agent: Gnus/5.090008 (Oort Gnus v0.08) XEmacs/21.4 (Common Lisp, i386-redhat-linux)

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





reply via email to

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