django migrate database

after creating the database schema (models), it’s required to include the models/schema into the INSTALLED_APPS in the setting to make the migration work:

Using models¶
Once you have defined your models, you need to tell Django you’re going to use those models. Do this by editing your settings file and changing the INSTALLED_APPS setting to add the name of the module that contains your

For example, if the models for your application live in the module myapp.models (the package structure that is created for an application by the startapp script), INSTALLED_APPS should read, in part:

When you add new apps to INSTALLED_APPS, be sure to run migrate, optionally making migrations for them first with makemigrations.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s