0

I've searched for the solution on internet and here and didn't find one. It seems like something needs to be changed or added, or maybe I just did something wrong. I recently started a new project with Django and although I know a little bit of web programming and python I'm totally new to Django. Everything was ok until I decided to add a new column to my MySQL DB. So, I with easy_install I installed Django Evolution in my VirtualEnv, then I added "django_evolution" in my INSTALLED_APPS. After this, I ran 'python manage.py syncdb' Then I added a new field (preview) in my Models file:

from django.db import models

# Create your models here.

class posts(models.Model):
    author = models.CharField(max_length = 30)
    title = models.CharField(max_length = 100)
    bodytext = models.TextField()
    preview = models.TextField()
    timestamp = models.DateTimeField()

After this I ran 'python manage.py evolve --hint --execute' command. In the terminal I got an error: ConnectionRouter' object has no attribute 'allow_syncdb'

When I'm trying to access the page I get: 1054, "Unknown column 'myblog_posts.preview' in 'field list'"

It seems like for some reason a preview column can't be added to the DB with Django Evolution. What I'm doing wrong?

  • Which Django version are you using? It seems Django Evolution has been abandoned shortly after Django incorporated its own [migration framework](https://docs.djangoproject.com/en/1.7/topics/migrations/) as a core feature in 1.7. There are no notes on compatibility with 1.7 in the release notes. – knbk Mar 03 '15 at 13:27
  • I installed it a few days ago, so I guess it's the latest. If I understand right there's no need to use exs. like django evolution? Everything can be done with the migration commands? – Vitalix Mar 03 '15 at 17:13
  • Yes, everything can and probably should be done with `makemigrations` and `migrate`. – knbk Mar 03 '15 at 17:28

0 Answers0