mariuz / django-firebird-1.4

django-firebird 1.4.x exported from code.google.com/p/django-firebird
0 stars 0 forks source link

Testing using Employees.FDB #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have just checked out the latest django trunk build (7535), and followed
the instructions on the home page of this site.

When I try to run inspectdb on Employees.FDB, I get the following error:

from django.db import models

class Country(models.Model):
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File
"/usr/lib/python2.5/site-packages/django/core/management/__init__.py", line
272, in execute_manager
    utility.execute()
  File
"/usr/lib/python2.5/site-packages/django/core/management/__init__.py", line
219, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.5/site-packages/django/core/management/base.py",
line 72, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/lib/python2.5/site-packages/django/core/management/base.py",
line 86, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/python2.5/site-packages/django/core/management/base.py",
line 168, in handle
    return self.handle_noargs(**options)
  File
"/usr/lib/python2.5/site-packages/django/core/management/commands/inspectdb.py",
line 10, in handle_noargs
    for line in self.handle_inspection():
  File
"/usr/lib/python2.5/site-packages/django/core/management/commands/inspectdb.py",
line 42, in handle_inspection
    indexes = introspection_module.get_indexes(cursor, table_name)
  File
"/usr/lib/python2.5/site-packages/django/db/backends/firebird/introspection.py",
line 74, in get_indexes
    [qn(table_name).strip('"')])
  File "/usr/lib/python2.5/site-packages/django/db/backends/util.py", line
21, in execute
    sql = self.db.ops.last_executed_query(self.cursor, sql, params)
  File "/usr/lib/python2.5/site-packages/django/db/backends/__init__.py",
line 151, in last_executed_query
    return smart_unicode(sql) % u_params
TypeError: not all arguments converted during string formatting

I am clearly doing something wrong - any ideas? (I am using Employees as a
test case before I attempt to inspect a much larger FDB...)

thanks in advance... 

Patrick

Original issue reported on code.google.com by patrick....@googlemail.com on 15 May 2008 at 10:28

GoogleCodeExporter commented 9 years ago
inspectdb is not working with Firebird backend now. I don't need this 
functionality
myself therefore I didn't implemented it correctly. You are welcome to 
participate in
this project and add this feature. I just don't have enough time to 
add/implement
features I don't need.

Original comment by ivan.ill...@gmail.com on 2 Jun 2008 at 5:50

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi Ivan -  have spend some time today getting inspectdb to work - with some 
success.
One of the the problems I have discovered may be connected with my DB - which is
running on FB1.5. 

I get the same problems when running against Employees.FDB on FB1.5 as well - 
the
main issue now is the detection of the primary key/Foreign key fields. I see 
that
your code uses all the recommend methods to extract metadata - but to no avail 
on FB1.5.

I have attached a new version of introspection.py - if you have a FB2.x db to 
run it
against (i dont right now)- it might be interesting. 

Also - I'd like to join this project - maybe we can get another db backend into
django for v1.0...

thanks...

Patrick
http://www.djangodb.org

Original comment by patrick....@googlemail.com on 12 Aug 2008 at 10:23

Attachments:

GoogleCodeExporter commented 9 years ago
This issue is prior to django 1.0 release. There are some improvements on
introspection  and we need new testing to do.
I'll close this issue waiting new feedback.

Original comment by maxirobaina on 11 Dec 2009 at 9:56