1

I've installed django-celery-beat via:

pip install django-celery-beat

Installed the app on my django project

INSTALLED_APPS = [
...
'django_celery_beat',
...
 ]
 

ran migration via

python manage.py migrate django-celery-beat

I don't get any error message, and I can go to my django admin site and I see the Periodic Task section with Crontab,Intervals, Periodic Tasks, and Solar events sections. However when I click into any of them I get a message about the table not existing.

(1146, "Table 'mydatabase.django_celery_beat_periodtask' doesn't exist")

I've checked my mysql database and in fact there are no tables.

Any idea of how to force the creation of the tables?

Super Kai - Kazuya Ito
  • 22,221
  • 10
  • 124
  • 129
user3007270
  • 406
  • 4
  • 15

2 Answers2

1

It seems a certain version present on PyPI does not contain the migrations. Someone placed a similar issue/question on the repository's issue tracker but it should have been fixed by now.

Anyway, you could try:

python manage.py makemigrations

then

python manage.py migrate

however, I would be cautious using this in production.

Note: It seems there are more reports of this kind of problems related to version 1.1.0, on the issue tracker.

TylerH
  • 20,799
  • 66
  • 75
  • 101
dethos
  • 3,336
  • 1
  • 15
  • 15
0

Check if django_migrations table has django_celery_beat rows:

SELECT * FROM django_migrations;

Then, delete all django_celery_beat rows:

DELETE FROM django_migrations WHERE app = 'django_celery_beat';
Super Kai - Kazuya Ito
  • 22,221
  • 10
  • 124
  • 129