You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have several databases in my project and one of them is external. I know, it's bad practice but that's how it is. And I need tests for it and pytest-django creates tables from models perfectly, but problems arise with custom types in postgres. I need to insert the creation of types in the interval between the creation of the database and the creation of tables. I found this solution and I don't like it. Is there another way?
Are you not able to put it in e.g. an initial migration?
I can't use migrations in an easy way. This database is read-only in production.
I could probably make special migrations for tests and include them in the project if there is an IS_TESTING flag in settings.py. Maybe it's even simpler than I wrote above.
Hi All!
I have several databases in my project and one of them is external. I know, it's bad practice but that's how it is. And I need tests for it and pytest-django creates tables from models perfectly, but problems arise with custom types in postgres. I need to insert the creation of types in the interval between the creation of the database and the creation of tables. I found this solution and I don't like it. Is there another way?
The text was updated successfully, but these errors were encountered: