I am trying to filter my database by the availablity of users. The availability is set up using a time (either morning, afternoon, evening, or afterhours) and a day (example: 20)
The models in question are as follows:
class Profile(LocationModel):
    # Link with User Account, contains name and creation as well
    user = models.OneToOneField(User)
    avatar = models.BinaryField(null=True)
    # Personal Info
    birthday = models.DateField('birthdate', null=True)
    gender = models.CharField('gender',max_length=15)
    # Conections to other Databases
    def __str__(self): 
        return self.user.username    
User.profile = property(lambda u: Profile.objects.get_or_create(user=u)[0])
class Availability(models.Model):
     time = models.CharField(max_length = 11)
     day = models.CharField( max_length = 2)
     profile = models.ManyToManyField(Profile)
     def __str__(self):
        return "%s %s" % (self.time , self.day)
To test I open the shell run a script to populate the db with time/day info and then do the following:
  a = Availability.objects.all()[0]   # stores a time and days
    profile = Profile.objects.get(id=2) # stores the user
    a.profile.add(profile) 
enter code here
    Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/related.py", line 924, in add
    self._add_items(self.source_field_name, self.target_field_name, *objs)
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/related.py", line 1028, in _add_items
    new_ids = new_ids - set(vals)
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 141, in __iter__
    self._fetch_all()
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 966, in _fetch_all
    self._result_cache = list(self.iterator())
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 1202, in iterator
    for row in self.query.get_compiler(self.db).results_iter():
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 700, in results_iter
    for rows in self.execute_sql(MULTI):
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 786, in execute_sql
    cursor.execute(sql, params)
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 81, in execute
    return super(CursorDebugWrapper, self).execute(sql, params)
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 65, in execute
    return self.cursor.execute(sql, params)
  File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py", line 94, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 65, in execute
    return self.cursor.execute(sql, params)
ProgrammingError: relation "backend_service_availability_profile" does not exist
LINE 1: ...d_service_availability_profile"."profile_id" FROM "backend_s...
I am fairly new to django so I may be making a simple mistake, but for the life of me I can't figure it out. I have done migrate, makemigrations, and syncdb since making changes and it still gives the same error. I am using Django Version 1.7 Thanks!
