Replies: 2 comments 2 replies
-
@paOmer This will also resolve our discussion we had here: #27 (comment) |
Beta Was this translation helpful? Give feedback.
0 replies
-
You should not do this - you need the older migration files to track the status changes of your database - the only time you can clean up migrations is before you merge them - for example you can make sure you only add a single file for the set of changes in a given PR. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@DeanBiton @paOmer @amittcohen @ShirleyFichman
📁 Reordering
migrations
FolderDescription
Hi all,
I have noticed that if you
makemigrations
multiple times, without deleting the old migrations you already had,then Django will create for you another file that alters the old migration file.
See screenshot example:
So this could lead the
migrations
folder having some disadvantages:Solution
In the
migrations
folder, delete the files:0001_initial.py
alter
in their name.Run
makemigrations
again.Result
All those migration files you have deleted above will be updated to a new single
0001_initial.py
file.Beta Was this translation helpful? Give feedback.
All reactions