scripts/reset_db.sh
author Madhusudan.C.S <madhusudancs@gmail.com>
Sat, 15 Jan 2011 21:21:19 +0530
changeset 416 265dbd81c451
parent 413 49b58b9b10a1
child 441 10f16121a46b
permissions -rwxr-xr-x
Remove initial south migrations also during reset of the database.

#! /bin/bash

sudo -u postgres dropdb pytask
sudo -u postgres createdb -O pytask pytask
rm -r pytask/profile/migrations/
rm -r pytask/taskapp/migrations/
./bin/django schemamigration profile --initial
./bin/django schemamigration taskapp --initial
./bin/django syncdb
./bin/django migrate profile
./bin/django migrate taskapp
./bin/django loaddata sites_fixture.json