I have database in PostgreSql named "tests". And i want to write sh script to syncdb it with django, run tests and then drop all tables. Can anyone suggest a proper solution? A bit of script:
DJANGO_DATABASE='tests' bin/django-admin.py syncdb
bin/django-admin.py test MyApplication #tests will use "tests" db
sudo su postgres
psql tests
drop schema public; #i think i can drop schema and then syncdb.. or i'm wrong.
exit