edx platform table doesnt exist after migrate

727 views Asked by At

I created an app under edx-platform/djangoapps. Under that I created a model. After that I ran

paver update_db -s devstack

to update database and make migrations.

I login to django shell via

./manage.py lms --settings aws shell

and import my model via

from myapp.models import MyModel

it imports successfully without errors but when i ran

MyModel.objects.all()

I encounter this error:

DatabaseError: (1146, "Table 'edxapp.myapp_mymodel' doesn't exist")

What am I missing here?

1

There are 1 answers

1
Xavier Antoviaque On BEST ANSWER

Make sure you have added your new Django application to the INSTALLED_APPS list in the LMS settings:

INSTALLED_APPS = (
    ...
    'yourapp',

Then re-run the lms migrations:

$ paver update_db -s devstack