I started my model:
myapp.models.py
class MyModel(models.Model):
field_a = models.FloatField()
field_c = models.FloatField()
Then ran ./manage.py migrate
on my new project and it was all good:
Operations to perform:
Synchronize unmigrated apps: myapp
Apply all migrations: admin, contenttypes, auth, sessions
Synchronizing apps without migrations:
Creating tables...
Creating table myapp_mymodel
Installing custom SQL...
Installing indexes...
Running migrations:
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying admin.0001_initial... OK
Applying sessions.0001_initial... OK
Then I changed my model:
class MyModel(models.Model):
field_a = models.FloatField()
field_b = models.FloatField()
field_c = models.FloatField()
I ran ./manage.py migrate
again and nothing happened.
(project)$ ./manage.py migrate
Operations to perform:
Synchronize unmigrated apps: myapp
Apply all migrations: admin, contenttypes, auth, sessions
Synchronizing apps without migrations:
Creating tables...
Installing custom SQL...
Installing indexes...
Running migrations:
No migrations to apply.
I'm wondering what I need to do to make my new app migrate?
Ack, answered my own question.
What I needed to do was run:
./manage.py makemigrations myapp
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With