Hi Nazir, Thank you so much for the explanation of what was wrong and how you fixed it.
Also, thank you for checking in a fix for this so promptly. That is very much appreciated :) I'll try the upgrade again and let you know the outcome. Thanks, Aliya > -----Original Message----- > From: Nazir LAJDEL [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 08, 2007 1:08 PM > To: Aliya Walji; Developer > Cc: [EMAIL PROTECTED] > Subject: RE: [Mifos-developer] Errors in DB Upgrades to v154 > > Hello Aliya! > > I have looked into the problems and I was able to reproduce this issue. > Indeed, the problem was in the upgrade to 154; > > I explain: > I have to modify a Foreign Key constraint FOREIGN KEY (PARENT_ACCOUNT_ID) > REFERENCES ACCOUNT (ACCOUNT_ID) And I would like to change it to: > FOREIGN KEY (PARENT_ACCOUNT_ID) REFERENCES LOAN_ACCOUNT (ACCOUNT_ID). > > This works in ORACLE but doesn't seem to work in MySQL : > ALTER TABLE LOAN_ACCOUNT MODIFY CONSTRAINT my_fk FOREIGN KEY... > (Where "my_fk" is the name of the foreign key constraint) > > So,I think in MySQL I have to do this: > ALTER TABLE LOAN_ACCOUNT DROP FOREIGN KEY my_fk; > Then, > ALTER TABLE wrongs ADD CONSTRAINT my_fk FOREIGN KEY... > > But the problem now that I didn't name my Foreign Key constraint when > creating. > > I found the way to do it: SHOW CREATE TABLE LOAN_ACCOUNT; > That shows the table Specification, including the Foreign Key Constraint > Name. > > After that, I added the new Foreign Key Constraint and it seems good. > So far all is well, except that when I run the LatestTest, I get error : > Unknown foreign key name : loan_account_ibfk_12. > > Because, Mayfly does not currently allow dropping a column with a foreign > key (nor do the same naming of foreign key as MySQL). > > Finally, I found a small tip to fix this problem and it worked. But from > now on, though, I will always name my constraints, because it is easier to > retrieve them afterwards if I want to drop or modify them. > > I have checked in modifications under revision 12180. > > I wish to sincerely apologize to the Mifos community for the upgrade > failure from DB v153 to DB v154. > > Aliya, please let me know if the problem persist. > > Regards, > -Nazir > > > > > -----Message d'origine----- > De : [EMAIL PROTECTED] [mailto:mifos- > [EMAIL PROTECTED] De la part de Aliya Walji > Envoyé : Thursday, November 08, 2007 1:52 AM > À : Nazir LAJDEL > Cc : [EMAIL PROTECTED]; Developer > Objet : [Mifos-developer] Errors in DB Upgrades to v154 > Importance : Haute > > Hi Nazir, > > A few people, including myself, have tried to upgrade our versions of > the application to the latest version of the code, however the upgrades > are failing from DB v153 to DB v154. > > I've open a bug in the issue tracker for this and assigned it to you > (https://mifos.dev.java.net/issues/show_bug.cgi?id=1503) because from > what I could tell, the upgrade to v154 was associated with a change you > checked in. > > Can you please look into this as soon as possible so we can update our > application versions to test the latest code? This is blocking us from > looking at the latest features. You will probably have to look at both > the DB upgrade and downgrade to and from v154. > > If I'm mistaken and this issue is not caused by your changes, I > apologize in advance. Let me know if you can tell who might have caused > this issue and we can assign the bug to them to look into. > > As a note to all Mifos developers on the list - can you ensure that when > you check in changes that include DB upgrades and downgrades that you > test this piece explicitly against an actual DB to ensure that it works > (ideally against a clean DB and also a DB populated with some data)? > > > > > Thank you, > > Aliya > > > ------------------------------------------------------------------------- > 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/ > > ------------------------------------------------------------------------- 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/
