Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 6952d1f

Browse files
author
Greg Turner
committed
Minor update to testing docs
1 parent 87a85a0 commit 6952d1f

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

docs/contributing/testing.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,18 @@ test database and restores from `test_initial_data.sql` if available,
3232

3333
This reuses the test databases, and skips collectstatic and compress steps.
3434

35-
To achieve permanent speedip, create a data dump called `test_initial_data.sql`
35+
### To create a data dump with migrations applied
36+
37+
To achieve permanent speedup, create a data dump called `test_initial_data.sql`
3638
with migrations applied. It will be restored to the test database in
3739
`runtests.sh`, bypassing all migrations.
3840

41+
1. Create a fresh database `foo`
42+
2. Run migrations:
43+
44+
manage.py migrate
45+
46+
3. Dump the database to `test_initial_data.sql`
47+
48+
`pg_dump -O -x -f test_initial_data.sql -d foo`
3949

0 commit comments

Comments
 (0)