Background
I created a website using Django and have it deployed on AWS EB with a MySQL Amazon RDS database. Recently I added a new field to one of the existing models in my models.py file. Everything worked fine on my local server (uses local SQLite, not RDS), but when I deployed the new update to EB I get the following error when I visit any page:
OperationalError at /
(1054, "Unknown column 'old_model.new_field' in 'field list'")
Question
What did I do wrong to get the error above and what can I do to fix it?
db-migrate.config:
container_commands:
01_migrate:
command: "django-admin.py migrate"
leader_only: true
option_settings:
aws:elasticbeanstalk:application:environment:
DJANGO_SETTINGS_MODULE: app.settings