News for hackers. Stuff that matters.
Re:Ask HN: How do you maintain local database for development? by sanderson1 on Thursday February 16, 2017 @08:55AM (#13659846)
One common mistake is thinking that you need a fully-fleshed-out dataset with real data. You don't. You just need the bare-bones structure with some generic data, which can easily be accomplished with a seed file. Django calls these fixtures: https://docs.djangoproject.com/en/1.10/howto/initial-data/.

Once the initial data is seeded, you then just need to implement migrations to update the database as the structure is modified. These too are already built into Django: https://docs.djangoproject.com/en/1.10/topics/migrations/.

With those in place, every developer can have their own local environment with its own database. I personally use Nanobox (https://nanobox.io) to spin up dev environments with local databases. I then can console into the environment, run the seeding process and any migrations I need too. You just need to set up a version control workflow to keep everybody's codebase in sync.

Re:Ask HN: How do you maintain local database for development? by raviojha on Thursday February 16, 2017 @09:05AM (#13659913)
Yeah, idea to have fixtures is good. We recently migrated from django 1.4 to 1.10 and this time we are tracking all migrations in repo, so atleast the part of maintaining the schema is not a pain anymore. Thanks for mentioning nanobox, will explore.