Skip to content

Commit 44caf5f

Browse files
committed
Document how to contribute migrations.
1 parent 1ffd881 commit 44caf5f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/contributing.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,24 @@ When deploying your app, don't forget to compile the messages with::
9696
django-admin compilemessages
9797

9898

99+
Migrations
100+
==========
101+
102+
If you alter any models, a new migration will need to be generated. This step is frequently missed
103+
by new contributors. You can check if a new migration is needed with::
104+
105+
tox -e migrations
106+
107+
And, if a new migration is needed, use::
108+
109+
django-admin makemigrations --settings tests.mig_settings
110+
111+
Auto migrations frequently have ugly names like `0004_auto_20200902_2022`. You can make your migration
112+
name "better" by adding the `-n name` option::
113+
114+
django-admin makemigrations --settings tests.mig_settings -n widget
115+
116+
99117
Pull requests
100118
=============
101119

0 commit comments

Comments
 (0)