Closed chikin closed 11 years ago
Thus when I run "kegbot kb_upgrade" it fails because it wants to rebuild my database from scratch.
This is suspect. Are you sure you are pointing to the right database? kb_upgrade runs migrate under the hood, so the only reason it behaves this way would be a missing database or equivalently, a missing south_migrationhistory table.
Are you saying that table is missing in your original db?
The south_migrationhistory table was empty.
I resolved this issue by running kegbot migrate --fake
before I upgraded to the newer version.
Once I had that resolved, the issue went away and I'm now running 0.9.10 successfully.
Thanks for the follow up. Any idea what could have led to it being empty in the first place? setup-kegbot
should have filled the initial db with fake migration history..
I'm not sure, there weren't any errors when I ran setup-kegbot
, but it was in a mysql database.
I am trying to move my kegbot instance from one machine to another. I backed up the mysql database, and restored it on the new machine.
I reinstalled from pip the same version that I had on the other machine. (0.9.8), and when I try to hit the first view page I'm getting the following traceback:
Internal Server Error: / Traceback (most recent call last): File "/opt/kegbot01/lib/python2.7/site-packages/django/core/handlers/base.py", line 115, in get_response response = callback(request, _callback_args, _callback_kwargs) File "/opt/kegbot01/lib/python2.7/site-packages/django/utils/decorators.py", line 91, in _wrapped_view response = view_func(request, _args, _kwargs) File "/opt/kegbot01/lib/python2.7/site-packages/pykeg/web/kegweb/views.py", line 57, in index context['initial_events'] = kbjson.dumps([protolib.ToDict(e, full=True) for e in events], File "/opt/kegbot01/lib/python2.7/site-packages/pykeg/proto/protolib.py", line 66, in ToDict res = ToProto(obj, full) File "/opt/kegbot01/lib/python2.7/site-packages/pykeg/proto/protolib.py", line 61, in ToProto return _CONVERSION_MAP[kind](obj, full) File "/opt/kegbot01/lib/python2.7/site-packages/pykeg/proto/protolib.py", line 340, in SystemEventToProto ret.drink.MergeFrom(ToProto(record.drink, full=True)) File "/opt/kegbot01/lib/python2.7/site-packages/pykeg/proto/protolib.py", line 61, in ToProto return _CONVERSION_MAP[kind](obj, full) File "/opt/kegbot01/lib/python2.7/site-packages/pykeg/proto/protolib.py", line 201, in DrinkToProto ret.keg.MergeFrom(ToProto(drink.keg)) File "/opt/kegbot01/lib/python2.7/site-packages/pykeg/proto/protolib.py", line 61, in ToProto return _CONVERSION_MAP[kind](obj, full) File "/opt/kegbot01/lib/python2.7/site-packages/pykeg/proto/protolib.py", line 222, in KegToProto ret.status = keg.status AttributeError: 'Keg' object has no attribute 'status'
I have tried to upgrade to the latest version, however following the instructions does not include running migrate, so the south_migrationhistory table is empty. Thus when I run "kegbot kb_upgrade" it fails because it wants to rebuild my database from scratch.