Hallöchen!

Steve Holden writes:

> On 7/27/2010 12:38 PM, Torsten Bronger wrote:
>> Hallöchen!
>> 
>> bruno desthuilliers writes:
>> 
>>> On 27 juil, 07:19, Torsten Bronger <[email protected]>
>>> wrote:
>>>
>>>> Currently, our Django app relies on the stability of various auto
>>>> ID fields which are implicitly generated by Django/database
>>>> backend.
>>>
>>> [...] From a practical POV, starting from a mint empty DB and
>>> inserting records in the same order without any other client app
>>> accessing to the DB, you should probably get the same IDs, but
>>> there's absolutely no garantee.
>> 
>> At least, they are explicitly mentioned in a "manage.py dumpdata"
>> fixture, and probably in a SQL dump, too.  But the DB may ignore
>> autofields when loading that data, right?
>
> It couldn't do that without ruining the relationships, could it? A
> dump includes the numerical values for the foreign keys, so the
> related primary keys have to stay the same to maintain relational
> integrity.

Well, it could map them possibly ... granted that there would be no
reason for it.  Okay, then I must be more precise:

If I have a model with an implicit primary key, and values of this
key are used to identify associated files on disk, is this safe?
Safe as far as restoring SQL backups, re-loading fixtures, and south
migrations are concerned?

Tschö,
Torsten.

-- 
Torsten Bronger, aquisgrana, europa vetus
                   Jabber ID: [email protected]
                                  or http://bronger-jmp.appspot.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to