maxtepkeev / django-db-parti

[DEPRECATED] Django DB Parti - fully automatic database table partitioning for Django
BSD 3-Clause "New" or "Revised" License
31 stars 9 forks source link

Allow other primary key column name #8

Closed fjcapdevila closed 10 years ago

fjcapdevila commented 10 years ago

Dear,

I was trying to use your software, but my table has a primary key column with a different name ('uniqueid'), then database triggers will fail. I made some changes to your code in order to be agnostic to the name of primary key column. I have tested changes with Django 1.4.10 and PostgreSQL 9.2 Please take a look to my changes and give me some feedback.

Cheers from Argentina.

maxtepkeev commented 10 years ago

Thanks for that!

I should have done this myself ;-) Don't know why I hardcoded the id name.

fjcapdevila commented 10 years ago

Remember that I didn't test this using MySQL. It should work, but I am not sure.