Hi Van,

 

Thank you very much for your help.  I suspect that the problem is that as
our builds have been failing due to the time zone problem our war files has
not been updated.  We should not have run the build_db target last week.  I
read somewhere that when Mifos starts up it will automatically run the
upgrade scripts if necessary.  We ran the build_db target because we thought
it was prudent to run to make sure that the DB schema was up to date, as we
really do not have much test data entered at this time.  This was before we
knew about the upgrade scripts.  This was a mistake on our part.  We will
not run the build_db anymore unless we are setting up a new system or just
want to start with a clean DB, and of course if our war file is up to date.

 

I did see the log remark about the upgrade to 154, but I did not connect the
dots, i.e. that our AP was out of sync due to build failures.  We should
have either manually deployed, or skipped the tests in the build.  Hopefully
someday we will be an asset instead of a liability.

 

Thanks so much for the help,

 

Gary

 

P.S.  Does anyone happen to know why we are getting the SQL errors when
trying to run the downgrade scripts?  This is not a priority, I would just
like to know if perhaps we have another problem incase I do need to
downgrade for some other reason in the future.  Again this is not a priority
at this point. Thanks again!

  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Van
Mittal-Henkle
Sent: Friday, November 02, 2007 8:00 AM
To: Developer
Subject: Re: [Mifos-developer] Mifos Database Upgrade error

 

Hi Gary,

 

It looks like you're haviing some trouble with a mismatch between the WAR
file you're using and the source code you have checked out.

 

Running the ant build target "build_db" will create a clean new version of
the database for you to use.  The database version will correspond to what
is in the revision of the source code you have checked out.  The database
version and application version have been at 154 since revision 12167 which
was committed on October 23rd.  This means that you are using a WAR file
built before revision 12167 but that the current source code you have
checked out is at or after revision 12167.

 

I would recommend that you go through the following steps:

 

1) do an svn update to get the latest revision of mifos

2) build a new WAR file using the latest revision

3) remove the current war file you are using and replace it with the new WAR
file

4) run the ant build target "build_db" to start from a clean DB that is at
the same version as the WAR file

5) restart your app server and you should be up and running

 

Let us know if this works for you.

 

Cheers,

--Van

 

  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gary
Weberg
Sent: Tuesday, October 30, 2007 10:40 AM
To: 'Developer'
Subject: [Mifos-developer] Mifos Database Upgrade error

Hello,

 

We are getting a Mifos Database upgrade error. See attached doc file.  The
error indicated that our Application DB version is 153, yet the Database
version is 154.  I found the SQL scripts to downgrade the DB from 154 153.
When I run the SQL scripts I get the errors:

 

Line 1:  Error on rename of '.\mifos\#sql-620_2' to '.\mifos\loan_Account'
(errno: 150)

Line 2:  Duplicate column name 'PARENT'_ACCOUNT_ID'

 

The script is:

 

ALTER TABLE LOAN_ACCOUNT DROP COLUMN PARENT_ACCOUNT_ID;

ALTER TABLE LOAN_ACCOUNT ADD COLUMN  PARENT_ACCOUNT_ID INTEGER;

 

ALTER TABLE LOAN_ACCOUNT ADD FOREIGN KEY (PARENT_ACCOUNT_ID)

  REFERENCES  ACCOUNT(ACCOUNT_ID) ON DELETE NO ACTION  ON UPDATE NO ACTION;

  

 

UPDATE DATABASE_VERSION SET DATABASE_VERSION = 153 WHERE DATABASE_VERSION =
154;

 

Does anyone know what is causing the SQL errors?

 

I removed all the lines except the last and at least I can get the DB
version changed.  This allows us to access Mifos again, but without altering
the tables.

 

Also, I suppose by running the ANT target build_db that I upgraded the DB to
154, but the AP was still at 153.  Is this normal to upgrade the DB schema
prior to upgrading the DB?  This was been an issue for more than a week now.
We waited a week hoping the AP would be brought up to version 154.

 

Thanks for the help,

 

Gary

 

 

 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

Reply via email to