Re: Specifying the field index types

2013-10-15 Thread Marc Tamlyn
I believe the basics of how to make it migration friendly would simply be to make sure it is given in the field's `deconstruct` method. The Index class may also need to provide a `as_remove_sql(self, qn, connection)` method which would return the relevant `DROP INDEX` command for the db. I think i

Re: Specifying the field index types

2013-10-15 Thread Anssi Kääriäinen
On Monday, September 23, 2013 5:36:56 PM UTC+3, Zev Benjamin wrote: > > Hi, > > I'd like to be able to specify what kind of index the database should use > for a particular field. I have a proof of concept branch that works with > PostgreSQL at https://github.com/zbenjamin/django/compare/index-t

Re: Specifying the field index types

2013-10-02 Thread Alex Burgel
On Wednesday, October 2, 2013 1:29:10 PM UTC-4, Zev Benjamin wrote: > What kind of additional configuration? One advantage of not specifying > the type of the db_index_type field is that you could instantiate an object > that encapsulates the configuration. > That's true. I am partial to openi

Re: Specifying the field index types

2013-10-02 Thread Zev Benjamin
What kind of additional configuration? One advantage of not specifying the type of the db_index_type field is that you could instantiate an object that encapsulates the configuration. Zev On Wednesday, October 2, 2013 1:19:31 PM UTC-4, Alex Burgel wrote: > > This is something that I'd also b

Re: Specifying the field index types

2013-10-02 Thread Alex Burgel
This is something that I'd also be interested in. For the Google App Engine backend, you have the ability to create indexes that require more configuration than just on/off. But I don't think a single additional field would do the trick for my case. Another option would be to open up the Meta c

Re: Specifying the field index types

2013-10-01 Thread Zev Benjamin
Thanks for the feedback, Michael. On Monday, September 23, 2013 1:06:12 PM UTC-4, Michael Manfre wrote: > > My personal opinion is that If you need to get in to this much detail > about your indices, you're probably better off tweaking things directly > against the database and not specifying th

Re: Specifying the field index types

2013-09-23 Thread Michael Manfre
My personal opinion is that If you need to get in to this much detail about your indices, you're probably better off tweaking things directly against the database and not specifying them in the model. With that said, here are a few suggestions for your proof of concept. Don't piggyback db_index. I

Specifying the field index types

2013-09-23 Thread Zev Benjamin
Hi, I'd like to be able to specify what kind of index the database should use for a particular field. I have a proof of concept branch that works with PostgreSQL at https://github.com/zbenjamin/django/compare/index-types, but I'd like to solicit opinions on whether there's a better way of doin