Open bodgerbarnett opened 7 years ago
Have a look at the django documentation on the dumpdata and loaddata commands; they can be used with this application.
You may need to do some pre processing on the JSON the dumpdata produces, but it's your best bet.
Are you saying that I should dumpdata from my existing db, drop the db, edit the JSON to assign the objects to the right tenants, then recreate the db and load the fixtures back in?
Is there a way I can move my existing project to use this app so that it becomes a multi-tenanted site?
We already have tons and tons of data which ought to have been split off into multiple tenants in the first place but wasn't. Now I'm trying to split it all up but I'm not sure if this app is the way to go.
If I wanted to do that, how would I go about it? Would it work?
I've got some foreign keys on some models which I could use to decide which tenants those instances should be connected to but how would I migrate them? Just write some sort of monster data migration maybe?