Revision [917]

This is an old revision of HOWTOupgrade made by PhilDaintree on 2007-12-01 15:46:58.

 

Guide to Upgrading


Note there are notes specific to different versions: Upgrading to 3.05 see: to305

General Upgrading

This is an example from 3.0 to latest CVS version of 3.04/05
Assuming your on a linux system and have CVS installed.

mkdir /tmp/weberp-cvs
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/web-erp login
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/web-erp co -P webERP
cvs -z3 update -d -P

Backup your MySQL database with whichever tool you understand and know how to restore a backup with.

Using mysqldump :

#mysqldump -u weberp_db_user - p weberp_db_pwd weberp > weberp.sql

where weberp_db_user is the mysql user name that has access to the weberp database, weberp_db_pwd is the user's password and weberp is the name of the weberp database. A new file containing the sql statements necessary to restore the database will be created called weberp.sql under the current directory.

If your webERP database is called "weberp", add the line at the top of each upgrade script

use weberp;

Change the "weberp" to the name of your database if it is not called weberp.

With each new version the necessary changes to the database are contained in sql scripts under the sql/mysql directory of the format

upgradeX.XX_Y.YY.sql

where X.XX is the version to upgrade from and Y.YY is the version to upgrade to.

The command to upgrade the database is as follows:

mysql -uUSER -pPWD < path_to_upgraded_webERP_install/sql/mysql/upgradeXX.X-YY.Y.sql

Repeat the command using each upgrade script in sequence - starting from your current version of webERP.

There should be no errors, if there are, stop now and investigate as the new scripts will not work if errors were returned.

! Backup the old weberp script directories. !
Whenever you modify scripts in webERP you should copy these outside the webERP directory tree -these will provide the checklist of the functionality you need to rework with the new database structure of the upgraded database. Ultimately it could well save you effort if you wish to stay current with the latest webERP scripts to consider contributing your modifications where they are done in a generic way back to the webERP project so they get incorporated in the next release.

Now copy the new WebERP scripts over the old scripts, eg.

cp newcvs_erp/* /var/www/html/current_erp/ -Rf

Edit the new config.php file and set the variables.

cp companies/weberp companies/yourdatabase -R

copy from the backup directory, your logo.jpg file into companies/yourdatabase/

cp part_pics/* companies/yourdatabase/part_pics -Rf

Copy over any customised PDF or Report templates from your script backup (ie. invoices, packing slips etc)

chown apache.apache current_erp/* -R

Remove any existing session files ( for example from /tmp/.current_erp_sessions/ )

Log in to your new system

Run the Z_Upgrade_3.01-3.02.php script (as of 28/1/06 the script may not exit cleanly, but the changes are made correctly)

Go to Setup and check your Company Preferences, there will be some changes to options that you may need to update.

Note the Address fields have changed.

If you are in Australia, and had Australian GST setup OK in 3.00, you must go to Tax Group Maintenance, Edit Default Tax Group, and Add the Australian GST to the Assigned Taxes Tax Group.

A bug from CVS versions before 24/1/2006, led that a field needs to be added to the table "config, add field

'SO_AllowSameItemMultipleTimes' with value '1'. Fixed in post 28/1/2006 versions.

! Backup the new database before entering any transactions, if you have made a mistake, then you can fix it and reload the database!
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki