Closed JakeMana closed 7 years ago
One option might be to write a Django migration in a Django app that's only installed in the tenant apps list. See: https://docs.djangoproject.com/en/1.10/howto/writing-migrations/
For some reason this is not documented (did it get deleted by accident?), but there's a hook called post_schema_sync
which is called after the tenant has been migrated.
@bernardopires I could find that hook, but I'll definitely try it. Thanks!
Is there a way to create initial data from a migration?
I plan to seed the initial PublicTenant from a migration.
This runs but the object does not get created
operations = [ migrations.RunPython(create_public_tenant, reverse_code=migrations.RunPython.noop) ]
Hi, This is not as much an issue as my question about populating tenant tables with predefined data. What Im trying to achieve is, every time new account is created and with that new tables in new schema, I want those table populate with demo data. Is there any hook I can use, because I think pre/post_save signal wont work.