[Answer]-Having a master database for a django project

1đź‘Ť

âś…

Normally there is one master database — the production DB. There are three general options here:

1) If the data isn’t too sensitive and a dev doesn’t need every last change, you can simply let each dev take a dump file from production and apply it to their machine.

2) If the data is sensitive (e.g. w/ user passwords), you can create a “dummy” version of the DB and use that as the canonical data for local dev and for testing.

3) If you need every change on each user’s machine, then you can preload the entries you need with django fixture files. See https://docs.djangoproject.com/en/dev/howto/initial-data/ You can create a fixture file from a DB pretty easily. A fixture file is just text so you can put it in your git repo.

👤Nils

Leave a comment