Q: Django syncdb : "columname" cannot be cast to type integer I want to deploy my Django app, when developing I used the SQLite database. In production, I want to use a PostgreSQL database.
I just setup my project, copied the models, now I want to sync my db, when I use the following command:
python manage.py syncdb

I get the following error:
File "/home/oras/webapps/leden_landing/lib/python3.4/Django-1.8.2-py3.4.egg/django/db/backends/utils.py", line 64, in execute return 
self.cursor.execute(sql, params) django.db.utils.ProgrammingError:
column "studierichting_id" cannot be cast to type integer

I don't understand how this can happen, does anybody know what I can do to solve this problem?
These are my models:
class Lid(models.Model):
    voornaam = models.CharField(max_length=30, blank=False)
    achternaam = models.CharField(max_length=30, blank=False)
    studienummer = models.IntegerField()
    studierichting = models.ForeignKey(Studie)

class Studie(models.Model):
    naam = models.CharField(max_length=30)

Since I don't have any data yet, and the database still needs to be setup, I don't understand how I can get this casting error...

A: Finally found it, like Visgean suggested, I still had some migrations. After I deleted the folder, the syncdb'ing could start :)
