| Previous topic :: Next topic |
| Author |
Message |
VinOnTiger
Joined: 01 Feb 2007
Posts: 69
Location: Potenza - Italy
|
| Posted: Fri Jun 01, 2007 4:50 pm Post subject: 5.0.2 to 5.03 data migration error |
|
|
During the migration I had 2 errors on these stored procedure:
ALTER TABLE vtiger_parenttabrel ADD CONSTRAINT fk_2_vtiger_parenttabrel FOREIGN KEY (parenttabid) REFERENCES vtiger_parenttab(parenttabid) ON DELETE CASCADE;
ALTER TABLE vtiger_ticketgrouprelation ADD CONSTRAINT fk_1_vtiger_ticketgrouprelation FOREIGN KEY (groupname) REFERENCES vtiger_groups(groupname) ON UPDATE CASCADE;
Then I tried to execute the 2 stored procedures with the My SQL Browser
The former worked, but not the latter.
The error is:
Cannot add or update a child row: a foreign key constraint fails (`vtigercrm502/#sql-228_101`, CONSTRAINT `fk_1_vtiger_ticketgrouprelation` FOREIGN KEY (`groupname`) REFERENCES `vtiger_groups` (`groupname`) ON UPDATE CASCADE)
I'm using My SQL 5.0, PHP 5.1.6, IIS 6.0 on Win 2003 SP1.
I've not made a rollback.
Is it safe to use vTiger 5.0.3 with that error on the stored procedure, ore have I to make a rollback?
Thank you |
|
| Back to top |
|
Chris_D
Joined: 02 Jun 2007
Posts: 3
Location: Germany
|
| Posted: Sat Jun 02, 2007 2:42 pm Post subject: 5.0.2 to 5.03 data migration error |
|
|
VinOnTiger,
I had the same errors.
I think it is ok to execute the first SQL statement after the database upgrade. This worked also in my environment.
The sql statement with table vtiger_ticketgrouprelation fails because in this table there are records with empty value for field groupname. In this case this records can not have the constraint and SQL will not process the statement at all.
The solution is to add a groupname value to every record which has not yet a value for field groupname assigned.
The value must equal a value from table vtiger_groups.groupname.
After this the SQL statement worked in my environment.
Hope this helps.
Chris |
|
| Back to top |
|
VinOnTiger
Joined: 01 Feb 2007
Posts: 69
Location: Potenza - Italy
|
| Posted: Wed Jun 06, 2007 7:43 am Post subject: Re: 5.0.2 to 5.03 data migration error |
|
|
I've checked the table content with a query and the field groupname must be blank because the tickets involved are assigned to a single user, not to a group.
Is it a bug?
How can I solve the situation?
The error I'm talking about it'c common to many vTiger users that are trying to update from 502to 503.
Thank you. |
|
| Back to top |
|
jaymcd
Joined: 31 Dec 2004
Posts: 201
Location: Winnipeg, MB. Canada
|
| Posted: Wed Jun 06, 2007 3:08 pm Post subject: Re: 5.0.2 to 5.03 data migration error |
|
|
| The migration scripts seem to be VERY flaky and do not work properly. There seeems to be a good deal of issues. |
|
| Back to top |
|
rbennett
Joined: 04 Apr 2006
Posts: 148
Location: Chicago, IL
|
| Posted: Wed Jun 06, 2007 5:40 pm Post subject: Re: 5.0.2 to 5.03 data migration error |
|
|
Yes I am having a heck of a time migrating from 5.02 to 5.03. Is there a script that makes the changes to the DB manually?
Another question is that what kind of DB changes are there from 5.02 to 5.03? If I have those changes then I would be able to create a script specific to my needs.
It seems as if there are a lot of people that are having this issue. You would think that migration would be more of a topic because there are so many people that are currently depending on vtiger and will need the option to convert the DBs to move to the newer version.
If I take my 5.02 DB and try and connect 5.03 to it all I get is a blank index/login screen.
Does anyone have any ideas? |
|
| Back to top |
|
dagr
Joined: 06 May 2005
Posts: 28
|
| Posted: Wed Jun 06, 2007 6:48 pm Post subject: Re: 5.0.2 to 5.03 data migration error |
|
|
| I have a 5.0.2 system running and getting a bit worried about these migration problems. As I don't have that much data, would it be better to install 5.0.3 as a new install and then semi-manually transfer over the tabled data? |
|
| Back to top |
|
rbennett
Joined: 04 Apr 2006
Posts: 148
Location: Chicago, IL
|
| Posted: Wed Jun 06, 2007 9:27 pm Post subject: Re: 5.0.2 to 5.03 data migration error |
|
|
yeah... I was thinking about doing the same thing, but in order to do that dont we need to know the db changes from the 5.02 and 5.03 versions?
You know I had these same issues when i upgraded from 5.01 and 5.02. There needs to be more knowledge and resources directed towards migration. I think it is an underestimated topic. |
|
| Back to top |
|
| |