# destroy the database if it exists, create a new one, run migrations, populate with fixtures
database:
	python manage.py reset_db
	python manage.py migrate
	python manage.py loaddata seeds

update_seeds:
	python manage.py dumpdata --exclude=contenttypes --indent 4 > qa_analytics/fixtures/seeds.json

create_log:
	mkdir build
	mkdir builds/logs
	touch build/logs/postgres.log

start_database:
	pg_ctl start -D /usr/local/var/postgres --log build/logs/postgres.log

database_log:
	tail -f build/logs/postgres.log

test:
	flake8 qa_dashboard
	flake8 qa_analytics
	python manage.py test
