[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 1.2 to 1.3 Upgrade fun
- Subject: Re: 1.2 to 1.3 Upgrade fun
- From: Benedict White <..hidden..>
- Date: Sun, 16 Mar 2014 16:00:57 +0000
It seems there may be some issues with LedgerSMB 1.3.38 which are fixed in the SVN so you could try that.
Given how far back your centos machine is, you could perhaps bring up a test machine running a later version and then install from SVN on there and see if you can get that working, followed by updating your old database after that.
That said, hopefully someone who knows what they're talking about will be along shortly....
Kind regards
Benedict White
Lyle <..hidden..> wrote:
Hi,
Trying to upgrade from 1.2 to 1.3 has been quite an experience
thus far. Luckily I backed everything up and have been able to
revert back to the old version.
I followed the upgrade notes:
http://sourceforge.net/p/ledger-smb/code/HEAD/tree/branches/1.3/UPGRADE
The setup.pl script didn't work properly, when I looked at the
Apache SQL logs it looked like an issue with the DB.
Centos 5 comes with PostgreSQL 8.1. Seeing that the install notes
say 8.2+ I figured that might be part of the problem, so I upgraded
to PostgreSQL 9.3 using the packages direct from the PostgreSQL
site:
http://yum.postgresql.org/repopackages.php
I also added the EPEL repo to get all of those packages to install.
I restored my backed up 1.2 databases, and the ledgersmb user.
setup.pl would then run, but the resultant upgraded database was
empty :(
I saw some errors with regards to the ledgersmb users permissions,
so decided to remove that user and follow the 1.3 install
instructions to create one with the new 1.3 permissions.
That got me a bit further, and there are less errors in the apache
error log when I try to upgrade the database:
[Mon Mar 16 10:06:02 2014] [error] [client 192.168.1.10] commit
ineffective with AutoCommit enabled at
LedgerSMB/DBObject/Employee.pm line 107., referer:
http://centos.cosmicnetworks.com/ledgersmb/setup.pl
[Mon Mar 16 10:06:02 2014] [error] [client 192.168.1.10] commit
ineffective with AutoCommit enabled at LedgerSMB/DBObject/Admin.pm
line 102., referer:
http://centos.cosmicnetworks.com/ledgersmb/setup.pl
[Mon Mar 16 10:06:02 2014] [error] [client 192.168.1.10] commit
ineffective with AutoCommit enabled at scripts/setup.pl line 1051.,
referer: http://centos.cosmicnetworks.com/ledgersmb/setup.pl
[Mon Mar 16 10:06:04 2014] [error] [client 192.168.1.10] rollback
ineffective with AutoCommit enabled at lsmb-request.pl line 109.,
referer: http://centos.cosmicnetworks.com/ledgersmb/setup.pl
[Mon Mar 16 10:06:04 2014] [error] [client 192.168.1.10] commit
ineffective with AutoCommit enabled at LedgerSMB/App_State.pm line
112., referer: http://centos.cosmicnetworks.com/ledgersmb/setup.pl
But still the upgraded database is empty :(
I thought that I should start with a fresh 1.3 install, get that
working, then try the upgrades again. I dropped all of the old
tables and roles. I found this function very useful as lots of
ledger roles had been created:
BEGIN;
CREATE SCHEMA util;
CREATE OR REPLACE FUNCTION util.drop_all_roles(pattern name) RETURNS
TEXT AS $$
DECLARE
r RECORD;
sql TEXT;
res TEXT;
BEGIN
res := 'Dropped: ';
FOR r IN SELECT rolname FROM pg_roles WHERE rolname LIKE pattern
LOOP
sql := 'DROP ROLE ' || quote_ident(r.rolname);
res := res || r.rolname || ' ';
EXECUTE sql;
END LOOP;
res := substr(res, 1, length(res)-1);
RETURN res;
END;
$$ LANGUAGE plpgsql;
COMMENT ON FUNCTION util.drop_all_roles(name) IS
$$Drop all roles matching the supplied pattern.
$$;
COMMIT;
Then I could run:
SELECT util.drop_all_roles('lsmb_%');
Which cleared out all of the lsmb roles.
I renamed the ledgersmb folder and started with a fresh download.
Followed the install instructions, reconfigured ledgersmb.conf, then
ran setup.pl to create the database as instructed here:
http://sourceforge.net/p/ledger-smb/code/HEAD/tree/branches/1.3/INSTALL
Although these wasn't any option to create a database?
So I tried the prepare-company-database.sh script instead. Which
gave me:
[root@centos ledgersmb]# ./tools/prepare-company-database.sh
--company testinc
could not change directory to
"/home/accounts/public_html/ledgersmb": Permission denied
cat: ignore/tsearch2.sql: No such file or directory
cat: ignore/tablefunc.sql: No such file or directory
CREATE EXTENSION
CREATE EXTENSION
CREATE EXTENSION
UPDATE 86
ERROR: column "customer_id" does not exist
ERROR: current transaction is aborted, commands ignored until end
of transaction block
ROLLBACK
As you can imagine, from that point on it didn't work.
I've spent a fair bit of time poking with this now. The idea was
that I'd get onto the latest version, then contribute some usability
enhancements. I've calculated that I'll actually save more time in
the long run by adding some JS to prevent common usability problems,
than I've been spending fixing mistakes my book keeper makes.
Given the error I'm getting from a fresh install, there is something
wrong with the current release. Any idea when this will be
rectified?
Lyle