phpgroupware-developers
[Top][All Lists]
Advanced

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

[Phpgroupware-developers] Setup table scripts


From: Miles Lott
Subject: [Phpgroupware-developers] Setup table scripts
Date: Tue, 22 Jan 2002 21:39:42 -0600

Due to a recent controversy over table scripts (I committed
where I should not have), let me repeat what is in the setup
docs here.  This is also a clarification...

tables_baseline.inc.php should only exist for an app if there is
a change in the tables.  Normally, only tables_current.inc.php
exists until then.  At the time the tables change,
tables_current.inc.php, if it exists, should be renamed as
tables_baseline.inc.php.  a new tables_current should be created from
setup/sqltoarray.php or hand-edited to match the new table structure.
Then an upgrade routine should be created in tables_update.inc.php
to modify the table structure of baseline to make it match current.

A problem was discovered where an app had no tables, but then added
one.  In this case, the baseline file should contain an empty array,
i.e. $phpgw_baseline = array();  Then the upgrade routine would be a
CreateTable() call with the definition of the added table(s), and
tables_current would contain the same definition of the added table(s).

Apparently it also worked, at least in some installs, to have only
baseline and current that were exactly the same.  But to avoid
confusion,
please use the above method instead.  If this does not work for some
reason, it needs to be made to work, so please let me know.

-- 

Miles Lott - phpGroupWare
http://www.phpgroupware.org



reply via email to

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