Jeywanth Kannan
Jeywanth Kannan

Reputation: 41

How to delete or remove the unapplied migrations in django?

While starting my local server in Django, it shows me "17 unapplied migrations.." How can I remove this content while starting the server?

i am trying on this on my Windows Server 10

System check identified no issues (0 silenced).

You have 17 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.
July 30, 2019 - 14:53:53
Django version 2.2.3, using settings 'CalcProject.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
[30/Jul/2019 14:53:58] "GET / HTTP/1.1" 200 16348
[30/Jul/2019 14:53:58] "GET /static/admin/css/fonts.css HTTP/1.1" 304 0
[30/Jul/2019 14:53:58] "GET /static/admin/fonts/Roboto-Bold-webfont.woff HTTP/1.1" 304 0
[30/Jul/2019 14:53:58] "GET /static/admin/fonts/Roboto-Regular-webfont.woff HTTP/1.1" 304 0

Upvotes: 1

Views: 1476

Answers (2)

Deepstop
Deepstop

Reputation: 3807

Is there a good reason why you don't want to apply the migrations, which set up the Django environment in your database? If not, then as the message suggests, just execute

python manage.py migrate

Upvotes: 0

sachin dubey
sachin dubey

Reputation: 779

To apply migrations use command

python manage.py migrate

To remove migrations use fake command

python manage.py migrate --fake

but be careful before using this command .

Upvotes: 1

Related Questions