Forums

Migration errors setting up wagtail with MySQL

Hello,

I'm having trouble setting up Wagtail on pythonanywhere MySQL database. I ran makemigrations and migrate and all the tables were created correctly for each model.

When I reload the server under the web tab and view the site I recieve the following error:

(1146, "Table 'mhsp1948$default.wagtailcore_site' doesn't exist")

I'm not sure why the wagtail_site table isn't being created when I migrate everything. I checked the installed apps in my settings and wagtail.sites is installed and included.

How do I make wagtail or django create this table?

I was able to figure out the problem. I had to remove the default sqlite3 database in my base.py and add MySQL. I originally had MySQL defined as the default in production.py thinking it would overwrite the database in base.py. Turns out thats not the case.

Hope this helps somebody else :)