Re: [Django] #28053: Allow fields to specify arbitrary indexes via db_index=Index()

2022-09-20 Thread Django
#28053: Allow fields to specify arbitrary indexes via db_index=Index()
-+-
 Reporter:  Marc Tamlyn  |Owner:  Aman
 |  Pandey
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  indexes migrations   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Aman Pandey):

 * owner:  Can Sarıgöl => Aman Pandey


-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701835b4a8c87-79bf52b7-5d5d-4370-a08e-a92ad3fad72e-00%40eu-central-1.amazonses.com.


Re: [Django] #28053: Allow fields to specify arbitrary indexes via db_index=Index()

2019-06-12 Thread Django
#28053: Allow fields to specify arbitrary indexes via db_index=Index()
-+-
 Reporter:  Marc Tamlyn  |Owner:  Can
 |  Sarıgöl
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  indexes migrations   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Can Sarıgöl):

 Hi, thanks for your detailed explanation. Firstly, I wanted to be sure to
 understand you. Because of that I've issued a
 
[https://github.com/django/django/pull/11264/commits/9d27856794e0d4e50212e5a55285cd324f09fb5d
 commit]. I'm using {{{_get_index_type_kwargs}}} to getting kwargs for
 {{{_create_index_sql}}}. I applied it in this part. what do you think?

-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.bfd7cd5edf73281d80368bef5000c4d8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28053: Allow fields to specify arbitrary indexes via db_index=Index()

2019-06-05 Thread Django
#28053: Allow fields to specify arbitrary indexes via db_index=Index()
-+-
 Reporter:  Marc Tamlyn  |Owner:  Can
 |  Sarıgöl
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  indexes migrations   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Markus Holtermann):

 I had a chat with felixxm discussing the usefulness of this feature.

 The initial idea behind this feature, as far as I can reconstruct from
 memory, came from the requirement that I wanted to have a custom index on
 a field by default, because I didn't want to tell users to add a specific
 index to `Meta.indexes`. The naïve approach Marc and I agreed upon back in
 the days was about this:

 * A field has a `default_index_class` or `default_index`
 property/attribute or whatnot. When a field has `db_index=True`, this
 index definition would be used.
 * Now, a custom field that would want to require an index, could reject
 `db_index` as an argument in `__init__` and set it to `True` all the time.
 * A user could, however, may would like to be able to make adjustments to
 the index that's defined by the field. Thus, passing their own index
 definition in place of `db_index` (and not have the field reject the
 argument.

 This change would also allow to dynamically construct an index based on
 the other arguments passed to `__ini__`:

 {{{#!python
 class MyField(CharField):
 def __init__(self, arg1: str, arg2: int, **kwargs):
 db_index = kwargs.pop("db_index", None)
 if db_index is None:
 db_index = MyIndexClass(arg1, math.pi * arg2)
 super().__init__(db_index=db_index, **kwargs)

 class MyModel(models.Model):
 field1 = MyField()
 field2 = MyField(db_index=Index(name="foo"))
 }}}
 }}}

-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.eeeb436e7e6dbb9e306864ad26ebf4f3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28053: Allow fields to specify arbitrary indexes via db_index=Index()

2019-05-29 Thread Django
#28053: Allow fields to specify arbitrary indexes via db_index=Index()
-+-
 Reporter:  Marc Tamlyn  |Owner:  Can
 |  Sarıgöl
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  indexes migrations   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by felixxm):

 * needs_better_patch:  0 => 1


-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.680f36de4f10bbe07ac1cb627ab0549e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28053: Allow fields to specify arbitrary indexes via db_index=Index()

2019-05-28 Thread Django
#28053: Allow fields to specify arbitrary indexes via db_index=Index()
-+-
 Reporter:  Marc Tamlyn  |Owner:  Can
 |  Sarıgöl
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  indexes migrations   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Can Sarıgöl):

 * needs_docs:  1 => 0
 * needs_tests:  1 => 0


-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.ea35c80845ac83ae883d123b6188018e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28053: Allow fields to specify arbitrary indexes via db_index=Index()

2019-04-24 Thread Django
#28053: Allow fields to specify arbitrary indexes via db_index=Index()
-+-
 Reporter:  Marc Tamlyn  |Owner:  Can
 |  Sarıgöl
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  indexes migrations   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Can Sarıgöl):

 * version:  1.11 => master


-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.87a8d8d06f64b147ee9ba88129dcb74c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28053: Allow fields to specify arbitrary indexes via db_index=Index()

2019-04-24 Thread Django
#28053: Allow fields to specify arbitrary indexes via db_index=Index()
-+-
 Reporter:  Marc Tamlyn  |Owner:  Can
 |  Sarıgöl
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  1.11
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  indexes migrations   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Can Sarıgöl):

 * status:  new => assigned
 * needs_better_patch:  1 => 0
 * owner:  nobody => Can Sarıgöl


Comment:

 new WP [https://github.com/django/django/pull/11264 PR]

-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.da05845321dcb7275612c9995e8b8c06%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28053: Allow fields to specify arbitrary indexes via db_index=Index()

2017-04-07 Thread Django
#28053: Allow fields to specify arbitrary indexes via db_index=Index()
-+-
 Reporter:  Marc Tamlyn  |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  1.11
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  indexes migrations   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

 * type:  Uncategorized => New feature


Comment:

 WIP [https://github.com/django/django/pull/8322 PR]

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.01a79c2fff31fa21d46eb8cf2e8c2547%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #28053: Allow fields to specify arbitrary indexes via db_index=Index()

2017-04-07 Thread Django
#28053: Allow fields to specify arbitrary indexes via db_index=Index()
-+-
 Reporter:  Marc Tamlyn  |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  1.11
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  indexes migrations   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  1|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Markus Holtermann):

 * needs_docs:  0 => 1
 * needs_tests:  0 => 1
 * stage:  Unreviewed => Accepted


--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.232493029b4593d55e630eddf27c923c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.