This forum is now just an archive. Use the new Q&A website
It is currently Sat Apr 19, 2014 7:37 pm

All times are UTC + 2 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Database Migration (Version 5 to version 6)
PostPosted: Mon Aug 16, 2010 8:04 am 
Offline

Joined: Mon Aug 02, 2010 8:13 am
Posts: 8
Location: beijing, china
I have recently migrated a version 5 database to a version 6 database using a c# program that i wrote. Considering i can utilize this data in version 6 with relatively few problems, I would consider my migration a success.

If anyone has any thoughts, questions, or suggestions about migrating OpenErp databases, please post them on this thread.

I will start with a simple suggestion:

If you are migrating data from version 5 to version 6, you will need to address the sequences for all of the tables which you are migrating. This is because the sequences do not automatically detect lowest available index with which to create a row, they just have an initialized constant that they start assigning unique ids with.

In other words, you will have to augment the sequence table using a statement like this:

select setval('<table_name>', starting index);


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 16, 2010 11:01 am 
Offline

Joined: Wed Jul 09, 2008 6:31 pm
Posts: 457
This exists:
http://kndati.lv/index.php/en/openerp/open-erp-addons/data-migration

since migration of 4.2 -> 5.0.x versions.
As far as I know it if the first and only existing tool designed and complete for automating data migration between OpenERP (OpenObject) setups.

As we have had success with migrating our own and customer installations, I am sure we will continue developing this project. We will test it on migrating bases from 5.0 to 6.0. I have no doubt it will need some modifications, but they would not be extensive.

It is completely free, you just need to create migration scenarios (from UI) for your particular base, or if you not want to spend time on creating scenarios yourself, feel free to contact us if you need migration or data move services:
* 4.2 -> 5.0;
* 5.0 <-> 5.0;
* any other combination;

Best regards,
Kaspars
--------------------------
http://kndati.lv


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 16, 2010 11:36 am 
Offline

Joined: Mon Aug 02, 2010 8:13 am
Posts: 8
Location: beijing, china
sraps,

could you discuss how your application deals with the constraints which exist in an openerp database instance?

i tried to use the following from pgAdmin III:

update pg_constraint set condeferrable = 't';
set constraints all deferred;

but this did not work for some reason, so i had to disable them manually.

if some one could please tell me why this did not work then i would appreciate it.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 16, 2010 2:03 pm 
Offline

Joined: Wed Jul 09, 2008 6:31 pm
Posts: 457
@ianmcdavid

it automatically detects correct order of object creation and linkage, so all constraint definitions are being left intact. Module does work on OpenObject application server level rather than database level, so all the data are pumped in through (and validated) the application server. Once you have set up your migration scenario, you have working data in new database.

Ok, this approach is slower than working on database level, but it is possible to migrate just some of the data, for example, not touching or just update the data created in the database initialization step.

And, of course, you define your scenario from OpenERP UI, not coding dirty single use disposable scripts, because from base to base most of scenarios are reusable. There may be need for python code snippets, but they are placed from UI where they are going to be applied (just for truncating data, merging several objects or splitting one object to several), this is in case of more complicated scenarios.

Best regards,
Kaspars
------------------------------
http://kndati.lv


Top
 Profile  
 
 Post subject: Re: Database Migration (Version 5 to version 6)
PostPosted: Fri Nov 12, 2010 5:30 pm 
Offline

Joined: Fri Feb 02, 2007 10:30 am
Posts: 265
Location: Switzerland
Hi,

And is it ready (or tryable) to migration V5 to V6 RC1 ?

Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC + 2 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:

Protected by Anti-Spam ACP