I need to do the the following to Postgres tables for Django models:
-- 1) Add a functional index
2) Have a bigserial primary key and a bigint foreign key point to it.
Given that I only want this on a single install, is there any reason not to just do it directly? I have found code snippets with "AutoBigInt" fields, but only one claims to support South and non mention Django migrations. I have not found anything to help with adding the index.
The best I can come up with is to directly alter the column type, and do the same to add the index, and write a migration to do that later IF we ever need more than one install - otherwise its more work that way.
Given that the primary key and the foreign keys pointing to it are unlikely to ever change, can I also guess that this is not likely to cause problems with migrations (South and the new Djnago ones in 1.7 when we upgrade) that change other fields of the model?
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e7b6ae59-7c4e-42aa-9aca-f0181991124f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment