Added an Image Field, getting OperationalError: Column does not exist

stephan

I am using Userena, and in my profile class, I added an ImageField, now I get OperationalError, Column does not exist everytime I reach the sign up page on my site.

Here is the code below.

from django.contrib.auth.models import User
from django.utils.translation import ugettext as _
from userena.models import UserenaBaseProfile

class MyProfile(UserenaBaseProfile):
    user = models.OneToOneField(User,
                                unique=True,
                                verbose_name=_('user'),
                                related_name='my_profile')
    favourite_snack = models.CharField(_('favourite snack'),
                                       max_length=5
    coverpic = models.ImageField(upload_to="site_media/media/covers/", null=True, blank=True)

I have already ran syncdb and a South Migration dozens of times after adding the ImageField, so I'm not sure if that is the problem.

What am I doing wrong here?

awwester

South can get messed up sometimes. The database field does not exist on your database, but south thinks it does.

The solution I use when this happens is to fake a delete migration and then add the field after south thinks the field has been deleted.

  1. Comment out the coverpic line and then run ./manage.py
  2. schemamigration app --auto Run a fake migration to make south think that it's removing the field | ./manage.py migrate app --fake
  3. Uncomment the coverpic line and then run ./manage.py schemamigration app --auto
  4. Add the field ./manage.py migrate app

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

psycopg2 OperationalError: cursor does not exist

From Dev

How to resolve "ProgrammingError: Column does not exist" after adding model field

From Dev

Inserting image to BYTES column - type "binary" does not exist

From Dev

derived column is not getting added to DB

From Dev

Postgres column does not exist

From Dev

Column does not Exist in postgresql?

From Dev

OperationalError: (OperationalError) no such column

From Dev

Why am I getting Invalid column name on field names that don't exist in my model?

From Dev

column does not exist when it does

From Dev

Error for Constraint added to Field does not show for field

From Dev

Visual studio does not exist in the namespace, but reference is added

From Dev

OperationalError: No such Column

From Dev

odoo 9 - Field does not exist

From Dev

After deleting my database I'm still getting "ProgrammingError: column post_post.hash does not exist"

From Dev

MYSQL ERROR 1054 (42S22) complaint about Unknown column in 'field list' that does not exist

From Dev

How can I change the field value in a column to 'other' if the value does not exist in another table?

From Dev

Added Column to the Database is NOT getting retrieved in the View

From Dev

Firebase image object does not exist?

From Dev

Android sql column does not exist

From Dev

Prevent selection of column if it does not exist

From Dev

PostgreSQL query -- column does not exist

From Dev

Pg:Error column does not exist

From Dev

PostgreSQL "Column "foo" does not exist"

From Dev

IllegalArgumentException: column '_id' does not exist?

From Dev

No such column error when column does exist

From Dev

column <column> does not exist (Django 1.8)

From Dev

Column does not exist (creating a column in a query)

From Dev

No such column error when column does exist

From Dev

Getting "size() does not exist" error in ArrayList

Related Related

  1. 1

    psycopg2 OperationalError: cursor does not exist

  2. 2

    How to resolve "ProgrammingError: Column does not exist" after adding model field

  3. 3

    Inserting image to BYTES column - type "binary" does not exist

  4. 4

    derived column is not getting added to DB

  5. 5

    Postgres column does not exist

  6. 6

    Column does not Exist in postgresql?

  7. 7

    OperationalError: (OperationalError) no such column

  8. 8

    Why am I getting Invalid column name on field names that don't exist in my model?

  9. 9

    column does not exist when it does

  10. 10

    Error for Constraint added to Field does not show for field

  11. 11

    Visual studio does not exist in the namespace, but reference is added

  12. 12

    OperationalError: No such Column

  13. 13

    odoo 9 - Field does not exist

  14. 14

    After deleting my database I'm still getting "ProgrammingError: column post_post.hash does not exist"

  15. 15

    MYSQL ERROR 1054 (42S22) complaint about Unknown column in 'field list' that does not exist

  16. 16

    How can I change the field value in a column to 'other' if the value does not exist in another table?

  17. 17

    Added Column to the Database is NOT getting retrieved in the View

  18. 18

    Firebase image object does not exist?

  19. 19

    Android sql column does not exist

  20. 20

    Prevent selection of column if it does not exist

  21. 21

    PostgreSQL query -- column does not exist

  22. 22

    Pg:Error column does not exist

  23. 23

    PostgreSQL "Column "foo" does not exist"

  24. 24

    IllegalArgumentException: column '_id' does not exist?

  25. 25

    No such column error when column does exist

  26. 26

    column <column> does not exist (Django 1.8)

  27. 27

    Column does not exist (creating a column in a query)

  28. 28

    No such column error when column does exist

  29. 29

    Getting "size() does not exist" error in ArrayList

HotTag

Archive