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

Error when execute "partition" command #11

Closed manelpb closed 10 years ago

manelpb commented 10 years ago

Hello my friend,

First of all, your plugin is awesome. But...

I'm getting this error when executing "partition" command:

(projecttest_env)macbookemmanuel:projecttest emmanuel$ python manage.py partition machines Traceback (most recent call last): File "manage.py", line 10, in execute_from_command_line(sys.argv) File "/users/emmanuel/Envs/projecttest_env/lib/python2.7/site-packages/django/core/management/init.py", line 399, in execute_from_command_line utility.execute() File "/users/emmanuel/Envs/projecttest_env/lib/python2.7/site-packages/django/core/management/init.py", line 392, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/users/emmanuel/Envs/projecttest_env/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv self.execute(_args, _options.dict) File "/users/emmanuel/Envs/projecttest_env/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute output = self.handle(_args, _options) File "/users/emmanuel/Envs/projecttest_env/lib/python2.7/site-packages/django/core/management/base.py", line 348, in handle app_output = self.handle_app(app, **options) File "/users/emmanuel/Envs/projecttest_env/lib/python2.7/site-packages/dbparti/management/commands/partition.py", line 18, in handle_app model_instance.get_partition().prepare() File "/users/emmanuel/Envs/projecttest_env/lib/python2.7/site-packages/dbparti/backends/mysql/partition.py", line 52, in prepare super(RangePartition, self).prepare() File "/users/emmanuel/Envs/projecttest_env/lib/python2.7/site-packages/dbparti/backends/mysql/partition.py", line 22, in prepare partition_column=self.partition_column, KeyError: 'pk'

maxtepkeev commented 10 years ago

Hi!

Thanks for your kind words ;-) Should be fixed in 5a6f740. Can you check please ? If everything is good, I'll release it to PyPI.

Gvidoou commented 10 years ago

Hi! I have the same bug, but 5a6f740 doesn't help. : (

maxtepkeev commented 10 years ago

Please try the 0.3.3 version from PyPI.

Gvidoou commented 10 years ago

Thanks, that fix it! :) And thank you for fast response :+1:

maxtepkeev commented 10 years ago

You're welcome!