0

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?

user3631341
  • 515
  • 2
  • 5
  • 16

1 Answers1

1

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
  • It worked the first time. But when I make changes to my model and ran paver update_db -s devstack it doesnt update the table in mysql – user3631341 Aug 20 '15 at 08:13