Thanks very much Massimo and Philip. I had missed the fact that the id_map
parameter triggered smart updating of the reference fields. That's great
and for the moment is solves my problem.
I'll keep thinking about a longer-term solution for syncing. Here's what
I'm thinking would be desirable:
I now understand your problem better.
Have you looked into?
db.export_to_csv_file(file)
db.import_from_csv_file(file,id_map={})
https://groups.google.com/forum/#!msg/web2py/P_lBv8JKiiQ/LESBbSGikw8J
When importing from the file the id_map will recognize records from the
uuid (assuming they have
Hello Ian, Sorry we overlooked your email.
You can easily add a UUID field
from gluon.util import web2py_uuid
db.define_table('person',Field('name'),Field('uuid',compute=lambda:web2py_uuid()))
You can also create table that reference that field:
Thanks Massimo. I explained my problem a bit better (I hope) in my reply to
Philip below. There are a couple of reasons why the approach you suggest
isn't ideal, from my point of view:
1. I'm working with existing database instances (sqlite). So if I change
all of the reference fields to
After 10 days I've received no help on this. Is there something about the
question that is inappropriate?
On Wednesday, May 14, 2014 11:44:43 AM UTC-4, Ian W. Scott wrote:
I need to take an existing db and implement a UUID referencing system so
that I can sync local db's with a central
5 matches
Mail list logo