This web2py group thread may be of help: https://groups.google.com/forum/?fromgroups=#!topic/web2py/0X3ykXLmcEQ
Also see issue: http://code.google.com/p/web2py/issues/detail?id=796 If I understand it correctly, it has been implemented in trunk. On Tue, Aug 21, 2012 at 6:14 AM, Alan Etkin <[email protected]> wrote: > I am looking at the dal.Table.import_... function and It looks like > the increment loop is made in case there are no contiguous ids. I'm > trying also to modify the function so it can be set to use the old ids > if specified. I'll submit a patch to issues if I am able to test it > and works > > Thanks > > 2012/8/20 howesc <[email protected]>: > > given that each DB implements auto_increment differently that can be > tricky. > > i know that some of them you would have to set a > > super-secret-really-well-known variable to let it know where to start the > > IDs at for the next insert when done. i suspect this works differently > per > > DB and could be tricky to implement fully. :( > > > > > > > > > > On Monday, August 20, 2012 7:33:31 AM UTC-7, Alan Etkin wrote: > >> > >> Is there any parameters configuration to pass so table.import_from_csv > >> keeps old ids and does not create a different id sequence? > >> If not, It would be possible to add the option, so when migrating data > >> between databases ids can be preserved (provided that the user be warned > >> that it'is not recommended)? > >> > >> What I want to do is to move a sqlite development database to postgres, > >> but I need to keep id numbers, because there are lots of static links > with > >> id as arguments that will not be mapped by the default method. > > > > -- > > > > > > > > -- > > > > -- Alexei Vinidiktov --

