Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run migrate with a clean database #610

Open
Dacid99 opened this issue Jan 31, 2025 · 1 comment
Open

Unable to run migrate with a clean database #610

Dacid99 opened this issue Jan 31, 2025 · 1 comment

Comments

@Dacid99
Copy link

Dacid99 commented Jan 31, 2025

First of all thank you for this amazing addition to django!

When I try to set up a new database (mariadb) for my django application via
python manage.py migrate
I get a
django.db.utils.OperationalError: no such table: constance_constance
makemigrations and showmigrations yield the same result.

From the stack trace traceback.txt I assume that it is due to accessing the config values before the database is set up.
So I removed all config imports and only implemented the settings required for constance settings.py.txt.
Now migrate worked.

Browsing the issues I found #229 where it seems as if my problem has already been dealt with in the past.

Is it possible that the access to the config values before complete db setup was disallowed again in a later commit?

If so what is the intended way of setting up a db from scratch with an application that has the access to the constance db already implemented?

Thanks for your help!

@Dacid99
Copy link
Author

Dacid99 commented Jan 31, 2025

With the workaround described in the issue if got it to work.
Id still be interested whether there is an official way to do this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant