简体   繁体   中英

Will migrations that I make to a django app reflect on the DB that is present in Kubernetes?

I have a Django application and I'm using MariaDB as the database. Both of them have been deployed to a namespace on kubernetes. Now I want to add an additional field, so I made changes in the models.py file in the django app. These changes were made locally - I pulled the code from GIT and just made the changes locally. Normally to apply the changes, I have to run manage.py makemigrations and manage.py migrate and all the changes would've been reflected on to the DB if the DB was present locally. So now my questions are

  1. How can I apply the changes to MariaDb that is there on Kubernetes ?
  2. Will running manage.py makemigrations and manage.py migrate locally and redeploying the django app to kubernetes solve this issue ?

TLDR;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM