
Django create table в разных схемах PostgreSQL
PostgreSQL, migrations, django
всем добрый вечер
есть у меня база postgres у которой есть 2 схемы - public, content .
по умолчанию джанго мигрирует таблицы в схему public
в моделях в классе мета я задал параметр db_table где указал явно название таблицы НО есть одно приложение в моделй которй я задал:
db_table = 'content.film_work'
где content это название второй схемы из postgres
при миграции таблицы данного приложения создались в схеме public а по задумке они должны были пойти в схемы content
как я понял джанго не поняла что 'content.film_work' это название_схемы.название_таблицы
может кто помочь как решить проблему?
в сетингах настройка DATABASES вот:
DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql", "NAME": "move", "USER": "miki", "PASSWORD": "qwerty", "HOST": "127.0.0.1", "PORT": "5432", 'OPTIONS': { 'options': '-c search_path=public,content', } } }

We recommend hosting TIMEWEB
Stable hosting, on which the social network EVILEG is located. For projects on Django we recommend VDS hosting.Fornex
Let me recommend you a great European Fornex hosting.
Fornex has proven itself to be a stable host over the years.
For Django projects I recommend VPS hosting
Following the link you will receive a 5% discount on shared hosting services, dedicated servers, VPS and VPN
View HostingShare on social networks
Donate
The EVILEG project has switched to a non-commercial basis and will develop solely on the enthusiasm of the site creator, the enthusiasm of users, donations and the hosting referral system
Thank you for your support
Available ways to support the project
PayPal
PatreonYandex.MoneyMore
решил проблему
если кому интересно:
в мета класс модели добавил managed=True а значение db_table = 'content\".\"film_work'
тем самым таблица film_work смигрировала в схему content.