-
Notifications
You must be signed in to change notification settings - Fork 5
Migrations: Changing the database
Renato Bellotti edited this page May 7, 2018
·
1 revision
Every time changes are made to a model, migrations have to be created and applied to the database in order to tell it that its structure has changed. Migrations also determine what happens to entries that already exist in the database. A migrations file contains SQL code that is executed in the database.
In the root directory of our git directory, enter the following command in the terminal:
scripts/makemigrations.sh
In the root directory of our git directory, enter the following command in the terminal:
scripts/migrate.sh
Before applying migrations to the production database, always make a backup!!!