Create PostgreSQL 9.3 index on json column through python, django, south? -


i have json column , need add index that:

create unique index index_name on table ((column->'nest1'->'nest2'->'nest3'->>'data_to_index')); 

this works if execute sql lets pgadmin iii. problem need create index on django south migration.

so, i'm doing in migration file is:

def forwards(self, orm):     ...     db.execute("""create unique index index_name on table ((xml->'nest1'->'nest2'->'nest3'->>'data_to_index'))""") 

but index not created after migration.

i tried in lot of different ways using psycopg2 directly, loading , executing sql file... nothing works!

can me?

thank you!


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -