Well, not really. I would like to shard the db, but probably i can just build a function to write on DB1 or DB2 depending on the user id, this should be feasible, isn't it?
then i'll check how to export based on user_id. that's a nice idea, i just have to figure out how to do with all the references among tables. On Thu, Oct 6, 2016 at 10:45 AM, Erik Cederstrand <erik+li...@cederstrand.dk > wrote: > > > Den 6. okt. 2016 kl. 09.54 skrev Stefano Tranquillini < > stefano.tranquill...@gmail.com>: > > > > Hi all, > > > > I quickly skimmed into the group but i did not find an updated answer. > > > > what i want to do is to have a database for each user that register to > my service, the structure of the databse is the same for all, the data are > just separated. > > I want to do this for two reasons: > > - be able to move database of users from place to place > > - be able to dump and restore single user databases > > While your proposal is probably feasible, I would expect heavier arguments > than the above to accept the added complexity and possible fighting with > Django the get it to work. > > Unless you have clear technical or legal requirements that dictate > separate databases, just write export and import scripts that know to do > "WHERE user_id = XXX" on the relevant tables. > > Erik > > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Django users" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/django-users/PZmuOiZ06vI/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/django-users/5FDDA79F-D343-4B8E-A0A4-514B6E75115D%40cederstrand.dk. > For more options, visit https://groups.google.com/d/optout. > -- Stefano -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPQ1%3DkCvJUn50ZKXRhefC%2BJJiV3YOLwasO_jhjVDn-E24bcAvA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.