S
S
s_katala2018-05-11 15:15:02
Django
s_katala, 2018-05-11 15:15:02

How to update the database after changing the model?

Good day!
Tell me how to update, or rather add a column to the table, after changing the model?
For example it was

class Post(models.Model):
  title = models.CharField(max_length=100)

It became
class Post(models.Model):
  title = models.CharField(max_length=100)
  text = models.TextField()

I run python3 manage.py migrate and makemigrations
Console says no new tables to migrate

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question