Open emilany opened 6 years ago
@emilany, Did you ever figure this out? I'm having the same issue.
For anyone receiving this error: My solution was finding a leftover DATABASES/ENGINE assignment pointing to the standard PostgreSQL backend in a separate settings.py file that was being imported (develop vs production). Once I removed the second DATABASES definition, the error was gone.
When I debug the 'makemigrations customer' command it works fine, creates the migrations. When I execute the 'makemigrations' command with python manage.py makemigrations customer from the command line, I get DatabaseWrapper has no attribute schema_name.
I need to replace tenant model with static json data. Is that possible. The reason is i don't want to handle any database. I am going to use third party api. so when i try to command tenant model in settings and do migrate schemas i got 'critical error: Tenant model should set'. Than i called my data.json file in tenant model of settings file like this 'TENANT_MODEL = "app.data" '. when i try to migrate schemas i got the following error.
[standard:public] === Running migrate for schema public
Traceback (most recent call last):
File "manage.py", line 21, in
I've the same error, does somebody has a solution for that?
i used this
DB_ENGINE=django.db.backends.postgresql
then i got the this error connection.set_schema(schema_name, tenant_type=tenant_type, include_public=False) ^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'DatabaseWrapper' object has no attribute 'set_schema' then i update the the database engine
DB_ENGINE=django_tenants.postgresql_backend
then this problem is solve by updating the code
Hello. I followed what was stated in the installation docs but have come across this:
I have set the db engine as well.
'ENGINE': 'tenant_schemas.postgresql_backend',
I am running on django 1.11. What could possibly be the problem? Thank you.