Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#33280 closed Bug (invalid)

Migration with django-database-view don't work with multiple databases. — at Version 2

Reported by: razielvamp666 Owned by: nobody
Component: Database layer (models, ORM) Version: 2.2
Severity: Normal Keywords: orm migration
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by razielvamp666)


Change History (2)

comment:1 by Mariusz Felisiak, 3 years ago

Resolution: invalid
Status: newclosed
Summary: [bug] migration don't work with multiple databases (sometimes)Migration with django-database-view don't work with multiple databases.

Thanks for this report. However a lot of things happen outside of Django, you have many 3rd-party packages, a custom Operation in migrations, etc. The main issue is that you're using the query attribute to generate an SQL which is not recommended, documented, or supported. Moreover, this helper has issues with parameters (see #25705) and doesn't work when the default database is empty (see #25947). I'm not marking this as a duplicate of #25947 as fixing it will not make .query the recommended way to generate an SQL. I would use a raw SQL in your case.

comment:2 by razielvamp666, 3 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top