kapilratnani / django_hana

[Discontinued] Django db backend for SAP HANA
BSD 3-Clause "New" or "Revised" License
20 stars 13 forks source link

syncdb on existing tables #12

Closed alexgv closed 11 years ago

alexgv commented 11 years ago

Hi there, we were on another computer and we were trying to sync to a remote amazon ec2 DB but it seems that the syncdb script tries to create the tables even if they exist. Is this something we are missing here?

ubuntu:/sc/StudentCloud$ sudo python manage.py syncdb -v 3

Creating tables ... Processing auth.Permission model Creating table auth_permission Traceback (most recent call last): File "manage.py", line 10, in execute_from_command_line(sys.argv) File "/usr/lib/python2.7/dist-packages/django/core/management/init.py", line 443, in execute_from_command_line utility.execute() File "/usr/lib/python2.7/dist-packages/django/core/management/init.py", line 382, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 196, in run_from_argv self.execute(_args, _options.dict) File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 232, in execute output = self.handle(_args, _options) File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 371, in handle return self.handle_noargs(**options) File "/usr/lib/python2.7/dist-packages/django/core/management/commands/syncdb.py", line 102, in handle_noargs cursor.execute(statement) File "/usr/local/lib/python2.7/dist-packages/django_hana/base.py", line 95, in execute return CursorWrapper.execute(self,sql, params) File "/usr/local/lib/python2.7/dist-packages/django_hana/base.py", line 75, in execute self.cursor.execute(self._replace_params(sql,len(params) if params else 0),params) File "/usr/lib/python2.7/dist-packages/hdbcli/dbapi.py", line 363, in execute ret = self.execute(operation, parameters) File "/usr/lib/python2.7/dist-packages/hdbcli/dbapi.py", line 244, in execute ret = self.__cursor.execute(operation, parameters=parameters, iscall=iscall) hdbcli.dbapi.Error: (288, 'cannot use duplicate table name: AUTH_PERMISSION: line 1 col 18 (at pos 17)')

kapilratnani commented 11 years ago

i'll look at it over the weekend. Thanks for reporting.

alexgv commented 11 years ago

There was something wrong with the way we configure python. I was able to fix it. So dont worry about it.