24Mar

Loading a dev database in Django and MySQL

Posted by Elf Sternberg as django

We all know the drill with MySQL and Django.  You have a dev database, probably compressed, and you need to roll it out so your server’s in a “pristine” state before you start running migrations and adding stuff.  And the routine typically looks something like this: gzip -dc dev_database.gz | mysql -u djanguser -p djangodb.  It is also perfectly legitimate (and less error-prone) with Django to do this instead: gzip -dc dev_database.gz | ./manage.py dbshell.

Yes, that’s painfully obvious. But sometimes, we miss the painfully obvious.

Comment Form

Subscribe to Feed

Categories

Calendar

March 2010
M T W T F S S
« Feb   Apr »
1234567
891011121314
15161718192021
22232425262728
293031