#36377: support `hints` for postgres contrib operations
---------------------------------+--------------------------------------
     Reporter:  anthony sottile  |                    Owner:  (none)
         Type:  New feature      |                   Status:  new
    Component:  Uncategorized    |                  Version:  5.2
     Severity:  Normal           |               Resolution:
     Keywords:                   |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+--------------------------------------
Description changed by anthony sottile:

Old description:

> since they are ~effectively specialized `RunSql` operations it would be
> nice if they support `hints=...` as well.  at sentry we utilize this in
> our database router to properly target sql-like operations during
> migrations.  without hints we don't know what database to apply the
> migration operation to
>
> something like:
>
> ```python
> operations = [BtreeGistExtension(hints={'tables': ['sentry_whatever']})]
> ```
>
> (and updating the `allow_migrate(...)` calls inside `CreateExtension`)

New description:

 since they are ~effectively specialized `RunSql` operations it would be
 nice if they support `hints=...` as well.  at sentry we utilize this in
 our database router to properly target sql-like operations during
 migrations.  without hints we don't know what database to apply the
 migration operation to

 something like:

 {{{
 operations = [BtreeGistExtension(hints={'tables': ['sentry_whatever']})]
 }}}

 (and updating the `allow_migrate(...)` calls inside `CreateExtension`)

--
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36377#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/01070196b0d3223c-fb9cc5f2-1506-4e7e-861d-cb5de47b8c63-000000%40eu-central-1.amazonses.com.

Reply via email to