Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9314187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T02:04:36+00:00 2026-06-19T02:04:36+00:00

Background: After adding djangoratings to my project, I tried running django-admin.py schemamigration djangoratings –initial

  • 0

Background:
After adding djangoratings to my project, I tried running

django-admin.py schemamigration djangoratings --initial 
--settings=myapp.settings.local 

which resulted in an unknown command error for schemamigration.
I tried to resolve this error by adding my project directory to the PYTHONPATH (I’m using virtualenv and virtualenvwrapper).
This resolved the unknown command error for schemamigration, but I think I specified one directory above my project directory for the PYTHONPATH and when the initial migration was run for djangoratings, it complained about something to do with whoosh (which I am using in my project). I changed the PYTHONPATH directory and tried running

django-admin.py schemamigration djangoratings --initial 
--settings=myapp.settings.local

again. Then I ran the migrate command. This is when I received the error:

django.db.utils.DatabaseError: relation "djangoratings_vote" already exists

I tried migrating all the way back using:

django-admin.py migrate djangoratings zero --settings=myapp.settings.local
Running migrations for djangoratings:
- Migrating backwards to zero state.
< djangoratings:0006_add_cookies
< djangoratings:0005_add_exclusions
< djangoratings:0004_rethink_recommendations
< djangoratings:0003_add_correlations
< djangoratings:0002_add_mean_and_stddev
< djangoratings:0001_initial

and then running –initial again, but the same error occurred after performing the migrate command.

I looked at the list of tables in my database and didn’t see any for djangoratings_vote.

My current migrations listing for djangoratings is as follows:

0001_initial.py                   0006_add_cookies.py
0001_initial.pyc                  0006_add_cookies.pyc
0002_add_mean_and_stddev.py       0007_initial.py
0002_add_mean_and_stddev.pyc      0007_initial.pyc
0003_add_correlations.py          0008_initial.py
0003_add_correlations.pyc         0008_initial.pyc
0004_rethink_recommendations.py   0009_initial.py
0004_rethink_recommendations.pyc  0009_initial.pyc
0005_add_exclusions.py            __init__.py
0005_add_exclusions.pyc           __init__.pyc

How can I resolve the relation “djangoratings_vote” already exists error? Preferably using South?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T02:04:37+00:00Added an answer on June 19, 2026 at 2:04 am

    It sounds to me as if South is out of sync with your database (this can happen if south has started creating the tables, but then fails without being able to complete the backwards migration). I would recommend manually restoring the database and south as follows (take a back up of your db first in case of a mistake):

    1. Delete all djangoratings_* tables from your database.
    2. Open up the south_migrationhistory table in the database, and filter by app name. Remove all entries for djangoratings.
    3. Delete all the migrations files in the djangoratings/migrations directory.

    Once you have done this, you should have a clean database, and south history. At this point, re run:

    ./manage.py schemamigration djangoratings --initial
    

    Which will generate a single migration file. Then:

    ./manage.py migrate djangoratings.
    

    Assuming that you don’t get the errors that you had the first time, this should set up the database so you are ready to use django ratings.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After adding a background (image) to my UIView (View_0) I wish to implement a
I have a simple program which is able to change the background color after
I need to blink between two colors:red and white. I've found that after $targetcss('background-color','red')
After certain R#-recommended edits R# colors the background of blocks of code in a
I have a background worker that stops after 100 iterations. Like this: BackgroundWorker bgWorker
I changed the background colour of the spinner.After changing the bg colour the down
Background: I want to show the time and date uptill only 1 week. After
Background The Apache Action class is not thread-safe. However, this was only realized after
Please refer to this background question. After constructing this COUNT, how would I then
I have a custom background image on one of my Wordpress login pages. After

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.